TW-1827: Extract annotations from a task

- Thanks to Ryan.
This commit is contained in:
Paul Beckingham 2017-01-16 16:00:16 -05:00
parent e71be41e72
commit ce97fd5901
7 changed files with 40 additions and 0 deletions

View file

@ -1032,6 +1032,17 @@ std::string Task::composeJSON (bool decorate /*= false*/) const
return out.str ();
}
////////////////////////////////////////////////////////////////////////////////
int Task::getAnnotationCount () const
{
int count = 0;
for (auto& ann : data)
if (! ann.first.compare (0, 11, "annotation_", 11))
++count;
return count;
}
////////////////////////////////////////////////////////////////////////////////
bool Task::hasAnnotations () const
{