tagparser/matroska/matroskachapter.h

51 lines
1.1 KiB
C
Raw Normal View History

2015-04-22 19:22:01 +02:00
#ifndef MEDIA_MATROSKACHAPTER_H
#define MEDIA_MATROSKACHAPTER_H
2015-09-06 19:57:33 +02:00
#include "../abstractchapter.h"
2015-04-22 19:22:01 +02:00
#include <memory>
namespace Media {
class EbmlElement;
2016-08-29 15:43:05 +02:00
class TAG_PARSER_EXPORT MatroskaChapter : public AbstractChapter
2015-04-22 19:22:01 +02:00
{
public:
MatroskaChapter(EbmlElement *chapterAtomElement);
~MatroskaChapter() override;
2015-04-22 19:22:01 +02:00
MatroskaChapter *nestedChapter(std::size_t index) override;
const MatroskaChapter *nestedChapter(std::size_t index) const override;
std::size_t nestedChapterCount() const override;
void clear() override;
2015-04-22 19:22:01 +02:00
protected:
void internalParse(Diagnostics &diag) override;
2015-04-22 19:22:01 +02:00
private:
EbmlElement *m_chapterAtomElement;
std::vector<std::unique_ptr<MatroskaChapter> > m_nestedChapters;
};
inline MatroskaChapter *MatroskaChapter::nestedChapter(std::size_t index)
{
return m_nestedChapters[index].get();
}
inline const MatroskaChapter *MatroskaChapter::nestedChapter(std::size_t index) const
{
return m_nestedChapters[index].get();
}
inline std::size_t MatroskaChapter::nestedChapterCount() const
{
return m_nestedChapters.size();
}
} // namespace Media
#endif // MEDIA_MATROSKACHAPTER_H