Simple task manager which uses a Ticker

Committer:
Phlaphead
Date:
Fri Jan 14 20:24:54 2011 +0000
Revision:
2:3cb7f5770feb
Parent:
0:e381c3adaa04
Added documentation

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Phlaphead 0:e381c3adaa04 1 #ifndef TaskManager_h
Phlaphead 0:e381c3adaa04 2 #define TaskManager_h
Phlaphead 0:e381c3adaa04 3
Phlaphead 0:e381c3adaa04 4
Phlaphead 0:e381c3adaa04 5 #include "Task.h"
Phlaphead 0:e381c3adaa04 6
Phlaphead 0:e381c3adaa04 7 #include <list>
Phlaphead 0:e381c3adaa04 8
Phlaphead 0:e381c3adaa04 9 using namespace std;
Phlaphead 0:e381c3adaa04 10
Phlaphead 2:3cb7f5770feb 11 /**
Phlaphead 2:3cb7f5770feb 12 * TaskManager class manages a list of running or suspended tasks.
Phlaphead 2:3cb7f5770feb 13 */
Phlaphead 0:e381c3adaa04 14 class TaskManager
Phlaphead 0:e381c3adaa04 15 {
Phlaphead 0:e381c3adaa04 16
Phlaphead 0:e381c3adaa04 17 public:
Phlaphead 0:e381c3adaa04 18
Phlaphead 2:3cb7f5770feb 19 /**
Phlaphead 2:3cb7f5770feb 20 * Contructor.
Phlaphead 2:3cb7f5770feb 21 */
Phlaphead 0:e381c3adaa04 22 TaskManager();
Phlaphead 2:3cb7f5770feb 23
Phlaphead 2:3cb7f5770feb 24 /**
Phlaphead 2:3cb7f5770feb 25 * Start a task.
Phlaphead 2:3cb7f5770feb 26 * @param _task The task object to start
Phlaphead 2:3cb7f5770feb 27 */
Phlaphead 0:e381c3adaa04 28 void startTask(Task* _task);
Phlaphead 0:e381c3adaa04 29
Phlaphead 0:e381c3adaa04 30 private:
Phlaphead 0:e381c3adaa04 31
Phlaphead 0:e381c3adaa04 32 list<Task*> tasks;
Phlaphead 0:e381c3adaa04 33
Phlaphead 0:e381c3adaa04 34
Phlaphead 0:e381c3adaa04 35 };
Phlaphead 0:e381c3adaa04 36
Phlaphead 0:e381c3adaa04 37
Phlaphead 0:e381c3adaa04 38
Phlaphead 0:e381c3adaa04 39 #endif