Tag Parser 12.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. | |
std::uint64_t | id () const |
Returns the chapter ID if known; otherwise returns zero. | |
const std::vector< LocaleAwareString > & | names () const |
Returns the chapter name. | |
CppUtilities::TimeSpan | startTime () const |
Returns the start time if known; otherwise returns a negative time span. | |
CppUtilities::TimeSpan | endTime () const |
Returns the end time if known; otherwise returns a negative time span. | |
const std::vector< std::uint64_t > & | tracks () const |
Returns a list of tracks on which the chapter applies. | |
bool | isHidden () const |
Returns whether the chapter is flagged as hidden. | |
bool | isEnabled () const |
Returns whether the chapter is flagged as enabled. | |
std::string | label () const |
Returns a label for the chapter. | |
virtual AbstractChapter * | nestedChapter (std::size_t index) |
Returns the nested chapter with the specified index. | |
virtual const AbstractChapter * | nestedChapter (std::size_t index) const |
Returns the nested chapter with the specified index. | |
virtual std::size_t | nestedChapterCount () const |
Returns the number of nested chapters. | |
virtual void | clear () |
Resets the object to its initial state. | |
void | parse (Diagnostics &diag, AbortableProgressFeedback &progress) |
Parses the chapter. | |
void | parseNested (Diagnostics &diag, AbortableProgressFeedback &progress) |
Parses the chapter and nested chapters recursively. | |
Protected Member Functions | |
AbstractChapter () | |
Constructs a new chapter. | |
virtual void | internalParse (Diagnostics &diag, AbortableProgressFeedback &progress)=0 |
Internally called to parse the chapter. | |
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 |
std::unique_ptr< AbstractChapterPrivate > | m_p |
bool | m_hidden |
bool | m_enabled |
The AbstractChapter class parses chapter information.
|
virtual |
Destroys the chapter.
Definition at line 34 of file abstractchapter.cpp.
|
protected |
Constructs a new chapter.
Definition at line 22 of file abstractchapter.cpp.
|
virtual |
Resets the object to its initial state.
Reimplemented in TagParser::MatroskaChapter.
Definition at line 57 of file abstractchapter.cpp.
|
inline |
Returns the end time if known; otherwise returns a negative time span.
Definition at line 78 of file abstractchapter.h.
|
inline |
Returns the chapter ID if known; otherwise returns zero.
Definition at line 54 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 102 of file abstractchapter.h.
|
inline |
Returns whether the chapter is flagged as hidden.
Definition at line 94 of file abstractchapter.h.
string TagParser::AbstractChapter::label | ( | ) | const |
Returns a label for the chapter.
Definition at line 41 of file abstractchapter.cpp.
|
inline |
Returns the chapter name.
Definition at line 62 of file abstractchapter.h.
|
inlinevirtual |
Returns the nested chapter with the specified index.
Reimplemented in TagParser::MatroskaChapter.
Definition at line 110 of file abstractchapter.h.
|
inlinevirtual |
Returns the nested chapter with the specified index.
Reimplemented in TagParser::MatroskaChapter.
Definition at line 118 of file abstractchapter.h.
|
inlinevirtual |
Returns the number of nested chapters.
Reimplemented in TagParser::MatroskaChapter.
Definition at line 126 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 74 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 85 of file abstractchapter.cpp.
|
inline |
Returns the start time if known; otherwise returns a negative time span.
Definition at line 70 of file abstractchapter.h.
|
inline |
Returns a list of tracks on which the chapter applies.
Definition at line 86 of file abstractchapter.h.
|
protected |
Definition at line 48 of file abstractchapter.h.
|
protected |
Definition at line 44 of file abstractchapter.h.
|
protected |
Definition at line 47 of file abstractchapter.h.
|
protected |
Definition at line 41 of file abstractchapter.h.
|
protected |
Definition at line 42 of file abstractchapter.h.
|
protected |
Definition at line 46 of file abstractchapter.h.
|
protected |
Definition at line 43 of file abstractchapter.h.
|
protected |
Definition at line 45 of file abstractchapter.h.