From a1432a66e198be699a8dc33db96d07c1dcbc9287 Mon Sep 17 00:00:00 2001 From: Anna Schumaker Date: Sat, 8 Nov 2014 13:56:54 -0500 Subject: [PATCH] Artist: Update documentation I add more details and remove this section of the DESIGN file. Signed-off-by: Anna Schumaker --- DESIGN | 38 -------------------------------------- include/core/tags/artist.h | 22 +++++++++++++++++----- 2 files changed, 17 insertions(+), 43 deletions(-) diff --git a/DESIGN b/DESIGN index 60be813d..3a4ee32a 100644 --- a/DESIGN +++ b/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: The album tag is used to collect information about each artist's albums. diff --git a/include/core/tags/artist.h b/include/core/tags/artist.h index e6659a9f..ac36e517 100644 --- a/include/core/tags/artist.h +++ b/include/core/tags/artist.h @@ -8,36 +8,48 @@ #include /** - * 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 &);