Tag Parser
9.0.0
C++ library for reading and writing MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags
|
Go to the documentation of this file. 1 #ifndef TAG_PARSER_TAGTARGET_H
2 #define TAG_PARSER_TAGTARGET_H
28 std::uint64_t level()
const;
29 void setLevel(std::uint64_t level);
30 const std::string &levelName()
const;
31 void setLevelName(
const std::string &levelName);
42 std::string toString(
const std::function<
TagTargetLevel(std::uint64_t)> &tagTargetMapping)
const;
47 std::uint64_t m_level;
48 std::string m_levelName;
63 , m_chapters(chapters)
64 , m_editions(editions)
65 , m_attachments(attachments)
74 return m_level ? m_level : 50;
154 return m_attachments;
162 return m_attachments;
170 return m_level == 0 && m_levelName.empty() && m_tracks.empty() && m_chapters.empty() && m_editions.empty() && m_attachments.empty();
183 m_attachments.clear();
192 return level() == other.
level() && m_tracks == other.m_tracks && m_chapters == other.m_chapters && m_editions == other.m_editions
193 && m_attachments == other.m_attachments;
208 #endif // TAG_PARSER_TAGTARGET_H
std::uint64_t level() const
Returns the level.
void setLevel(std::uint64_t level)
Sets the level.
const IdContainerType & tracks() const
Returns the tracks.
void setLevelName(const std::string &levelName)
Sets the level name.
const IdContainerType & editions() const
Returns the editions.
std::string toString(const std::function< TagTargetLevel(std::uint64_t)> &tagTargetMapping) const
Returns the string representation of the current instance.
TagTarget(std::uint64_t level=0, IdContainerType tracks=IdContainerType(), IdContainerType chapters=IdContainerType(), IdContainerType editions=IdContainerType(), IdContainerType attachments=IdContainerType())
Constructs a new TagTarget with the specified level, track, chapter, edition and attachment.
TagTargetLevel
The TagTargetLevel enum specifies tag target levels.
std::vector< IdType > IdContainerType
Contains all classes and functions of the TagInfo library.
constexpr bool operator==(std::uint8_t lhs, FlacMetaDataBlockType type)
const IdContainerType & chapters() const
Returns the chapters.
void clear()
Clears the TagTarget.
const TAG_PARSER_EXPORT char * tagTargetLevelName(TagTargetLevel tagTargetLevel)
Returns a string representation for the specified tagTargetLevel.
const std::string & levelName() const
Returns the level name.
const IdContainerType & attachments() const
Returns the attachments.
The TagTarget class specifies the target of a tag.
#define TAG_PARSER_EXPORT
Marks the symbol to be exported by the tagparser library.
bool operator==(const TagTarget &other) const
Returns whether the tag targets are equal.
bool isEmpty() const
Returns an indication whether the target is empty.