TagLib  2.2.1
TagLib::Matroska::Tag Class Reference

Matroska tag implementation. More...

#include <matroskatag.h>

Inheritance diagram for TagLib::Matroska::Tag:
[legend]
Collaboration diagram for TagLib::Matroska::Tag:
[legend]

Public Member Functions

 Tag ()
 ~Tag () override
String title () const override
String artist () const override
String album () const override
String comment () const override
String genre () const override
unsigned int year () const override
unsigned int track () const override
void setTitle (const String &s) override
void setArtist (const String &s) override
void setAlbum (const String &s) override
void setComment (const String &s) override
void setGenre (const String &s) override
void setYear (unsigned int i) override
void setTrack (unsigned int i) override
bool isEmpty () const override
PropertyMap properties () const override
PropertyMap setProperties (const PropertyMap &propertyMap) override
void removeUnsupportedProperties (const StringList &properties) override
StringList complexPropertyKeys () const override
List< VariantMapcomplexProperties (const String &key) const override
bool setComplexProperties (const String &key, const List< VariantMap > &value) override
void addSimpleTag (const SimpleTag &tag)
void addSimpleTags (const SimpleTagsList &simpleTags)
void insertSimpleTag (unsigned int index, const SimpleTag &tag)
void removeSimpleTag (unsigned int index)
void removeSimpleTag (const String &name, SimpleTag::TargetTypeValue targetTypeValue, unsigned long long trackUid=0)
void removeSimpleTag (const String &name, SimpleTag::TargetTypeValue targetTypeValue, unsigned long long trackUid, unsigned long long editionUid, unsigned long long chapterUid=0, unsigned long long attachmentUid=0)
void clearSimpleTags ()
const SimpleTagsListsimpleTagsList () const
Public Member Functions inherited from TagLib::Tag
 Tag (const Tag &)=delete
Tagoperator= (const Tag &)=delete

Friends

class File
class EBML::MkTags

Additional Inherited Members

Static Public Member Functions inherited from TagLib::Tag
static void duplicate (const Tag *source, Tag *target, bool overwrite=true)
static String joinTagValues (const StringList &values)
Protected Member Functions inherited from TagLib::Tag
 Tag ()

Detailed Description

Matroska tag implementation.

Constructor & Destructor Documentation

◆ Tag()

TagLib::Matroska::Tag::Tag ( )

Constructs a Matroska tag.

◆ ~Tag()

TagLib::Matroska::Tag::~Tag ( )
overridevirtual

Destroys this Tag instance.

Reimplemented from TagLib::Tag.

Member Function Documentation

◆ addSimpleTag()

void TagLib::Matroska::Tag::addSimpleTag ( const SimpleTag & tag)

Add a tag attribute.

◆ addSimpleTags()

void TagLib::Matroska::Tag::addSimpleTags ( const SimpleTagsList & simpleTags)

Add multiple tag attributes.

◆ album()

String TagLib::Matroska::Tag::album ( ) const
overridevirtual

Returns the album name; if no album name is present in the tag an empty string will be returned.

Implements TagLib::Tag.

◆ artist()

String TagLib::Matroska::Tag::artist ( ) const
overridevirtual

Returns the artist name; if no artist name is present in the tag an empty string will be returned.

Implements TagLib::Tag.

◆ clearSimpleTags()

void TagLib::Matroska::Tag::clearSimpleTags ( )

Remove all tag attributes.

◆ comment()

String TagLib::Matroska::Tag::comment ( ) const
overridevirtual

Returns the track comment; if no comment is present in the tag an empty string will be returned.

Implements TagLib::Tag.

◆ complexProperties()

List< VariantMap > TagLib::Matroska::Tag::complexProperties ( const String & key) const
overridevirtual

Get the binary simple tags as maps with keys "data", "name", "targetTypeValue", "language", "defaultLanguage". The attached files such as pictures with key "PICTURE" are available with Matroska::File::complexProperties().

Reimplemented from TagLib::Tag.

◆ complexPropertyKeys()

StringList TagLib::Matroska::Tag::complexPropertyKeys ( ) const
overridevirtual

Returns the names of the binary simple tags.

Reimplemented from TagLib::Tag.

◆ genre()

String TagLib::Matroska::Tag::genre ( ) const
overridevirtual

Returns the genre name; if no genre is present in the tag an empty string will be returned.

Implements TagLib::Tag.

◆ insertSimpleTag()

void TagLib::Matroska::Tag::insertSimpleTag ( unsigned int index,
const SimpleTag & tag )

Insert a tag attribute at position index.

◆ isEmpty()

bool TagLib::Matroska::Tag::isEmpty ( ) const
overridevirtual

Returns true if the tag does not contain any data. This should be reimplemented in subclasses that provide more than the basic tagging abilities in this class.

Reimplemented from TagLib::Tag.

◆ properties()

PropertyMap TagLib::Matroska::Tag::properties ( ) const
overridevirtual

Exports the tags of the file as dictionary mapping (human readable) tag names (Strings) to StringLists of tag values. The default implementation in this class considers only the usual built-in tags (artist, album, ...) and only one value per key.

Reimplemented from TagLib::Tag.

Referenced by removeUnsupportedProperties().

◆ removeSimpleTag() [1/3]

void TagLib::Matroska::Tag::removeSimpleTag ( const String & name,
SimpleTag::TargetTypeValue targetTypeValue,
unsigned long long trackUid,
unsigned long long editionUid,
unsigned long long chapterUid = 0,
unsigned long long attachmentUid = 0 )

Remove a tag attribute.

◆ removeSimpleTag() [2/3]

void TagLib::Matroska::Tag::removeSimpleTag ( const String & name,
SimpleTag::TargetTypeValue targetTypeValue,
unsigned long long trackUid = 0 )

Remove a tag attribute.

◆ removeSimpleTag() [3/3]

void TagLib::Matroska::Tag::removeSimpleTag ( unsigned int index)

Remove a tag attribute at position index.

◆ removeUnsupportedProperties()

void TagLib::Matroska::Tag::removeUnsupportedProperties ( const StringList & properties)
overridevirtual

Removes unsupported properties, or a subset of them, from the tag. The parameter properties must contain only entries from properties().unsupportedData().

Reimplemented from TagLib::Tag.

References properties().

◆ setAlbum()

void TagLib::Matroska::Tag::setAlbum ( const String & s)
overridevirtual

Sets the album to s. If s is an empty string then this value will be cleared.

Implements TagLib::Tag.

◆ setArtist()

void TagLib::Matroska::Tag::setArtist ( const String & s)
overridevirtual

Sets the artist to s. If s is an empty string then this value will be cleared.

Implements TagLib::Tag.

◆ setComment()

void TagLib::Matroska::Tag::setComment ( const String & s)
overridevirtual

Sets the comment to s. If s is an empty string then this value will be cleared.

Implements TagLib::Tag.

◆ setComplexProperties()

bool TagLib::Matroska::Tag::setComplexProperties ( const String & key,
const List< VariantMap > & value )
overridevirtual

Set the binary simple tags as maps with keys "data", "name", "targetTypeValue", "language", "defaultLanguage". The attached files such as pictures with key "PICTURE" can be set with Matroska::File::setComplexProperties().

Returns true if key can be stored as binary simple tags.

Reimplemented from TagLib::Tag.

◆ setGenre()

void TagLib::Matroska::Tag::setGenre ( const String & s)
overridevirtual

Sets the genre to s. If s is an empty string then this value will be cleared. For tag formats that use a fixed set of genres, the appropriate value will be selected based on a string comparison. A list of available genres for those formats should be available in that type's implementation.

Implements TagLib::Tag.

◆ setProperties()

PropertyMap TagLib::Matroska::Tag::setProperties ( const PropertyMap & origProps)
overridevirtual

Sets the tags of this File to those specified in origProps. This default implementation sets only the tags for which setter methods exist in this class (artist, album, ...), and only one value per key; the rest will be contained in the returned PropertyMap.

Reimplemented from TagLib::Tag.

◆ setTitle()

void TagLib::Matroska::Tag::setTitle ( const String & s)
overridevirtual

Sets the title to s. If s is an empty string then this value will be cleared.

Implements TagLib::Tag.

◆ setTrack()

void TagLib::Matroska::Tag::setTrack ( unsigned int i)
overridevirtual

Sets the track to i. If s is 0 then this value will be cleared.

Implements TagLib::Tag.

◆ setYear()

void TagLib::Matroska::Tag::setYear ( unsigned int i)
overridevirtual

Sets the year to i. If s is 0 then this value will be cleared.

Implements TagLib::Tag.

◆ simpleTagsList()

const SimpleTagsList & TagLib::Matroska::Tag::simpleTagsList ( ) const

Get list of all tag attributes.

◆ title()

String TagLib::Matroska::Tag::title ( ) const
overridevirtual

Returns the track name; if no track name is present in the tag an empty string will be returned.

Implements TagLib::Tag.

Referenced by EBML::MkTags.

◆ track()

unsigned int TagLib::Matroska::Tag::track ( ) const
overridevirtual

Returns the track number; if there is no track number set, this will return 0.

Implements TagLib::Tag.

◆ year()

unsigned int TagLib::Matroska::Tag::year ( ) const
overridevirtual

Returns the year; if there is no year set, this will return 0.

Implements TagLib::Tag.

◆ EBML::MkTags

friend class EBML::MkTags
friend

◆ File

friend class File
friend

References File.

Referenced by File.


The documentation for this class was generated from the following file: