57 num_items(0), items(nullptr) {}
62 :duration(other.duration), has_playlist(other.has_playlist),
63 num_items(other.num_items), items(other.items) {
64 other.items =
nullptr;
78 duration = other.duration;
79 has_playlist = other.has_playlist;
89 std::swap(items, other.items);
90 std::swap(num_items, other.num_items);
98 return num_items == 0;
167 auto result = cursor++;
177 auto result = cursor--;
182 return cursor == other.cursor;
186 return cursor != other.cursor;
Tag & operator=(Tag &&other)
const_iterator begin() const
void Clear()
Clear everything, as if this was a new Tag object.
const_iterator & operator--()
const_iterator operator--(int)
constexpr const TagItem * operator->() const
TagItem ** items
an array of tag items
const_iterator end() const
The meta information about a song file.
unsigned short num_items
the total number of tag items in the items array
constexpr bool operator!=(const_iterator other) const
constexpr bool IsNegative() const
constexpr const TagItem & operator*() const
gcc_pure TagType tag_name_parse_i(const char *name) noexcept
Parse the string, and convert it into a TagType.
SignedSongTime duration
The duration of the song.
constexpr bool operator==(const_iterator other) const
~Tag()
Free the tag object and all its items.
bool has_playlist
Does this file have an embedded playlist (e.g.
static gcc_malloc Tag * Merge(const Tag &base, const Tag &add)
Merges the data from two tags.
Tag()
Create an empty tag.
TagType
Codes for the type of a tag item.
void MoveItemsFrom(Tag &&other)
Similar to the move operator, but move only the TagItem array.
gcc_pure bool HasType(TagType type) const noexcept
Checks whether the tag contains one or more items with the specified type.
gcc_pure TagType tag_name_parse(const char *name) noexcept
Parse the string, and convert it into a TagType.
const_iterator & operator++()
gcc_pure const char * GetValue(TagType type) const noexcept
Returns the first value of the specified tag type, or nullptr if none is present in this tag object...
A variant of SongTime that is based on a signed integer.
bool IsDefined() const
Returns true if the tag contains any information.
Tag & operator=(const Tag &other)=delete
static gcc_malloc Tag * MergeReplace(Tag *base, Tag *add)
Merges the data from two tags.
const_iterator operator++(int)
bool IsEmpty() const
Returns true if the tag contains no items.
const Partition const char * name