- Implemented CmdAdd.cpp and CmdLog.cpp using TDB2.
- Implemented simple append writes in TDB2.
- Modified CmdImport to accept and parse JSON.
- Added more const-ness in DOM, Expression and Task, to allow TDB2::get_tasks
  to return a const vector ref, which is a Very Good Thing.
- Corrected usage for the export command.
- Implemented Task::urgency as a call to Task::urgency_c, which is a const
  overload to allow urgency calculations (without caching) for const Task
  objects.
- Removed obolete code from TDB.
- Added lots of diagnostic output for TDB2 - it's annoying, but will be
  gone soon.
- Added mention in CmdHelp of the new <filter> and <modifications>
  syntax elements.  Needs more.
- Added Command::filter overload which uses TDB2.  Not in use yet.
This commit is contained in:
Paul Beckingham 2011-07-13 23:53:57 -04:00
parent 523c4dfcca
commit 8827f9c978
18 changed files with 400 additions and 173 deletions

View file

@ -203,7 +203,7 @@ const std::string DOM::get (const std::string& name)
// recur
// depends
//
const std::string DOM::get (const std::string& name, Task& task)
const std::string DOM::get (const std::string& name, const Task& task)
{
// Cache test.
/*
@ -232,7 +232,7 @@ const std::string DOM::get (const std::string& name, Task& task)
n.getUntilEOS (attr);
if (attr == "id") return format (task.id);
else if (attr == "urgency") return format (task.urgency (), 4, 3);
else if (attr == "urgency") return format (task.urgency_c (), 4, 3);
else return task.get (attr);
}
}
@ -249,7 +249,7 @@ const std::string DOM::get (const std::string& name, Task& task)
n.getUntilEOS (attr);
if (attr == "id") return format (task.id);
else if (attr == "urgency") return format (task.urgency (), 4, 3);
else if (attr == "urgency") return format (task.urgency_c (), 4, 3);
else return task.get (attr);
}
}
@ -258,7 +258,7 @@ const std::string DOM::get (const std::string& name, Task& task)
// std::cout << "# DOM::get " << name << "\n";
if (name == "id") return format (task.id);
else if (name == "urgency") return format (task.urgency (), 4, 3);
else if (name == "urgency") return format (task.urgency_c (), 4, 3);
else return task.get (name);
// Delegate to the context-free version of DOM::get.