Dependencies

- Added dependencyGetBlocking and dependencyGetBlocked API calls, in
  the ongoing effort to find a workable API for dependencies.  The
  goal is to make the calling code as small as possible when dealing
  with dependencies.
- Corrected the algorithm for determining whether a task is blocked or
  blocking to also check that the other task is pending or waiting.
  For example:
    task add one
    task add two depends:1
    task do 1
  As the first task is completed, task 2 still depends on 1, but is
  no longer blocked due to the completed status.
- Modified the "info" report to use the modified API.
This commit is contained in:
Paul Beckingham 2010-09-16 21:52:48 -04:00
parent 8904daf9e5
commit 975c2bbcb9
3 changed files with 66 additions and 24 deletions

View file

@ -133,7 +133,9 @@ int handleExportYAML (std::string &);
// dependency.cpp
bool dependencyIsBlocked (Task&);
void dependencyGetBlocked (Task&, std::vector <Task>&);
bool dependencyIsBlocking (Task&);
void dependencyGetBlocking (Task&, std::vector <Task>&);
bool dependencyIsCircular (Task&);
bool dependencyChainBroken (Task&);
std::string dependencyNag (Task&);