Tag Parser 12.3.1
C++ library for reading and writing MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags
Loading...
Searching...
No Matches
TagParser::AbstractChapter Class Referenceabstract

The AbstractChapter class parses chapter information. More...

#include <abstractchapter.h>

Inheritance diagram for TagParser::AbstractChapter:
[legend]
Collaboration diagram for TagParser::AbstractChapter:
[legend]

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 AbstractChapternestedChapter (std::size_t index)
 Returns the nested chapter with the specified index.
 
virtual const AbstractChapternestedChapter (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< LocaleAwareStringm_names
 
CppUtilities::TimeSpan m_startTime
 
CppUtilities::TimeSpan m_endTime
 
std::vector< std::uint64_t > m_tracks
 
std::unique_ptr< AbstractChapterPrivatem_p
 
bool m_hidden
 
bool m_enabled
 

Detailed Description

The AbstractChapter class parses chapter information.

Constructor & Destructor Documentation

◆ ~AbstractChapter()

TagParser::AbstractChapter::~AbstractChapter ( )
virtual

Destroys the chapter.

Definition at line 34 of file abstractchapter.cpp.

◆ AbstractChapter()

TagParser::AbstractChapter::AbstractChapter ( )
protected

Constructs a new chapter.

Definition at line 22 of file abstractchapter.cpp.

Member Function Documentation

◆ clear()

void TagParser::AbstractChapter::clear ( )
virtual

Resets the object to its initial state.

Reimplemented in TagParser::MatroskaChapter.

Definition at line 57 of file abstractchapter.cpp.

◆ endTime()

CppUtilities::TimeSpan TagParser::AbstractChapter::endTime ( ) const
inline

Returns the end time if known; otherwise returns a negative time span.

Definition at line 78 of file abstractchapter.h.

◆ id()

std::uint64_t TagParser::AbstractChapter::id ( ) const
inline

Returns the chapter ID if known; otherwise returns zero.

Definition at line 54 of file abstractchapter.h.

◆ internalParse()

virtual void TagParser::AbstractChapter::internalParse ( Diagnostics & diag,
AbortableProgressFeedback & progress )
protectedpure virtual

Internally called to parse the chapter.

Must be implemented when subclassing.

Exceptions
ThrowsFailure or a derived class when a parsing error occurs.
Throwsstd::ios_base::failure when an IO error occurs.

Implemented in TagParser::MatroskaChapter.

◆ isEnabled()

bool TagParser::AbstractChapter::isEnabled ( ) const
inline

Returns whether the chapter is flagged as enabled.

Definition at line 102 of file abstractchapter.h.

◆ isHidden()

bool TagParser::AbstractChapter::isHidden ( ) const
inline

Returns whether the chapter is flagged as hidden.

Definition at line 94 of file abstractchapter.h.

◆ label()

string TagParser::AbstractChapter::label ( ) const

Returns a label for the chapter.

Definition at line 41 of file abstractchapter.cpp.

◆ names()

const std::vector< LocaleAwareString > & TagParser::AbstractChapter::names ( ) const
inline

Returns the chapter name.

Definition at line 62 of file abstractchapter.h.

◆ nestedChapter() [1/2]

AbstractChapter * TagParser::AbstractChapter::nestedChapter ( std::size_t index)
inlinevirtual

Returns the nested chapter with the specified index.

Reimplemented in TagParser::MatroskaChapter.

Definition at line 110 of file abstractchapter.h.

◆ nestedChapter() [2/2]

const AbstractChapter * TagParser::AbstractChapter::nestedChapter ( std::size_t index) const
inlinevirtual

Returns the nested chapter with the specified index.

Reimplemented in TagParser::MatroskaChapter.

Definition at line 118 of file abstractchapter.h.

◆ nestedChapterCount()

std::size_t TagParser::AbstractChapter::nestedChapterCount ( ) const
inlinevirtual

Returns the number of nested chapters.

Reimplemented in TagParser::MatroskaChapter.

Definition at line 126 of file abstractchapter.h.

◆ parse()

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.

◆ parseNested()

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.

◆ startTime()

CppUtilities::TimeSpan TagParser::AbstractChapter::startTime ( ) const
inline

Returns the start time if known; otherwise returns a negative time span.

Definition at line 70 of file abstractchapter.h.

◆ tracks()

const std::vector< std::uint64_t > & TagParser::AbstractChapter::tracks ( ) const
inline

Returns a list of tracks on which the chapter applies.

Definition at line 86 of file abstractchapter.h.

Member Data Documentation

◆ m_enabled

bool TagParser::AbstractChapter::m_enabled
protected

Definition at line 48 of file abstractchapter.h.

◆ m_endTime

CppUtilities::TimeSpan TagParser::AbstractChapter::m_endTime
protected

Definition at line 44 of file abstractchapter.h.

◆ m_hidden

bool TagParser::AbstractChapter::m_hidden
protected

Definition at line 47 of file abstractchapter.h.

◆ m_id

std::uint64_t TagParser::AbstractChapter::m_id
protected

Definition at line 41 of file abstractchapter.h.

◆ m_names

std::vector<LocaleAwareString> TagParser::AbstractChapter::m_names
protected

Definition at line 42 of file abstractchapter.h.

◆ m_p

std::unique_ptr<AbstractChapterPrivate> TagParser::AbstractChapter::m_p
protected

Definition at line 46 of file abstractchapter.h.

◆ m_startTime

CppUtilities::TimeSpan TagParser::AbstractChapter::m_startTime
protected

Definition at line 43 of file abstractchapter.h.

◆ m_tracks

std::vector<std::uint64_t> TagParser::AbstractChapter::m_tracks
protected

Definition at line 45 of file abstractchapter.h.


The documentation for this class was generated from the following files: