32 lines
449 B
C++
32 lines
449 B
C++
/**
|
|
* @file
|
|
* Copyright 2014 (c) Anna Schumaker.
|
|
*/
|
|
#include <core/tags/library.h>
|
|
|
|
Library :: Library()
|
|
: count(0), enabled(false)
|
|
{
|
|
}
|
|
|
|
Library :: Library(const std::string &s)
|
|
: root_path(s), count(0), enabled(true)
|
|
{
|
|
}
|
|
|
|
const std::string Library :: primary_key() const
|
|
{
|
|
return root_path;
|
|
}
|
|
|
|
void Library :: read(File &f)
|
|
{
|
|
f >> enabled;
|
|
root_path = f.getline();
|
|
}
|
|
|
|
void Library :: write(File &f)
|
|
{
|
|
f << enabled << " " << root_path;
|
|
}
|