46
|
1 #ifndef INCLUDED_TASK_LIST_INFO
|
|
2 #define INCLUDED_TASK_LIST_INFO
|
|
3
|
307
|
4 #include "types.h"
|
|
5 #include "TaskList.h"
|
46
|
6
|
801
|
7 class TaskListInfo : public TaskList {
|
46
|
8 public:
|
|
9 /* constructor */
|
801
|
10 TaskListInfo();
|
|
11
|
|
12 BASE_NEW_DELETE(TaskListInfo);
|
109
|
13
|
46
|
14 /* functions */
|
801
|
15 TaskListPtr create();
|
|
16
|
|
17 void free_(TaskListPtr queue);
|
808
|
18 void freeAll();
|
46
|
19
|
801
|
20 void addFirst(TaskList* e);
|
|
21 void addLast(TaskList* e);
|
|
22 TaskList* getFirst();
|
|
23 TaskList* getLast();
|
|
24 int remove(TaskList* e);
|
|
25 TaskList* poll();
|
|
26 void moveToFirst(TaskList* e); // or use();
|
|
27 TaskList* get(int index);
|
|
28 TaskList* find(TaskList *task);
|
|
29 int empty();
|
|
30 void freePool() ;
|
499
|
31
|
801
|
32 // Iterator
|
|
33 TaskList* getNext(TaskList* q) ;
|
|
34 int length();
|
808
|
35 static TaskListInfo taskListPool;
|
801
|
36
|
|
37 private:
|
46
|
38 /* variables */
|
801
|
39
|
|
40 TaskList* first;
|
|
41 TaskList* last;
|
46
|
42
|
|
43 /* functions */
|
801
|
44 int extend_pool(int num);
|
|
45 void destroy();
|
46
|
46 };
|
|
47
|
801
|
48 typedef TaskListInfo *TaskListInfoPtr;
|
|
49
|
46
|
50 #endif
|
801
|
51
|