view include/TaskManager/BufferManager.h @ 356:b89ba1d96fff

merge heads
author aaa
date Fri, 17 Jul 2009 15:04:02 +0900
parents 81b25e5d5379 7075842aa155
children
line wrap: on
line source

#ifndef INCLUDED_BUFFER_MANAGER
#define INCLUDED_BUFFER_MANAGER

#include "types.h"
#include "TaskListInfo.h"
#include "TaskQueueInfo.h"
#include "HTaskInfo.h"

/*!
 *   Task Input/Output buffer manager
 *
 */

class BufferManager {
public:
    /* constructor */
    BufferManager(int num = 1);
    virtual ~BufferManager(void);
    
    /* variables */
    TaskListInfo *taskListImpl;
    TaskQueueInfo *taskQueueImpl;
    HTaskInfo *htaskImpl;

    int machineNum;

    /* function */
    virtual void init(void);

    // TaskList
    TaskListPtr create_taskList(void);
    void free_taskList(TaskListPtr);
    TaskListPtr clear_taskList(TaskListPtr);

    // TaskQueue
    TaskQueuePtr create_taskQueue(HTaskPtr);
    void free_taskQueue(TaskQueuePtr);

    // HTask
    HTaskPtr create_task(int cmd);
    void free_task(HTaskPtr);


    void finish(void);
private:
};

#endif