TagLib 1.10 (TagLib: TagLib::MP4::Tag Class Reference)

TagLib::MP4::Tag Class Reference

#include <mp4tag.h>

Inheritance diagram for TagLib::MP4::Tag:
Collaboration diagram for TagLib::MP4::Tag:

List of all members.

Public Member Functions

 Tag ()
 Tag (TagLib::File *file, Atoms *atoms)
 ~Tag ()
bool save ()
String title () const
String artist () const
String album () const
String comment () const
String genre () const
uint year () const
uint track () const
void setTitle (const String &value)
void setArtist (const String &value)
void setAlbum (const String &value)
void setComment (const String &value)
void setGenre (const String &value)
void setYear (uint value)
void setTrack (uint value)
virtual bool isEmpty () const
ItemMapitemListMap ()
const ItemMapitemMap () const
Item item (const String &key) const
void setItem (const String &key, const Item &value)
void removeItem (const String &key)
bool contains (const String &key) const
PropertyMap properties () const
void removeUnsupportedProperties (const StringList &properties)
PropertyMap setProperties (const PropertyMap &properties)

Constructor & Destructor Documentation

TagLib::MP4::Tag::Tag ( )

Construct a Tag. This is protected since tags should only be instantiated through subclasses.

Reimplemented from TagLib::Tag.

TagLib::MP4::Tag::Tag ( TagLib::File file,
Atoms *  atoms 
)
TagLib::MP4::Tag::~Tag ( ) [virtual]

Destroys this Tag instance.

Reimplemented from TagLib::Tag.


Member Function Documentation

String TagLib::MP4::Tag::album ( ) const [virtual]

Returns the album name; if no album name is present in the tag String::null will be returned.

Implements TagLib::Tag.

String TagLib::MP4::Tag::artist ( ) const [virtual]

Returns the artist name; if no artist name is present in the tag String::null will be returned.

Implements TagLib::Tag.

String TagLib::MP4::Tag::comment ( ) const [virtual]

Returns the track comment; if no comment is present in the tag String::null will be returned.

Implements TagLib::Tag.

bool TagLib::MP4::Tag::contains ( const String key) const
Returns:
True if the tag contains an entry for key.
String TagLib::MP4::Tag::genre ( ) const [virtual]

Returns the genre name; if no genre is present in the tag String::null will be returned.

Implements TagLib::Tag.

virtual bool TagLib::MP4::Tag::isEmpty ( ) const [virtual]

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.

Item TagLib::MP4::Tag::item ( const String key) const
Returns:
The item, if any, corresponding to key.
ItemMap& TagLib::MP4::Tag::itemListMap ( )
const ItemMap& TagLib::MP4::Tag::itemMap ( ) const

Returns a string-keyed map of the MP4::Items for this tag.

PropertyMap TagLib::MP4::Tag::properties ( ) const

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.

void TagLib::MP4::Tag::removeItem ( const String key)

Removes the entry with key from the tag, or does nothing if it does not exist.

void TagLib::MP4::Tag::removeUnsupportedProperties ( const StringList properties)

Removes unsupported properties, or a subset of them, from the tag. The parameter properties must contain only entries from properties().unsupportedData(). BIC: Will become virtual in future releases. Currently the non-virtual standard implementation of TagLib::Tag does nothing, since there are no unsupported elements.

Reimplemented from TagLib::Tag.

bool TagLib::MP4::Tag::save ( )
void TagLib::MP4::Tag::setAlbum ( const String s) [virtual]

Sets the album to s. If s is String::null then this value will be cleared.

Implements TagLib::Tag.

void TagLib::MP4::Tag::setArtist ( const String s) [virtual]

Sets the artist to s. If s is String::null then this value will be cleared.

Implements TagLib::Tag.

void TagLib::MP4::Tag::setComment ( const String s) [virtual]

Sets the comment to s. If s is String::null then this value will be cleared.

Implements TagLib::Tag.

void TagLib::MP4::Tag::setGenre ( const String s) [virtual]

Sets the genre to s. If s is String::null 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.

void TagLib::MP4::Tag::setItem ( const String key,
const Item value 
)

Sets the value of key to value, overwriting any previous value.

PropertyMap TagLib::MP4::Tag::setProperties ( const PropertyMap properties)

Sets the tags of this File to those specified in properties. 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.

void TagLib::MP4::Tag::setTitle ( const String s) [virtual]

Sets the title to s. If s is String::null then this value will be cleared.

Implements TagLib::Tag.

void TagLib::MP4::Tag::setTrack ( uint  i) [virtual]

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

Implements TagLib::Tag.

void TagLib::MP4::Tag::setYear ( uint  i) [virtual]

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

Implements TagLib::Tag.

String TagLib::MP4::Tag::title ( ) const [virtual]

Returns the track name; if no track name is present in the tag String::null will be returned.

Implements TagLib::Tag.

uint TagLib::MP4::Tag::track ( ) const [virtual]

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

Implements TagLib::Tag.

uint TagLib::MP4::Tag::year ( ) const [virtual]

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

Implements TagLib::Tag.


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