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:
parent
b3d904c128
commit
a1432a66e1
38
DESIGN
38
DESIGN
|
@ -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:
|
Album Tag:
|
||||||
The album tag is used to collect information about each artist's albums.
|
The album tag is used to collect information about each artist's albums.
|
||||||
|
|
||||||
|
|
|
@ -8,36 +8,48 @@
|
||||||
#include <core/database.h>
|
#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 {
|
class Artist : public DatabaseEntry {
|
||||||
public:
|
public:
|
||||||
std::string name; /**< Artist name. */
|
std::string name; /**< Artist name. */
|
||||||
std::string lower; /**< Artist name (lowercase). */
|
std::string lower; /**< Artist name (lowercase). */
|
||||||
|
|
||||||
/** Artist tag constructor */
|
Artist(); /**< Artist tag constructor */
|
||||||
Artist();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Artist tag constructor
|
* Artist tag constructor
|
||||||
|
*
|
||||||
* @param name Artist name
|
* @param name Artist name
|
||||||
*/
|
*/
|
||||||
Artist(const std::string &);
|
Artist(const std::string &);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called to access the artist tag's primary key
|
* Called to access the artist tag's primary key
|
||||||
|
*
|
||||||
* @return Artist::name
|
* @return Artist::name
|
||||||
*/
|
*/
|
||||||
const std::string primary_key() const;
|
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.
|
* @param file The file to read from.
|
||||||
*/
|
*/
|
||||||
void read(File &);
|
void read(File &);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Write artist information to file.
|
* Write the artist name to file.
|
||||||
|
*
|
||||||
* @param file The file to write to.
|
* @param file The file to write to.
|
||||||
*/
|
*/
|
||||||
void write(File &);
|
void write(File &);
|
||||||
|
|
Loading…
Reference in New Issue