Expose is_* methods on tasks.

This commit is contained in:
Dustin J. Mitchell
2022-12-18 21:35:56 +00:00
committed by Dustin J. Mitchell
parent 7c27f116ad
commit 88333ac785
5 changed files with 53 additions and 3 deletions

View File

@@ -99,6 +99,30 @@ std::string tc::Task::get_description () const
return tc2string(desc);
}
////////////////////////////////////////////////////////////////////////////////
bool tc::Task::is_waiting () const
{
return tc_task_is_waiting (&*inner);
}
////////////////////////////////////////////////////////////////////////////////
bool tc::Task::is_active () const
{
return tc_task_is_active (&*inner);
}
////////////////////////////////////////////////////////////////////////////////
bool tc::Task::is_blocked () const
{
return tc_task_is_blocked (&*inner);
}
////////////////////////////////////////////////////////////////////////////////
bool tc::Task::is_blocking () const
{
return tc_task_is_blocking (&*inner);
}
////////////////////////////////////////////////////////////////////////////////
std::string tc::Task::task_error () const {
TCString error = tc_task_error (&*inner);