2018-03-06 23:09:15 +01:00
|
|
|
#ifndef TAG_PARSER_MATROSKAEDITIONENTRY_H
|
|
|
|
#define TAG_PARSER_MATROSKAEDITIONENTRY_H
|
2015-04-22 19:22:01 +02:00
|
|
|
|
2015-09-06 19:57:33 +02:00
|
|
|
#include "./matroskachapter.h"
|
2015-04-22 19:22:01 +02:00
|
|
|
|
2018-03-06 23:09:15 +01:00
|
|
|
namespace TagParser {
|
2015-04-22 19:22:01 +02:00
|
|
|
|
|
|
|
class EbmlElement;
|
|
|
|
|
2018-03-07 01:17:50 +01:00
|
|
|
class TAG_PARSER_EXPORT MatroskaEditionEntry {
|
2015-04-22 19:22:01 +02:00
|
|
|
public:
|
|
|
|
MatroskaEditionEntry(EbmlElement *editionEntryElement);
|
|
|
|
~MatroskaEditionEntry();
|
|
|
|
|
|
|
|
EbmlElement *editionEntryElement() const;
|
2019-03-13 19:06:42 +01:00
|
|
|
std::uint64_t id() const;
|
2015-04-22 19:22:01 +02:00
|
|
|
bool isHidden() const;
|
|
|
|
bool isDefault() const;
|
|
|
|
bool isOrdered() const;
|
|
|
|
std::string label() const;
|
2018-03-07 01:17:50 +01:00
|
|
|
const std::vector<std::unique_ptr<MatroskaChapter>> &chapters() const;
|
2015-04-22 19:22:01 +02:00
|
|
|
|
2018-03-05 17:49:29 +01:00
|
|
|
void parse(Diagnostics &diag);
|
2021-02-04 23:21:50 +01:00
|
|
|
void parseNested(Diagnostics &diag, AbortableProgressFeedback &progress);
|
2015-04-22 19:22:01 +02:00
|
|
|
void clear();
|
|
|
|
|
|
|
|
private:
|
|
|
|
EbmlElement *m_editionEntryElement;
|
2019-03-13 19:06:42 +01:00
|
|
|
std::uint64_t m_id;
|
2015-04-22 19:22:01 +02:00
|
|
|
bool m_hidden;
|
|
|
|
bool m_default;
|
|
|
|
bool m_ordered;
|
2018-03-07 01:17:50 +01:00
|
|
|
std::vector<std::unique_ptr<MatroskaChapter>> m_chapters;
|
2015-04-22 19:22:01 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* \brief Returns the "EditionEntry"-element specified when constructing the object.
|
|
|
|
*/
|
|
|
|
inline EbmlElement *MatroskaEditionEntry::editionEntryElement() const
|
|
|
|
{
|
|
|
|
return m_editionEntryElement;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* \brief Returns the edition ID.
|
|
|
|
*/
|
2019-03-13 19:06:42 +01:00
|
|
|
inline std::uint64_t MatroskaEditionEntry::id() const
|
2015-04-22 19:22:01 +02:00
|
|
|
{
|
|
|
|
return m_id;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* \brief Returns whether the edition is hidden.
|
|
|
|
*/
|
|
|
|
inline bool MatroskaEditionEntry::isHidden() const
|
|
|
|
{
|
|
|
|
return m_hidden;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* \brief Returns whether the edition is flagged as default edition.
|
|
|
|
*/
|
|
|
|
inline bool MatroskaEditionEntry::isDefault() const
|
|
|
|
{
|
|
|
|
return m_default;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* \brief Returns whether the edition is ordered.
|
|
|
|
*/
|
|
|
|
inline bool MatroskaEditionEntry::isOrdered() const
|
|
|
|
{
|
|
|
|
return m_ordered;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* \brief Returns the chapters the edition contains.
|
|
|
|
*/
|
2018-03-07 01:17:50 +01:00
|
|
|
inline const std::vector<std::unique_ptr<MatroskaChapter>> &MatroskaEditionEntry::chapters() const
|
2015-04-22 19:22:01 +02:00
|
|
|
{
|
|
|
|
return m_chapters;
|
|
|
|
}
|
|
|
|
|
2018-03-07 01:17:50 +01:00
|
|
|
} // namespace TagParser
|
2015-04-22 19:22:01 +02:00
|
|
|
|
2018-03-06 23:09:15 +01:00
|
|
|
#endif // TAG_PARSER_MATROSKAEDITIONENTRY_H
|