00001 #pragma once 00002 00003 #include "TaskBase.h" 00004 00012 class TaskController{ 00013 private: 00014 char *taskBuffer; 00015 size_t taskMaxSize; 00016 int taskMaxCount; 00018 protected: 00019 TaskBase **tasks; 00028 virtual TaskBase* createTaskMain(int taskType)=0; 00029 00030 public: 00031 TaskController(); 00032 ‾TaskController(); 00033 00034 bool setTasks(size_t taskMaxSize,int taskMaxCount); 00035 void resetTasks(); 00036 00037 TaskBase* createTask(int taskType); 00038 bool getTaskList(int targetTaskType,TaskBase **taskList,const int taskListkMaxCount); 00039 00040 void runTasks(); 00041 void refreshTasks(); 00042 };