ocarina/include/core/tags/artist.h

59 lines
1.1 KiB
C
Raw Normal View History

/**
* @file
* Copyright 2014 (c) Anna Schumaker.
*/
#ifndef OCARINA_CORE_TAGS_ARTIST_H
#define OCARINA_CORE_TAGS_ARTIST_H
#include <core/database.h>
/**
* The Artist tag is used to store the name of artists added
* to the tag database.
*
* When writing an Artist tag to disk, only the artist name
* needs to be written.
*
* ... << name1
* ... << name2
* ... << name3
*/
class Artist : public DatabaseEntry {
public:
std::string name; /**< Artist name. */
std::string lower; /**< Artist name (lowercase). */
Artist(); /**< Artist tag constructor */
/**
* Artist tag constructor
*
* @param name Artist name
*/
Artist(const std::string &);
/**
* Called to access the artist tag's primary key
*
* @return Artist::name
*/
const std::string primary_key() const;
/**
* Read the artist name from file and
* find the lowercase form.
*
* @param file The file to read from.
*/
void read(File &);
/**
* Write the artist name to file.
*
* @param file The file to write to.
*/
void write(File &);
};
#endif /* OCARINA_CORE_TAGS_ARTIST_H */