52 lines
1012 B
C++
52 lines
1012 B
C++
/**
|
|
* Copyright 2014 (c) Anna Schumaker.
|
|
*/
|
|
#ifndef OCARINA_CORE_TAGS_GENRE_H
|
|
#define OCARINA_CORE_TAGS_GENRE_H
|
|
|
|
#include <core/tags/generic.h>
|
|
|
|
/**
|
|
* The Genre tag is used to store the name of genres added
|
|
* to the tag database.
|
|
*/
|
|
class Genre : public GenericTag {
|
|
public:
|
|
Genre(); /**< Genre tag constructor. */
|
|
|
|
/**
|
|
* Genre tag constructor.
|
|
*
|
|
* @param name Genre name.
|
|
*/
|
|
Genre(const std::string &);
|
|
};
|
|
|
|
namespace tags
|
|
{
|
|
|
|
/** Called to read the genre_db from disk. */
|
|
void init_genre_db();
|
|
|
|
/**
|
|
* Called to look up a Genre tag by name. If no existing
|
|
* tag is found a new one will be created and returned to
|
|
* the caller.
|
|
*
|
|
* @param name The name of the genre.
|
|
* @return A matching Genre tag.
|
|
*/
|
|
Genre *get_genre(const std::string &);
|
|
|
|
/**
|
|
* Called to look up a Genre tag by tag index.
|
|
*
|
|
* @param index The index of the Genre tag.
|
|
* @return A matching Genre tag or NULL.
|
|
*/
|
|
Genre *get_genre(const unsigned int);
|
|
|
|
}
|
|
|
|
#endif /* OCARINA_CORE_TAGS_GENRE_H */
|