Mercurial > hg > Game > Cerium
view TaskManager/kernel/ppe/TaskQueueInfo.h @ 899:1b9418af3127 draft
minor fix..
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 16 Jul 2010 22:20:02 +0900 |
parents | b662e9dd26b0 |
children |
line wrap: on
line source
#ifndef INCLUDED_TASK_QUEUE_INFO #define INCLUDED_TASK_QUEUE_INFO #include "TaskQueue.h" class HTask; class TaskQueueInfo : public TaskQueue { public: /* constructor */ TaskQueueInfo(); BASE_NEW_DELETE(TaskQueueInfo); /* functions */ TaskQueuePtr create(HTask *task); void free_(TaskQueuePtr queue); void addFirst(TaskQueue* e); void addLast(TaskQueue* e); TaskQueue* getFirst(); TaskQueue* getLast(); int remove(TaskQueue* e); TaskQueue* poll(); void moveToFirst(TaskQueue* e); // or use(); TaskQueue* get(int index); TaskQueue* find(HTask *task); int empty(); void freePool() ; // Iterator TaskQueue* getNext(TaskQueue* q) ; int hasNext(TaskQueue* q); private: /* variables */ static TaskQueueInfo taskQueuePool; TaskQueue* first; TaskQueue* last; /* functions */ int extend_pool(int num); void destroy(); } ; #endif