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 <Anna@OcarinaProject.net>
This commit is contained in:
Anna Schumaker 2014-11-08 12:59:27 -05:00
parent a34151365f
commit aa758481eb
2 changed files with 49 additions and 39 deletions

View File

@ -6,6 +6,7 @@
#define OCARINA_CORE_TAGS_H
#include <core/database.h>
#include <core/tags/artist.h>
/**
@ -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
*/

View File

@ -0,0 +1,48 @@
/**
* @file
* Copyright 2014 (c) Anna Schumaker.
*/
#ifndef OCARINA_CORE_TAGS_ARTIST_H
#define OCARINA_CORE_TAGS_ARTIST_H
#include <core/database.h>
/**
* 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 */