25 #ifndef TBX_TASKMANAGER
26 #define TBX_TASKMANAGER
73 bool more() {
return _current != _end || _call_value >= 0;}
77 std::string
name()
const;
78 unsigned int memory() {
return _current[2];}
79 unsigned int flags() {
return _current[3];}
83 bool running(
const std::string &task_name)
const;
87 bool find_all(std::vector<TaskInfo> &infos,
const std::string &task_name)
const;
88 void list(std::vector<TaskInfo> &infos)
const;
std::string name
Name of the task.
Definition: taskmanager.h:41
No flags set.
Definition: taskmanager.h:50
void list(std::vector< TaskInfo > &infos) const
Get list of all running tasks.
Definition: taskmanager.cc:122
unsigned int memory
Memory used by the task.
Definition: taskmanager.h:43
std::string name(TaskHandle handle) const
Return name of task from a handle.
Definition: taskmanager.cc:50
TaskHandle handle
Handle of the task.
Definition: taskmanager.h:42
TaskFlags
Values for the flags parameter can be combined.
Definition: taskmanager.h:48
bool find_all(std::vector< TaskInfo > &infos, const std::string &task_name) const
Find all running tasks with given name and return full info.
Definition: taskmanager.cc:99
TaskHandle find_first(const std::string &task_name) const
Find the first running task with the given name.
Definition: taskmanager.cc:63
Class to find and enumerate running tasks.
Definition: taskmanager.h:59
int TaskHandle
Type for a Wimp Task.
Definition: handles.h:56
bool running(const std::string &task_name) const
Check if a task is running.
Definition: taskmanager.cc:38
Structure containing information on a task.
Definition: taskmanager.h:39
unsigned int flags
A combination of one or more of the TaskFlags.
Definition: taskmanager.h:44