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:
23
src/Task.cpp
23
src/Task.cpp
@@ -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"), ',');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user