46
|
1 #ifndef INCLUDED_BUFFER_MANAGER
|
|
2 #define INCLUDED_BUFFER_MANAGER
|
|
3
|
|
4 #ifndef INCLUDED_TYPES
|
|
5 # include "types.h"
|
|
6 #endif
|
|
7
|
|
8 #ifndef INCLUDED_TASK_LIST_INFO
|
|
9 # include "TaskListInfo.h"
|
|
10 #endif
|
|
11
|
|
12 #ifndef INCLUDED_TASK_QUEUE_INFO
|
|
13 # include "TaskQueueInfo.h"
|
|
14 #endif
|
|
15
|
54
|
16 #ifndef INCLUDED_HTASK_INFO
|
46
|
17 # include "HTaskInfo.h"
|
|
18 #endif
|
|
19
|
|
20 class BufferManager {
|
|
21 public:
|
|
22 /* constructor */
|
|
23 BufferManager(int num = 1);
|
|
24 virtual ~BufferManager(void);
|
|
25
|
|
26 /* variables */
|
63
|
27 TaskListInfo *taskListImpl;
|
|
28 TaskQueueInfo *taskQueueImpl;
|
46
|
29 HTaskInfo *htaskImpl;
|
|
30
|
|
31 int machineNum;
|
|
32
|
|
33 /* function */
|
58
|
34 virtual void init(void);
|
46
|
35
|
109
|
36 // TaskList
|
|
37 TaskListPtr create_taskList(void);
|
|
38 void free_taskList(TaskListPtr);
|
|
39 TaskListPtr clear_taskList(TaskListPtr);
|
|
40
|
|
41 // TaskQueue
|
46
|
42 TaskQueuePtr create_taskQueue(HTaskPtr);
|
|
43 void free_taskQueue(TaskQueuePtr);
|
109
|
44
|
|
45 // HTask
|
|
46 HTaskPtr create_task(int cmd);
|
46
|
47 void free_task(HTaskPtr);
|
|
48
|
|
49
|
|
50 void finish(void);
|
|
51 private:
|
|
52 };
|
|
53
|
|
54 #endif
|