Tag Parser 11.3.0
C++ library for reading and writing MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags
|
#include <tagvalue.h>
Public Member Functions | |
std::string | toString () const |
Returns the popularity as string in the format "rating" if only a rating is present or in the format "user|rating|play-counter" or an empty string if the popularity isEmpty(). More... | |
bool | isEmpty () const |
Returns whether the Popularity is empty. The scale and zero-values don't count. More... | |
bool | operator== (const Popularity &other) const |
Returns whether two instances are equal. More... | |
Static Public Member Functions | |
static Popularity | fromString (std::string_view str) |
Parses the popularity from str assuming the same format as toString() produces. More... | |
Public Attributes | |
std::string | user |
The user who gave the rating / played the file, e.g. identified by e-mail address. More... | |
double | rating = 0.0 |
The rating on a tag type specific scale. More... | |
std::uint64_t | playCounter = 0 |
Play counter specific to the user. More... | |
TagType | scale = TagType::Unspecified |
Specifies the scale used for rating by the tag defining that scale. More... | |
Definition at line 72 of file tagvalue.h.
|
static |
Parses the popularity from str assuming the same format as toString() produces.
Throws | ConversionException() if the format is invalid. |
Definition at line 1198 of file tagvalue.cpp.
|
inline |
Returns whether the Popularity is empty. The scale and zero-values don't count.
Definition at line 89 of file tagvalue.h.
|
inline |
Returns whether two instances are equal.
Definition at line 98 of file tagvalue.h.
std::string TagParser::Popularity::toString | ( | ) | const |
Returns the popularity as string in the format "rating" if only a rating is present or in the format "user|rating|play-counter" or an empty string if the popularity isEmpty().
Definition at line 1188 of file tagvalue.cpp.
std::uint64_t TagParser::Popularity::playCounter = 0 |
Play counter specific to the user.
Definition at line 78 of file tagvalue.h.
double TagParser::Popularity::rating = 0.0 |
The rating on a tag type specific scale.
Definition at line 76 of file tagvalue.h.
TagType TagParser::Popularity::scale = TagType::Unspecified |
Specifies the scale used for rating by the tag defining that scale.
Definition at line 83 of file tagvalue.h.
std::string TagParser::Popularity::user |
The user who gave the rating / played the file, e.g. identified by e-mail address.
Definition at line 74 of file tagvalue.h.