Tag Parser: matroska/matroskachapter.h Source File

Tag Parser 12.5.3 C++ library for reading and writing MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags

Loading...
Searching...
No Matches
matroskachapter.h
Go to the documentation of this file.
1#ifndef TAG_PARSER_MATROSKACHAPTER_H
2#define TAG_PARSER_MATROSKACHAPTER_H
3
4#include "../abstractchapter.h"
5
6#include <memory>
7
8namespace TagParser {
9
10class EbmlElement;
11
12 class TAG_PARSER_EXPORT MatroskaChapter : public AbstractChapter {
13public:
14 MatroskaChapter(EbmlElement *chapterAtomElement);
15 ~MatroskaChapter() override;
16
17 MatroskaChapter *nestedChapter(std::size_t index) override;
18 const MatroskaChapter *nestedChapter(std::size_t index) const override;
19 std::size_t nestedChapterCount() const override;
20 void clear() override;
21
22protected:
23 void internalParse(Diagnostics &diag, AbortableProgressFeedback &progress) override;
24
25private:
26 EbmlElement *m_chapterAtomElement;
27 std::vector<std::unique_ptr<MatroskaChapter>> m_nestedChapters;
28};
29
30 inline MatroskaChapter *MatroskaChapter::nestedChapter(std::size_t index)
31{
32 return m_nestedChapters[index].get();
33}
34
35 inline const MatroskaChapter *MatroskaChapter::nestedChapter(std::size_t index) const
36{
37 return m_nestedChapters[index].get();
38}
39
40 inline std::size_t MatroskaChapter::nestedChapterCount() const
41{
42 return m_nestedChapters.size();
43}
44
45} // namespace TagParser
46
47#endif // TAG_PARSER_MATROSKACHAPTER_H
abstractchapter.h
TagParser::AbortableProgressFeedback
The AbortableProgressFeedback class provides feedback about an ongoing operation via callbacks.
Definition progressfeedback.h:186
TagParser::AbstractChapter::AbstractChapter
AbstractChapter()
Constructs a new chapter.
Definition abstractchapter.cpp:22
TagParser::Diagnostics
The Diagnostics class is a container for DiagMessage.
Definition diagnostics.h:156
TagParser::EbmlElement
The EbmlElement class helps to parse EBML files such as Matroska files.
Definition ebmlelement.h:32
TagParser::MatroskaChapter::MatroskaChapter
MatroskaChapter(EbmlElement *chapterAtomElement)
Constructs a new MatroskaChapter for the specified chapterAtomElement.
Definition matroskachapter.cpp:24
TagParser::MatroskaChapter::internalParse
void internalParse(Diagnostics &diag, AbortableProgressFeedback &progress) override
Parses the "ChapterAtom"-element which has been specified when constructing the object.
Definition matroskachapter.cpp:42
TagParser::MatroskaChapter::nestedChapterCount
std::size_t nestedChapterCount() const override
Returns the number of nested chapters.
Definition matroskachapter.h:40
TagParser::MatroskaChapter::clear
void clear() override
Resets the object to its initial state.
Definition matroskachapter.cpp:133
TagParser::MatroskaChapter::nestedChapter
MatroskaChapter * nestedChapter(std::size_t index) override
Returns the nested chapter with the specified index.
Definition matroskachapter.h:30
TAG_PARSER_EXPORT
#define TAG_PARSER_EXPORT
Marks the symbol to be exported by the tagparser library.
Definition global.h:14
TagParser
Contains all classes and functions of the TagInfo library.
Definition aaccodebook.h:10