Commands - add, log

- Implemented add and log commands using new infrastructure.
- Relaxed restriction about creating completed tasks with no dependencies.
- Localized CmdAdd.cpp CmdLog.cpp.
- Implemented Command::modify_task to apply command line arguments to a
  specified task.
- Implemented Command::apply_defaults to apply various initial values to
  a specified task, such as entry date.
This commit is contained in:
Paul Beckingham 2011-06-24 00:58:26 -04:00
parent 3c1c900b5b
commit 9603864924
6 changed files with 193 additions and 129 deletions

View file

@ -32,6 +32,7 @@
#include <vector>
#include <string>
#include <Task.h>
#include <Arguments.h>
class Command
{
@ -51,7 +52,10 @@ public:
bool displays_id () const;
virtual int execute (std::string&) = 0;
protected:
void filter (std::vector <Task>&, std::vector <Task>&);
void modify_task (Task&, Arguments&);
void apply_defaults (Task&);
protected:
std::string _keyword;