1#ifndef TAG_PARSER_ID3V1TAG_H
2#define TAG_PARSER_ID3V1TAG_H
15 static constexpr std::string_view
tagName =
"ID3v1 tag";
17 std::string_view
typeName()
const override;
32 void readValue(
TagValue &
value, std::size_t maxLength,
const char *buffer);
33 void writeValue(
const TagValue &
value, std::size_t length,
char *buffer, std::ostream &targetStream,
Diagnostics &diag);
The Diagnostics class is a container for DiagMessage.
Id3v1Tag()
Constructs a new tag.
void make(std::ostream &targetStream, Diagnostics &diag)
Writes tag information to the specified stream.
void ensureTextValuesAreProperlyEncoded() override
Ensures the encoding of all assigned text values is supported by the tag by converting the character ...
std::size_t fieldCount() const override
Returns the number of present fields.
bool canEncodingBeUsed(TagTextEncoding encoding) const override
Returns only true for TagTextEncoding::Latin1.
bool hasField(KnownField field) const override
Returns an indication whether the specified field is present.
const TagValue & value(KnownField value) const override
Returns the value of the specified field.
bool supportsField(KnownField field) const override
Returns an indication whether the specified field is supported by the tag.
void removeAllFields() override
Removes all fields from the tag.
static constexpr TagType tagType
bool setValueConsideringTypeInfo(KnownField field, const TagValue &value, const std::string &typeInfo)
static constexpr std::string_view tagName
TagType type() const override
Returns the type of the tag as TagParser::TagType.
std::string_view typeName() const override
Returns the type name of the tag as C-style string.
bool setValue(KnownField field, const TagValue &value) override
Assigns the given value to the specified field.
void parse(std::istream &sourceStream, Diagnostics &diag)
Parses tag information from the specified stream.
The TagValue class wraps values of different types.
Tag()
Constructs a new Tag.
#define TAG_PARSER_EXPORT
Marks the symbol to be exported by the tagparser library.
Contains all classes and functions of the TagInfo library.
KnownField
Specifies the field.
TagTextEncoding
Specifies the text encoding.
TagType
Specifies the tag type.