Integration - TDB write operations

- TDB::gc rewritten.
- TDB::commit fixed.
- Corrected usage of handleRecurringTasks wrt TDB.
- Unit tests for TDB.
This commit is contained in:
Paul Beckingham
2009-06-15 00:52:24 -04:00
parent 314ce572e1
commit 7ff178cecc
12 changed files with 211 additions and 125 deletions

View File

@@ -40,6 +40,25 @@ Task::Task ()
set ("uuid", uuid ());
}
////////////////////////////////////////////////////////////////////////////////
Task::Task (const Task& other)
: Record (other)
, id (other.id)
{
}
////////////////////////////////////////////////////////////////////////////////
Task& Task::operator= (const Task& other)
{
if (this != &other)
{
Record::operator= (other);
id = other.id;
}
return *this;
}
////////////////////////////////////////////////////////////////////////////////
// Attempt an FF4 parse first, using Record::parse, and in the event of an error
// try a legacy parse (F3, FF2). Note that FF1 is no longer supported.
@@ -296,7 +315,7 @@ void Task::legacyParse (const std::string& line)
}
////////////////////////////////////////////////////////////////////////////////
std::string Task::composeCSV ()
std::string Task::composeCSV () const
{
std::stringstream out;
@@ -421,7 +440,7 @@ void Task::addTags (const std::vector <std::string>& tags)
}
////////////////////////////////////////////////////////////////////////////////
void Task::getTags (std::vector<std::string>& tags)
void Task::getTags (std::vector<std::string>& tags) const
{
split (tags, get ("tags"), ',');
}