/** * @file * Copyright 2014 (c) Anna Schumaker. */ #include #include Album :: Album() : GenericTag(), _year(0) {} Album :: Album(const std::string &name, unsigned int year) : GenericTag(name), _year(year) { } const std::string Album :: primary_key() const { std::stringstream ss; ss << _year << "/" << GenericTag :: primary_key(); return ss.str(); } void Album :: read(File &file) { file >> _year; GenericTag :: read(file); } void Album :: write(File &file) { file << _year << " "; GenericTag :: write(file); } unsigned int Album :: year() { return _year; }