Tag Parser 12.3.1
C++ library for reading and writing MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags
|
The VorbisCommentField class is used by VorbisComment to store the fields. More...
#include <vorbiscommentfield.h>
Public Member Functions | |
VorbisCommentField () | |
Constructs a new Vorbis comment field. | |
VorbisCommentField (const IdentifierType &id, const TagValue &value) | |
Constructs a new Vorbis comment with the specified id and value. | |
void | parse (OggIterator &iterator, Diagnostics &diag) |
Parses a field using the specified iterator. | |
void | parse (OggIterator &iterator, std::uint64_t &maxSize, Diagnostics &diag) |
Parses a field using the specified iterator. | |
void | parse (std::istream &stream, std::uint64_t &maxSize, Diagnostics &diag) |
Parses a field from the specified stream. | |
bool | make (CppUtilities::BinaryWriter &writer, VorbisCommentFlags flags, Diagnostics &diag) |
Writes the field to a stream using the specified writer. | |
bool | isAdditionalTypeInfoUsed () const |
Returns whether the additional type info is used. | |
bool | supportsNestedFields () const |
Returns whether nested fields are supported. | |
Public Member Functions inherited from TagParser::TagField< VorbisCommentField > | |
TagField () | |
Constructs an empty TagField. | |
TagField (const IdentifierType &id, const TagValue &value) | |
Constructs a new TagField with the specified id and value. | |
~TagField () | |
Destroys the TagField. | |
IdentifierType & | id () |
Returns the id of the current TagField. | |
const IdentifierType & | id () const |
Returns the id of the current TagField. | |
std::string | idToString () const |
Returns the id of the current TagField as string. | |
void | setId (const IdentifierType &id) |
Sets the id of the current Tag Field. | |
void | clearId () |
Clears the id of the current TagField. | |
TagValue & | value () |
Returns the value of the current TagField. | |
const TagValue & | value () const |
Returns the value of the current TagField. | |
void | setValue (const TagValue &value) |
Sets the value of the current TagField. | |
void | clearValue () |
Clears the value of the current TagField. | |
const TypeInfoType & | typeInfo () const |
Returns the type info of the current TagField. | |
void | setTypeInfo (const TypeInfoType &typeInfo) |
Sets the type info of the current TagField. | |
void | removeTypeInfo () |
Removes the type info from the current TagField. | |
bool | isTypeInfoAssigned () const |
Returns an indication whether a type info is assigned. | |
bool | isDefault () const |
Returns an indication whether the field is labeled as default. | |
void | setDefault (bool isDefault) |
Sets whether the field is labeled as default. | |
void | clear () |
Clears id, value, type info, sets default flag to false and resets further implementation specific values. | |
bool | isAdditionalTypeInfoUsed () const |
Returns an indication whether the additional type info is used. | |
const std::vector< VorbisCommentField > & | nestedFields () const |
Returns the nested fields. | |
std::vector< VorbisCommentField > & | nestedFields () |
Returns the nested fields. | |
bool | supportsNestedFields () const |
Returns whether nested fields are supported by the implementation. | |
Static Public Member Functions | |
static std::string | fieldIdFromString (std::string_view idString) |
Converts the specified ID string representation to an actual ID. | |
static std::string | fieldIdToString (const std::string &id) |
Returns the string representation for the specified id. | |
Friends | |
class | TagField< VorbisCommentField > |
Additional Inherited Members | |
Public Types inherited from TagParser::TagField< VorbisCommentField > | |
using | IdentifierType |
using | TypeInfoType |
Protected Member Functions inherited from TagParser::TagField< VorbisCommentField > | |
void | internallyClearValue () |
Clears the assigned value; called via clearValue() and clear(). | |
void | internallyClearFurtherData () |
Clears further data; called via clear(). | |
The VorbisCommentField class is used by VorbisComment to store the fields.
TagParser::VorbisCommentField::VorbisCommentField | ( | ) |
Constructs a new Vorbis comment field.
Definition at line 33 of file vorbiscommentfield.cpp.
TagParser::VorbisCommentField::VorbisCommentField | ( | const IdentifierType & | id, |
const TagValue & | value ) |
Constructs a new Vorbis comment with the specified id and value.
Definition at line 40 of file vorbiscommentfield.cpp.
|
inlinestatic |
Converts the specified ID string representation to an actual ID.
Definition at line 87 of file vorbiscommentfield.h.
|
inlinestatic |
Returns the string representation for the specified id.
Definition at line 96 of file vorbiscommentfield.h.
|
inline |
Returns whether the additional type info is used.
Definition at line 70 of file vorbiscommentfield.h.
bool TagParser::VorbisCommentField::make | ( | CppUtilities::BinaryWriter & | writer, |
VorbisCommentFlags | flags, | ||
Diagnostics & | diag ) |
Writes the field to a stream using the specified writer.
Throws | std::ios_base::failure when an IO error occurs. |
Throws | TagParser::Failure or a derived exception when a making error occurs. |
Definition at line 178 of file vorbiscommentfield.cpp.
void TagParser::VorbisCommentField::parse | ( | OggIterator & | iterator, |
Diagnostics & | diag ) |
Parses a field using the specified iterator.
The currentCharacterOffset() of the iterator is expected to be at the beginning of the field to be parsed.
Throws | std::ios_base::failure when an IO error occurs. |
Throws | TagParser::Failure or a derived exception when a parsing error occurs. |
Definition at line 133 of file vorbiscommentfield.cpp.
void TagParser::VorbisCommentField::parse | ( | OggIterator & | iterator, |
std::uint64_t & | maxSize, | ||
Diagnostics & | diag ) |
Parses a field using the specified iterator.
The currentCharacterOffset() of the iterator is expected to be at the beginning of the field to be parsed.
Throws | std::ios_base::failure when an IO error occurs. |
Throws | TagParser::Failure or a derived exception when a parsing error occurs. |
Definition at line 149 of file vorbiscommentfield.cpp.
void TagParser::VorbisCommentField::parse | ( | std::istream & | stream, |
std::uint64_t & | maxSize, | ||
Diagnostics & | diag ) |
Parses a field from the specified stream.
The position of the current character in the input stream is expected to be at the beginning of the field to be parsed.
Throws | std::ios_base::failure when an IO error occurs. |
Throws | TagParser::Failure or a derived exception when a parsing error occurs. |
Definition at line 164 of file vorbiscommentfield.cpp.
|
inline |
Returns whether nested fields are supported.
Definition at line 78 of file vorbiscommentfield.h.
|
friend |
Definition at line 96 of file vorbiscommentfield.h.