Mercurial > hg > Members > kono > Cerium
diff include/TaskManager/TaskGroup.h @ 109:5c194c71eca8
Cerium cvs version
author | gongo@gendarme.local |
---|---|
date | Wed, 12 Nov 2008 17:39:33 +0900 |
parents | |
children | 7075842aa155 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/include/TaskManager/TaskGroup.h Wed Nov 12 17:39:33 2008 +0900 @@ -0,0 +1,41 @@ +#ifndef INCLUDED_TASK_GROUP +#define INCLUDED_TASK_GROUP + +#ifndef INCLUDED_BASE_H_ +# include "base.h" +#endif + +#ifndef INCLUDED_TASK_QUEUE +# include "TaskQueue.h" +#endif + +class TaskGroup { +public: + TaskGroup(void): group(NULL) {} + + BASE_NEW_DELETE(TaskGroup); + + unsigned int command; + TaskQueuePtr group; + + /** + * 待つ Task を追加 + */ + void add(TaskPtr add_task); + + /** + * 終了した Task を group から削除 + */ + void remove(TaskPtr delete_task); + + /** + * 空 (待つタスクが無い) の時が、この TaskGroup が持つ、 + * PPE に送るべきコマンドを返す。 + * まだ待つべきタスクがある場合は 0 を返す + */ + unsigned int status(void); +}; + +typedef TaskGroup* TaskGroupPtr; + +#endif