Enhancement - Hooks

- Implemented API calls: task_get_due, task_get_end, task_get_entry,
  task_get_start, task_get_until and task_get_wait.
- Implemented unit tests for API calls.
- Implemented new Record::get_ulong method.
- Implemented unit tests for get_ulong.
This commit is contained in:
Paul Beckingham
2010-03-01 20:53:44 -05:00
parent 98ebe8b7cc
commit e5f7e18d56
10 changed files with 599 additions and 30 deletions

View File

@@ -157,6 +157,16 @@ int Record::get_int (const std::string& name) const
return 0;
}
////////////////////////////////////////////////////////////////////////////////
unsigned long Record::get_ulong (const std::string& name) const
{
Record::const_iterator i = this->find (name);
if (i != this->end ())
return strtoul (i->second.value ().c_str (), NULL, 10);
return 0;
}
////////////////////////////////////////////////////////////////////////////////
void Record::set (const std::string& name, const std::string& value)
{