5#include <c++utilities/conversion/stringconversion.h>
19 switch (tagTargetLevel) {
23 return "subtrack, part, movement, scene";
25 return "track, song, chapter";
27 return "part, session";
29 return "album, opera, concert, movie, episode";
31 return "edition, issue, volume, opus, season, sequel";
35 return std::string_view();
62 auto levelString = std::string();
64 levelString +=
"level ";
65 levelString += numberToString(
level());
67 auto defaultLevelName = std::string_view();
69 if (!levelString.empty()) {
76 levelString += defaultLevelName;
81 if (levelString.empty()) {
82 parts.emplace_back(
"undefined target");
84 parts.emplace_back(std::move(levelString));
87 parts.emplace_back(
"track " + numberToString(v));
90 parts.emplace_back(
"chapter " + numberToString(v));
93 parts.emplace_back(
"edition " + numberToString(v));
96 parts.emplace_back(
"attachment " + numberToString(v));
98 return joinStrings(parts,
", ");
const IdContainerType & tracks() const
Returns the tracks.
const IdContainerType & chapters() const
Returns the chapters.
std::uint64_t level() const
Returns the level.
std::string toString(const std::function< TagTargetLevel(std::uint64_t)> &tagTargetMapping) const
Returns the string representation of the current instance.
const std::string & levelName() const
Returns the level name.
const IdContainerType & editions() const
Returns the editions.
const IdContainerType & attachments() const
Returns the attachments.
Contains all classes and functions of the TagInfo library.
TAG_PARSER_EXPORT std::string_view tagTargetLevelName(TagTargetLevel tagTargetLevel)
Returns a string representation for the specified tagTargetLevel.
TagTargetLevel
The TagTargetLevel enum specifies tag target levels.