Enhancement - TDB API cleanup

- Removed obsolete TDB::deleteT method.
- Removed obsolete TDB::completeT method.
- Updated documentation.
This commit is contained in:
Paul Beckingham
2009-05-08 00:37:24 -04:00
parent 90c721295a
commit 5814432366
7 changed files with 37 additions and 59 deletions

View File

@@ -244,55 +244,6 @@ bool TDB::allCompletedT (std::vector <T>& all) const
return false;
}
////////////////////////////////////////////////////////////////////////////////
bool TDB::deleteT (const T& t)
{
T task (t);
std::vector <T> all;
allPendingT (all);
std::vector <T>::iterator it;
for (it = all.begin (); it != all.end (); ++it)
if (task.getId () == it->getId ())
{
it->setStatus (T::deleted);
char endTime[16];
sprintf (endTime, "%u", (unsigned int) time (NULL));
it->setAttribute ("end", endTime);
return overwritePending (all);
}
return false;
}
////////////////////////////////////////////////////////////////////////////////
bool TDB::completeT (const T& t)
{
T task (t);
std::vector <T> all;
allPendingT (all);
std::vector <T>::iterator it;
for (it = all.begin (); it != all.end (); ++it)
if (task.getId () == it->getId ())
{
*it = t;
it->setStatus (T::completed);
char endTime[16];
sprintf (endTime, "%u", (unsigned int) time (NULL));
it->setAttribute ("end", endTime);
return overwritePending (all);
}
return false;
}
////////////////////////////////////////////////////////////////////////////////
bool TDB::addT (const T& t)
{