TagLib API Documentation
Public Member Functions | List of all members
TagLib::Mod::Tag Class Reference

A module file tag implementation. More...

#include <modtag.h>

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

Public Member Functions

 Tag ()
 
 ~Tag () override
 
 Tag (const Tag &)=delete
 
Tagoperator= (const Tag &)=delete
 
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
 
String trackerName () const
 
void setTitle (const String &title) override
 
void setArtist (const String &artist) override
 
void setAlbum (const String &album) override
 
void setComment (const String &comment) override
 
void setGenre (const String &genre) override
 
void setYear (unsigned int year) override
 
void setTrack (unsigned int track) override
 
void setTrackerName (const String &trackerName)
 
PropertyMap properties () const override
 
PropertyMap setProperties (const PropertyMap &) override
 
- Public Member Functions inherited from TagLib::Tag
virtual ~Tag ()
 
 Tag (const Tag &)=delete
 
Tagoperator= (const Tag &)=delete
 
virtual PropertyMap properties () const
 
virtual void removeUnsupportedProperties (const StringList &properties)
 
virtual PropertyMap setProperties (const PropertyMap &origProps)
 
virtual StringList complexPropertyKeys () const
 
virtual List< VariantMapcomplexProperties (const String &key) const
 
virtual bool setComplexProperties (const String &key, const List< VariantMap > &value)
 
virtual String title () const =0
 
virtual String artist () const =0
 
virtual String album () const =0
 
virtual String comment () const =0
 
virtual String genre () const =0
 
virtual unsigned int year () const =0
 
virtual unsigned int track () const =0
 
virtual void setTitle (const String &s)=0
 
virtual void setArtist (const String &s)=0
 
virtual void setAlbum (const String &s)=0
 
virtual void setComment (const String &s)=0
 
virtual void setGenre (const String &s)=0
 
virtual void setYear (unsigned int i)=0
 
virtual void setTrack (unsigned int i)=0
 
virtual bool isEmpty () const
 

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

A module file tag implementation.

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

◆ Tag() [1/2]

TagLib::Mod::Tag::Tag ( )

◆ ~Tag()

TagLib::Mod::Tag::~Tag ( )
overridevirtual

Destroys this Tag instance.

Reimplemented from TagLib::Tag.

◆ Tag() [2/2]

TagLib::Mod::Tag::Tag ( const Tag )
delete

Member Function Documentation

◆ album()

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

Not supported by module files. Therefore always returns an empty string.

Implements TagLib::Tag.

◆ artist()

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

Not supported by module files. Therefore always returns an empty string.

Implements TagLib::Tag.

◆ comment()

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

Returns the track comment derived from the instrument/sample/pattern names; if no comment is present in the tag an empty string will be returned.

Implements TagLib::Tag.

◆ genre()

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

Not supported by module files. Therefore always returns an empty string.

Implements TagLib::Tag.

◆ operator=()

Tag & TagLib::Mod::Tag::operator= ( const Tag )
delete

◆ properties()

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

Implements the unified property interface – export function. Since the module tag is very limited, the exported map is as well.

Reimplemented from TagLib::Tag.

◆ setAlbum()

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

Not supported by module files and therefore ignored.

Implements TagLib::Tag.

◆ setArtist()

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

Not supported by module files and therefore ignored.

Implements TagLib::Tag.

◆ setComment()

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

Sets the comment to comment. If comment is an empty string 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 and 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.

◆ setGenre()

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

Not supported by module files and therefore ignored.

Implements TagLib::Tag.

◆ setProperties()

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

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.

Reimplemented from TagLib::Tag.

◆ setTitle()

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

Sets the title to title. If title is an empty string 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.

◆ setTrack()

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

Not supported by module files and therefore ignored.

Implements TagLib::Tag.

◆ setTrackerName()

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

Sets the tracker name to trackerName. If trackerName is an empty string 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).

◆ setYear()

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

Not supported by module files and therefore ignored.

Implements TagLib::Tag.

◆ title()

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

◆ track()

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

Not supported by module files. Therefore always returns 0.

Implements TagLib::Tag.

◆ trackerName()

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 tracker name.

◆ year()

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

Not supported by module files. Therefore always returns 0.

Implements TagLib::Tag.


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