Tag Parser
9.4.0
C++ library for reading and writing MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags
|
Go to the documentation of this file. 1 #ifndef TAG_PARSER_TAGFIELD_H
2 #define TAG_PARSER_TAGFIELD_H
8 template <
class implementationType>
class TagField;
74 bool m_typeInfoAssigned;
76 std::vector<ImplementationType> m_nestedFields;
82 template <
class ImplementationType>
87 , m_typeInfoAssigned(false)
95 template <
class ImplementationType>
100 , m_typeInfoAssigned(false)
122 return ImplementationType::fieldIdToString(m_id);
170 m_value.clearDataAndMetadata();
186 m_typeInfo = typeInfo;
187 m_typeInfoAssigned =
true;
196 m_typeInfoAssigned =
false;
204 return m_typeInfoAssigned;
220 m_default = isDefault;
231 m_typeInfoAssigned =
false;
233 static_cast<ImplementationType *
>(
this)->reset();
244 return static_cast<ImplementationType *
>(
this)->isAdditionalTypeInfoUsed();
252 return m_nestedFields;
262 return m_nestedFields;
270 return static_cast<ImplementationType *
>(
this)->supportsNestedFields();
282 #endif // TAG_PARSER_TAGFIELD_H
const TypeInfoType & typeInfo() const
Returns the type info of the current TagField.
Defines traits for the specified ImplementationType.
void clear()
Clears id, value, type info, sets default flag to false and resets further implementation specific va...
void setTypeInfo(const TypeInfoType &typeInfo)
Sets the type info of the current TagField.
std::vector< ImplementationType > & nestedFields()
Returns the nested fields.
Contains all classes and functions of the TagInfo library.
const IdentifierType & id() const
Returns the id of the current TagField.
bool supportsNestedFields() const
Returns whether nested fields are supported by the implementation.
TagField()
Constructs an empty TagField.
The TagField class is used by FieldMapBasedTag to store the fields.
TagValue & value()
Returns the value of the current TagField.
bool isAdditionalTypeInfoUsed() const
Returns an indication whether the additional type info is used.
TagField(const IdentifierType &id, const TagValue &value)
Constructs a new TagField with the specified id and value.
The TagValue class wraps values of different types.
~TagField()
Destroys the TagField.
bool isTypeInfoAssigned() const
Returns an indication whether a type info is assigned.
#define TAG_PARSER_EXPORT
Marks the symbol to be exported by the tagparser library.
void clearId()
Clears the id of the current TagField.
const std::vector< ImplementationType > & nestedFields() const
Returns the nested fields.
void setId(const IdentifierType &id)
Sets the id of the current Tag Field.
void setDefault(bool isDefault)
Sets whether the field is labeled as default.
typename TagFieldTraits< Id3v2Frame >::TypeInfoType TypeInfoType
const TagValue & value() const
Returns the value of the current TagField.
bool isDefault() const
Returns an indication whether the field is labeled as default.
std::string idToString() const
typename TagFieldTraits< Id3v2Frame >::IdentifierType IdentifierType
void setValue(const TagValue &value)
Sets the value of the current TagField.
void clearValue()
Clears the value of the current TagField.
void removeTypeInfo()
Removes the type info from the current TagField.