Tag Parser 12.1.0
C++ library for reading and writing MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
TagParser::Id3Genres Class Reference

The Id3Genres class converts pre-defined ID3 genres to strings and vice versa. More...

#include <id3genres.h>

Static Public Member Functions

static std::string_view stringFromIndex (int index)
 Returns the genre name for the specified numerical denotation as C-style string.
 
static int indexFromString (std::string_view genre)
 Returns the numerical denotation of the specified genre or -1 if genre is unknown.
 
static constexpr int genreCount ()
 Returns the number of supported genres.
 
static constexpr int emptyGenreIndex ()
 Returns the preferred genre index to indicate that no genre is set at all.
 
static constexpr bool isEmptyGenre (int index)
 Returns whether the genre index indicates the genre field is not set at all.
 
static constexpr bool isIndexSupported (int index)
 Returns an indication whether the specified numerical denotation is supported by this class.
 

Detailed Description

The Id3Genres class converts pre-defined ID3 genres to strings and vice versa.

Definition at line 11 of file id3genres.h.

Member Function Documentation

◆ emptyGenreIndex()

constexpr int TagParser::Id3Genres::emptyGenreIndex ( )
staticconstexpr

Returns the preferred genre index to indicate that no genre is set at all.

Remarks
Apparently some files use 255 to indicate the genre information is missing although this is not explicitly specified on ID3.org.

Definition at line 45 of file id3genres.h.

◆ genreCount()

constexpr int TagParser::Id3Genres::genreCount ( )
staticconstexpr

Returns the number of supported genres.

Definition at line 35 of file id3genres.h.

◆ indexFromString()

int TagParser::Id3Genres::indexFromString ( std::string_view  genre)
static

Returns the numerical denotation of the specified genre or -1 if genre is unknown.

Remarks
If string is empty, the non-standard Id3Genres::emptyGenreIndex() is returned.

Definition at line 42 of file id3genres.cpp.

◆ isEmptyGenre()

constexpr bool TagParser::Id3Genres::isEmptyGenre ( int  index)
staticconstexpr

Returns whether the genre index indicates the genre field is not set at all.

Definition at line 53 of file id3genres.h.

◆ isIndexSupported()

constexpr bool TagParser::Id3Genres::isIndexSupported ( int  index)
staticconstexpr

Returns an indication whether the specified numerical denotation is supported by this class.

Definition at line 62 of file id3genres.h.

◆ stringFromIndex()

std::string_view TagParser::Id3Genres::stringFromIndex ( int  index)
inlinestatic

Returns the genre name for the specified numerical denotation as C-style string.

Definition at line 27 of file id3genres.h.


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