ocarina/core/tags/artist.cpp
Anna Schumaker b3d904c128 Artist: Move artist tag code into a new directory
core/tags.cpp was WAY too big, so I moved this code into a new file in
its own directory.  I also created a new unit test just for testing the
Artist tag.

This patch disables the "tags" test since it conflicts with the
tests/core/tags/ directory.  This is okay because the tagdb is gradually
being phased out!

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-12-03 13:02:49 -05:00

30 lines
428 B
C++

/**
* @file
* Copyright 2014 (c) Anna Schumaker.
*/
#include <core/filter.h>
#include <core/tags/artist.h>
Artist :: Artist() {}
Artist :: Artist(const std::string &s)
: name(s), lower(filter :: lowercase(name))
{
}
const std::string Artist :: primary_key() const
{
return name;
}
void Artist :: read(File &f)
{
name = f.getline();
lower = filter :: lowercase(name);
}
void Artist :: write(File &f)
{
f << name;
}