1 #ifndef TAG_PARSER_TAGTARGET_H 2 #define TAG_PARSER_TAGTARGET_H 6 #include <c++utilities/conversion/types.h> 30 void setLevel(uint64 level);
31 const std::string &levelName()
const;
32 void setLevelName(
const std::string &levelName);
43 std::string toString(
const std::function<
TagTargetLevel(uint64)> &tagTargetMapping)
const;
49 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 void clear()
Clears the TagTarget.
std::string toString(const std::function< TagTargetLevel(uint64)> &tagTargetMapping) const
Returns the string representation of the current instance.
TagTargetLevel
The TagTargetLevel enum specifies tag target levels.
const IdContainerType & attachments() const
Returns the attachments.
bool operator==(const TagTarget &other) const
Returns whether the tag targets are equal.
uint64 level() const
Returns the level.
std::vector< IdType > IdContainerType
constexpr bool operator==(byte lhs, FlacMetaDataBlockType type)
TAG_PARSER_EXPORT const char * tagTargetLevelName(TagTargetLevel tagTargetLevel)
Returns a string representation for the specified tagTargetLevel.
bool isEmpty() const
Returns an indication whether the target is empty.
TagTarget(uint64 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.
void setLevel(uint64 level)
Sets the level.
const IdContainerType & tracks() const
Returns the tracks.
void setLevelName(const std::string &levelName)
Sets the level name.
const std::string & levelName() const
Returns the level name.
const IdContainerType & editions() const
Returns the editions.
const IdContainerType & chapters() const
Returns the chapters.
#define TAG_PARSER_EXPORT
Marks the symbol to be exported by the tagparser library.