19 AbstractContainer::AbstractContainer(iostream &stream, uint64 startOffset)
23 , m_doctypeReadVersion(0)
25 , m_headerParsed(false)
27 , m_tracksParsed(false)
28 , m_tracksAltered(false)
29 , m_chaptersParsed(false)
30 , m_attachmentsParsed(false)
31 , m_startOffset(startOffset)
33 , m_reader(BinaryReader(m_stream))
34 , m_writer(BinaryWriter(m_stream))
272 VAR_UNUSED(progress);
virtual ElementPosition determineTagPosition(Diagnostics &diag) const
Determines the position of the tags inside the file.
virtual AbstractAttachment * createAttachment()
Creates and returns a new attachment.
virtual AbstractAttachment * attachment(std::size_t index)
Returns the attachment with the specified index.
virtual ElementPosition determineIndexPosition(Diagnostics &diag) const
Determines the position of the index.
virtual bool removeTag(Tag *tag)
Removes the specified tag from the container.
virtual void removeAllTracks()
Removes all tracks from the container.
virtual std::size_t attachmentCount() const
Returns the number of attachments the container holds.
virtual void internalMakeFile(Diagnostics &diag, AbortableProgressFeedback &progress)
Internally called to make the file.
virtual Tag * tag(std::size_t index)
Returns the tag with the specified index.
virtual std::size_t chapterCount() const
Returns the number of chapters the container holds.
virtual Tag * createTag(const TagTarget &target=TagTarget())
Creates and returns a tag for the specified target.
virtual void reset()
Discards all parsing results.
void parseTracks(Diagnostics &diag)
Parses the tracks of the file if not parsed yet.
bool areChaptersParsed() const
Returns an indication whether the chapters have been parsed yet.
virtual bool supportsTrackModifications() const
Returns whether the implementation supports adding or removing of tracks.
virtual std::size_t trackCount() const
Returns the number of tracks the container holds.
bool isHeaderParsed() const
Returns an indication whether the header has been parsed yet.
void parseAttachments(Diagnostics &diag)
Parses the attachments of the file if not parsed yet.
virtual void removeAllTags()
Removes all tags attached to the container.
virtual void internalParseTracks(Diagnostics &diag)
Internally called to parse the tracks.
virtual void internalParseTags(Diagnostics &diag)
Internally called to parse the tags.
Contains utility classes helping to read and write streams.
bool areAttachmentsParsed() const
Returns an indication whether the attachments have been parsed yet.
void makeFile(Diagnostics &diag, AbortableProgressFeedback &progress)
Rewrites the file to apply changed tag information.
virtual ~AbstractContainer()
Destroys the container.
virtual void internalParseAttachments(Diagnostics &diag)
Internally called to parse the attachments.
virtual void internalParseChapters(Diagnostics &diag)
Internally called to parse the chapters.
std::vector< std::string > m_titles
bool areTracksParsed() const
Returns an indication whether the tracks have been parsed yet.
virtual bool supportsTitle() const
Returns whether the title property is supported.
uint64 m_doctypeReadVersion
virtual AbstractTrack * track(std::size_t index)
Returns the track with the specified index.
virtual std::size_t segmentCount() const
Returns the number of segments.
virtual AbstractChapter * chapter(std::size_t index)
Returns the chapter with the specified index.
void parseChapters(Diagnostics &diag)
Parses the chapters of the file if not parsed yet.
virtual bool removeTrack(AbstractTrack *track)
Removes the specified track to the container.
void parseHeader(Diagnostics &diag)
Parses the header if not parsed yet.
bool areTagsParsed() const
Returns an indication whether the tags have been parsed yet.
virtual void internalParseHeader(Diagnostics &diag)
Internally called to parse the header.
virtual std::size_t tagCount() const
Returns the number of tags attached to the container.
void parseTags(Diagnostics &diag)
Parses the tag information if not parsed yet.