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;
A library for creating RISC OS toolbox applications.
Definition: abouttobeshownlistener.cc:35
bool running(const std::string &task_name) const
Check if a task is running.
Definition: taskmanager.cc:38
TaskHandle find_first(const std::string &task_name) const
Find the first running task with the given name.
Definition: taskmanager.cc:63
TaskHandle handle
Handle of the task.
Definition: taskmanager.h:42
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
TaskFlags
Values for the flags parameter can be combined.
Definition: taskmanager.h:49
Class to find and enumerate running tasks.
Definition: taskmanager.h:60
std::string name(TaskHandle handle) const
Return name of task from a handle.
Definition: taskmanager.cc:50
int TaskHandle
Type for a Wimp Task.
Definition: handles.h:56
@ None
No flags set.
Definition: taskmanager.h:50
unsigned int flags
A combination of one or more of the TaskFlags.
Definition: taskmanager.h:44
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
std::string name
Name of the task.
Definition: taskmanager.h:41
Structure containing information on a task.
Definition: taskmanager.h:40