Tag Parser  6.5.1
C++ library for reading and writing MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags
matroskachapter.h
Go to the documentation of this file.
1 #ifndef MEDIA_MATROSKACHAPTER_H
2 #define MEDIA_MATROSKACHAPTER_H
3 
4 #include "../abstractchapter.h"
5 
6 #include <memory>
7 
8 namespace Media {
9 
10 class EbmlElement;
11 
13 {
14 public:
15  MatroskaChapter(EbmlElement *chapterAtomElement);
16  ~MatroskaChapter();
17 
18  MatroskaChapter *nestedChapter(std::size_t index);
19  const MatroskaChapter *nestedChapter(std::size_t index) const;
20  std::size_t nestedChapterCount() const;
21  void clear();
22 
23 protected:
24  void internalParse();
25 
26 private:
27  EbmlElement *m_chapterAtomElement;
28  std::vector<std::unique_ptr<MatroskaChapter> > m_nestedChapters;
29 
30 };
31 
33 {
34  return m_nestedChapters[index].get();
35 }
36 
37 inline const MatroskaChapter *MatroskaChapter::nestedChapter(std::size_t index) const
38 {
39  return m_nestedChapters[index].get();
40 }
41 
42 inline std::size_t MatroskaChapter::nestedChapterCount() const
43 {
44  return m_nestedChapters.size();
45 }
46 
47 
48 } // namespace Media
49 
50 #endif // MEDIA_MATROSKACHAPTER_H
The AbstractChapter class parses chapter information.
std::size_t nestedChapterCount() const
Returns the number of nested chapters.
The EbmlElement class helps to parse EBML files such as Matroska files.
Definition: ebmlelement.h:50
The MatroskaChapter class provides an implementation of AbstractAttachment for Matroska files...
Contains all classes and functions of the TagInfo library.
Definition: exceptions.h:9
MatroskaChapter * nestedChapter(std::size_t index)
Returns the nested chapter with the specified index.
#define TAG_PARSER_EXPORT
Marks the symbol to be exported by the tagparser library.