Miam-Player  0.8.0
A nice music player
TagLib::Mod::Tag Class Reference

Tags for module files (Mod, S3M, IT, XM). More...

#include <modtag.h>

Inheritance diagram for TagLib::Mod::Tag:
TagLib::Tag

Public Member Functions

 Tag ()
 
virtual ~Tag ()
 Destroys this Tag instance. More...
 
virtual String title () const
 Returns the track name; if no track name is present in the tag String::null will be returned. More...
 
virtual String artist () const
 Not supported by module files. More...
 
virtual String album () const
 Not supported by module files. More...
 
virtual String comment () const
 Returns the track comment derived from the instrument/sample/pattern names; if no comment is present in the tag String::null will be returned. More...
 
virtual String genre () const
 Not supported by module files. More...
 
virtual unsigned int year () const
 Not supported by module files. More...
 
virtual unsigned int track () const
 Not supported by module files. More...
 
String trackerName () const
 Returns the name of the tracker used to create/edit the module file. More...
 
virtual void setTitle (const String &title)
 Sets the title to title. More...
 
virtual void setArtist (const String &artist)
 Not supported by module files and therefore ignored. More...
 
virtual void setAlbum (const String &album)
 Not supported by module files and therefore ignored. More...
 
virtual void setComment (const String &comment)
 Sets the comment to comment. More...
 
virtual void setGenre (const String &genre)
 Not supported by module files and therefore ignored. More...
 
virtual void setYear (unsigned int year)
 Not supported by module files and therefore ignored. More...
 
virtual void setTrack (unsigned int track)
 Not supported by module files and therefore ignored. More...
 
void setTrackerName (const String &trackerName)
 Sets the tracker name to trackerName. More...
 
PropertyMap properties () const
 Implements the unified property interface – export function. More...
 
PropertyMap setProperties (const PropertyMap &)
 Implements the unified property interface – import function. More...
 
- Public Member Functions inherited from TagLib::Tag
PropertyMap properties () const
 Exports the tags of the file as dictionary mapping (human readable) tag names (Strings) to StringLists of tag values. More...
 
void removeUnsupportedProperties (const StringList &properties)
 Removes unsupported properties, or a subset of them, from the tag. More...
 
PropertyMap setProperties (const PropertyMap &properties)
 Sets the tags of this File to those specified in properties. More...
 
virtual bool isEmpty () const
 Returns true if the tag does not contain any data. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from TagLib::Tag
static void duplicate (const Tag *source, Tag *target, bool overwrite=true)
 Copies the generic data from one tag to another. More...
 
- Protected Member Functions inherited from TagLib::Tag
 Tag ()
 Construct a Tag. More...
 

Detailed Description

Tags for module files (Mod, S3M, IT, XM).

Note that only the title is supported as such by most module file formats. Except for XM files the trackerName is derived from the file format or the flavour of the file format. For XM files it is stored in the file.

The comment tag is not strictly supported by module files, but it is common practice to abuse instrument/sample/pattern names as multiline comments. TagLib does so as well.

Constructor & Destructor Documentation

TagLib::Mod::Tag::Tag ( )
virtual TagLib::Mod::Tag::~Tag ( )
virtual

Destroys this Tag instance.

Reimplemented from TagLib::Tag.

Member Function Documentation

virtual String TagLib::Mod::Tag::album ( ) const
virtual

Not supported by module files.

Therefore always returns String::null.

Implements TagLib::Tag.

virtual String TagLib::Mod::Tag::artist ( ) const
virtual

Not supported by module files.

Therefore always returns String::null.

Implements TagLib::Tag.

virtual String TagLib::Mod::Tag::comment ( ) const
virtual

Returns the track comment derived from the instrument/sample/pattern names; if no comment is present in the tag String::null will be returned.

Implements TagLib::Tag.

virtual String TagLib::Mod::Tag::genre ( ) const
virtual

Not supported by module files.

Therefore always returns String::null.

Implements TagLib::Tag.

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

Implements the unified property interface – export function.

Since the module tag is very limited, the exported map is as well.

virtual void TagLib::Mod::Tag::setAlbum ( const String album)
virtual

Not supported by module files and therefore ignored.

Implements TagLib::Tag.

virtual void TagLib::Mod::Tag::setArtist ( const String artist)
virtual

Not supported by module files and therefore ignored.

Implements TagLib::Tag.

virtual void TagLib::Mod::Tag::setComment ( const String comment)
virtual

Sets the comment to comment.

If comment is String::null then this value will be cleared.

Note that module file formats don't actually support a comment tag. Instead the names of instruments/patterns/samples are abused as a multiline comment. Because of this the number of lines in a module file is fixed to the number of instruments/patterns/samples.

Also note that the instrument/pattern/sample name length is limited an thus the line length in comments are limited. Too big comments will be truncated.

The line length limits per file type are (1 character = 1 byte): Mod 22 characters, S3M 27 characters, IT 25 characters and XM 22 characters.

Implements TagLib::Tag.

virtual void TagLib::Mod::Tag::setGenre ( const String genre)
virtual

Not supported by module files and therefore ignored.

Implements TagLib::Tag.

PropertyMap TagLib::Mod::Tag::setProperties ( const PropertyMap )

Implements the unified property interface – import function.

Because of the limitations of the module file tag, any tags besides COMMENT, TITLE and, if it is an XM file, TRACKERNAME, will be returned. Additionally, if the map contains tags with multiple values, all but the first will be contained in the returned map of unsupported properties.

virtual void TagLib::Mod::Tag::setTitle ( const String title)
virtual

Sets the title to title.

If title is String::null then this value will be cleared.

The length limits per file type are (1 character = 1 byte): Mod 20 characters, S3M 27 characters, IT 25 characters and XM 20 characters.

Implements TagLib::Tag.

virtual void TagLib::Mod::Tag::setTrack ( unsigned int  track)
virtual

Not supported by module files and therefore ignored.

Implements TagLib::Tag.

void TagLib::Mod::Tag::setTrackerName ( const String trackerName)

Sets the tracker name to trackerName.

If trackerName is String::null then this value will be cleared.

Note that only XM files support this tag. Setting the tracker name for other module file formats will be ignored.

The length of this tag is limited to 20 characters (1 character = 1 byte).

virtual void TagLib::Mod::Tag::setYear ( unsigned int  year)
virtual

Not supported by module files and therefore ignored.

Implements TagLib::Tag.

virtual String TagLib::Mod::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.

virtual unsigned int TagLib::Mod::Tag::track ( ) const
virtual

Not supported by module files.

Therefore always returns 0.

Implements TagLib::Tag.

String TagLib::Mod::Tag::trackerName ( ) const

Returns the name of the tracker used to create/edit the module file.

Only XM files store this tag to the file as such, for other formats (Mod, S3M, IT) this is derived from the file type or the flavour of the file type. Therefore only XM files might have an empty (String::null) tracker name.

virtual unsigned int TagLib::Mod::Tag::year ( ) const
virtual

Not supported by module files.

Therefore always returns 0.

Implements TagLib::Tag.


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