Artist: Update documentation

I add more details and remove this section of the DESIGN file.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
This commit is contained in:
Anna Schumaker 2014-11-08 13:56:54 -05:00
parent b3d904c128
commit a1432a66e1
2 changed files with 17 additions and 43 deletions

38
DESIGN
View File

@ -120,44 +120,6 @@ Tag Database:
Artist Tag:
The arist tag is used to collect basic information about the various
artists that have been added to the library.
- Artist:
class Artist : public DatabaseEntry {
public:
std::string name;
std::string lower;
Artist();
Artist(const std::string &);
const std::string primary_key() const;
void read(File &);
void write(File &);
};
- File Format:
File << name;
- API:
Artist();
Initialize an invalid Artist instance.
Artist(const std::string &artist_name);
Set artist_name and find the lowercase form.
const std::string Artist :: primary_key() const;
Use artist name as primary key.
void Artist :: read(File &f);
Read artist name from file and find the lowercase form.
void Artist :: write(File &f);
Write artist name to file.
Album Tag:
The album tag is used to collect information about each artist's albums.

View File

@ -8,36 +8,48 @@
#include <core/database.h>
/**
* Artist tag
* 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 tag constructor */
Artist();
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 artist information from file.
* Read the artist name from file and
* find the lowercase form.
*
* @param file The file to read from.
*/
void read(File &);
/**
* Write artist information to file.
* Write the artist name to file.
*
* @param file The file to write to.
*/
void write(File &);