Tag Parser 11.4.0
C++ library for reading and writing MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags
|
The AbstractChapter class parses chapter information. More...
#include <abstractchapter.h>
Public Member Functions | |
virtual | ~AbstractChapter () |
Destroys the chapter. More... | |
std::uint64_t | id () const |
Returns the chapter ID if known; otherwise returns zero. More... | |
const std::vector< LocaleAwareString > & | names () const |
Returns the chapter name. More... | |
CppUtilities::TimeSpan | startTime () const |
Returns the start time if known; otherwise returns a negative time span. More... | |
CppUtilities::TimeSpan | endTime () const |
Returns the end time if known; otherwise returns a negative time span. More... | |
const std::vector< std::uint64_t > & | tracks () const |
Returns a list of tracks on which the chapter applies. More... | |
bool | isHidden () const |
Returns whether the chapter is flagged as hidden. More... | |
bool | isEnabled () const |
Returns whether the chapter is flagged as enabled. More... | |
std::string | label () const |
Returns a label for the chapter. More... | |
virtual AbstractChapter * | nestedChapter (std::size_t index) |
Returns the nested chapter with the specified index. More... | |
virtual const AbstractChapter * | nestedChapter (std::size_t index) const |
Returns the nested chapter with the specified index. More... | |
virtual std::size_t | nestedChapterCount () const |
Returns the number of nested chapters. More... | |
virtual void | clear () |
Resets the object to its initial state. More... | |
void | parse (Diagnostics &diag, AbortableProgressFeedback &progress) |
Parses the chapter. More... | |
void | parseNested (Diagnostics &diag, AbortableProgressFeedback &progress) |
Parses the chapter and nested chapters recursively. More... | |
Protected Member Functions | |
AbstractChapter () | |
Constructs a new chapter. More... | |
virtual void | internalParse (Diagnostics &diag, AbortableProgressFeedback &progress)=0 |
Internally called to parse the chapter. More... | |
Protected Attributes | |
std::uint64_t | m_id |
std::vector< LocaleAwareString > | m_names |
CppUtilities::TimeSpan | m_startTime |
CppUtilities::TimeSpan | m_endTime |
std::vector< std::uint64_t > | m_tracks |
bool | m_hidden |
bool | m_enabled |
The AbstractChapter class parses chapter information.
Definition at line 16 of file abstractchapter.h.
|
virtual |
Destroys the chapter.
Definition at line 31 of file abstractchapter.cpp.
|
protected |
Constructs a new chapter.
Definition at line 19 of file abstractchapter.cpp.
|
virtual |
Resets the object to its initial state.
Reimplemented in TagParser::MatroskaChapter.
Definition at line 54 of file abstractchapter.cpp.
|
inline |
Returns the end time if known; otherwise returns a negative time span.
Definition at line 75 of file abstractchapter.h.
|
inline |
Returns the chapter ID if known; otherwise returns zero.
Definition at line 51 of file abstractchapter.h.
|
protectedpure virtual |
Internally called to parse the chapter.
Must be implemented when subclassing.
Throws | Failure or a derived class when a parsing error occurs. |
Throws | std::ios_base::failure when an IO error occurs. |
Implemented in TagParser::MatroskaChapter.
|
inline |
Returns whether the chapter is flagged as enabled.
Definition at line 99 of file abstractchapter.h.
|
inline |
Returns whether the chapter is flagged as hidden.
Definition at line 91 of file abstractchapter.h.
string TagParser::AbstractChapter::label | ( | ) | const |
Returns a label for the chapter.
Definition at line 38 of file abstractchapter.cpp.
|
inline |
Returns the chapter name.
Definition at line 59 of file abstractchapter.h.
|
inlinevirtual |
Returns the nested chapter with the specified index.
Reimplemented in TagParser::MatroskaChapter.
Definition at line 107 of file abstractchapter.h.
|
inlinevirtual |
Returns the nested chapter with the specified index.
Reimplemented in TagParser::MatroskaChapter.
Definition at line 115 of file abstractchapter.h.
|
inlinevirtual |
Returns the number of nested chapters.
Reimplemented in TagParser::MatroskaChapter.
Definition at line 123 of file abstractchapter.h.
void TagParser::AbstractChapter::parse | ( | Diagnostics & | diag, |
AbortableProgressFeedback & | progress | ||
) |
Parses the chapter.
Fetches nested chapters but does not parse them.
Clears all previous parsing results.
Definition at line 71 of file abstractchapter.cpp.
void TagParser::AbstractChapter::parseNested | ( | Diagnostics & | diag, |
AbortableProgressFeedback & | progress | ||
) |
Parses the chapter and nested chapters recursively.
Clears all previous parsing results.
Definition at line 82 of file abstractchapter.cpp.
|
inline |
Returns the start time if known; otherwise returns a negative time span.
Definition at line 67 of file abstractchapter.h.
|
inline |
Returns a list of tracks on which the chapter applies.
Definition at line 83 of file abstractchapter.h.
|
protected |
Definition at line 45 of file abstractchapter.h.
|
protected |
Definition at line 42 of file abstractchapter.h.
|
protected |
Definition at line 44 of file abstractchapter.h.
|
protected |
Definition at line 39 of file abstractchapter.h.
|
protected |
Definition at line 40 of file abstractchapter.h.
|
protected |
Definition at line 41 of file abstractchapter.h.
|
protected |
Definition at line 43 of file abstractchapter.h.