3 |
|
|
4 |
#include <string> |
#include <string> |
5 |
#include <map> |
#include <map> |
6 |
#include <vector> |
#include <list> |
7 |
|
|
8 |
#include "Task.h" |
#include "Task.h" |
9 |
|
|
10 |
|
|
11 |
|
class IGsmModem; |
12 |
|
|
13 |
class TaskManager |
class TaskManager |
14 |
{ |
{ |
15 |
public: |
public: |
16 |
TaskManager(); |
TaskManager(); |
17 |
~TaskManager(); |
~TaskManager(); |
18 |
|
|
19 |
void ExecuteTasks(); |
void ExecuteTasks(IGsmModem& modem); |
20 |
|
|
21 |
void LoadTasks(); |
void LoadTasks(); |
22 |
|
|
23 |
|
void AddTask(Task* task); |
24 |
|
void AddTemporaryTask(Task* task); |
25 |
|
|
26 |
Task* GetTask(const std::string& taskname); |
Task* GetTask(const std::string& taskname); |
27 |
|
|
|
std::vector<Task*> GetTaskList(); |
|
28 |
|
|
29 |
private: |
private: |
30 |
std::map<std::string, Task*> _tasks; |
std::map<std::string, Task*> _tasks; |
31 |
|
|
32 |
|
std::list<Task*> _temp_tasks; |
33 |
|
|
34 |
|
int _lastExecuted; |
35 |
}; |
}; |
36 |
|
|
37 |
#endif //__MANAGER_H__ |
#endif //__MANAGER_H__ |