Enhancement - default.command

- Implemented default.command handling.
This commit is contained in:
Paul Beckingham 2009-06-11 01:10:53 -04:00
parent d4a9a387af
commit a58aa948b8
4 changed files with 50 additions and 26 deletions

View file

@ -111,6 +111,18 @@ TDB2::~TDB2 ()
unlock ();
}
////////////////////////////////////////////////////////////////////////////////
void TDB2::clear ()
{
mLocations.clear ();
mLock = true;
if (mAllOpenAndLocked)
unlock ();
mAllOpenAndLocked = false;
}
////////////////////////////////////////////////////////////////////////////////
void TDB2::location (const std::string& path)
{
@ -179,7 +191,7 @@ int TDB2::loadPending (std::vector <Task>& tasks, Filter& filter)
char line[T_LINE_MAX];
foreach (location, mLocations)
{
std::cout << "# location.path: " << location->path << std::endl;
std::cout << "# location.path: " << location->path << "" << std::endl;
line_number = 1;
file = location->path + "/pending.data";
@ -226,7 +238,7 @@ int TDB2::loadCompleted (std::vector <Task>& tasks, Filter& filter)
char line[T_LINE_MAX];
foreach (location, mLocations)
{
std::cout << "# location.path: " << location->path << std::endl;
std::cout << "# location.path: " << location->path << "" << std::endl;
// TODO If the filter contains Status:x where x is not deleted or
// completed, then this can be skipped.