From aa758481ebd65e534dfe7d1efaca851e21520570 Mon Sep 17 00:00:00 2001 From: Anna Schumaker Date: Sat, 8 Nov 2014 12:59:27 -0500 Subject: [PATCH] tags: Move artist tag to a new header file I created a new directory for tag related code. This keeps the core/ directory cleaner and prevents file name collisions between the library layer and the library tag. Signed-off-by: Anna Schumaker --- include/core/tags.h | 40 +------------------------------ include/core/tags/artist.h | 48 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+), 39 deletions(-) create mode 100644 include/core/tags/artist.h diff --git a/include/core/tags.h b/include/core/tags.h index 5af9a32a..722434b5 100644 --- a/include/core/tags.h +++ b/include/core/tags.h @@ -6,6 +6,7 @@ #define OCARINA_CORE_TAGS_H #include +#include /** @@ -33,45 +34,6 @@ enum sort_t { }; -/** - * Artist tag - */ -class Artist : public DatabaseEntry { -public: - /** Artist name */ - std::string name; - /** Artist name (lowercase) */ - std::string lower; - - /** Artist tag constructor */ - Artist(); - - /** - * 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. - * @param file The file to read from. - */ - void read(File &); - - /** - * Write artist information to file. - * @param file The file to write to. - */ - void write(File &); -}; - - /** * Album tag */ diff --git a/include/core/tags/artist.h b/include/core/tags/artist.h new file mode 100644 index 00000000..7c2f92f2 --- /dev/null +++ b/include/core/tags/artist.h @@ -0,0 +1,48 @@ +/** + * @file + * Copyright 2014 (c) Anna Schumaker. + */ +#ifndef OCARINA_CORE_TAGS_ARTIST_H +#define OCARINA_CORE_TAGS_ARTIST_H + +#include + +/** + * Artist tag + */ +class Artist : public DatabaseEntry { +public: + /** Artist name */ + std::string name; + /** Artist name (lowercase) */ + std::string lower; + + /** Artist tag constructor */ + Artist(); + + /** + * 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. + * @param file The file to read from. + */ + void read(File &); + + /** + * Write artist information to file. + * @param file The file to write to. + */ + void write(File &); +}; + +#endif /* OCARINA_CORE_TAGS_ARTIST_H */