view TaskManager/kernel/ppe/TaskListInfo.h @ 838:41302b72c895

Draw Span Task -> Task Array
author Yutaka_Kinjyo
date Fri, 28 May 2010 01:47:42 +0900
parents 8a6f1fa038de
children
line wrap: on
line source

#ifndef INCLUDED_TASK_LIST_INFO
#define INCLUDED_TASK_LIST_INFO

#include "types.h"
#include "TaskList.h"

class TaskListInfo : public TaskList {
public:
    /* constructor */
    TaskListInfo();

    BASE_NEW_DELETE(TaskListInfo);

    /* functions */
    TaskListPtr create();

    void free_(TaskListPtr queue);
    void freeAll();

    void addFirst(TaskList* e);
    void addLast(TaskList* e);
    TaskList* getFirst();
    TaskList* getLast();
    int remove(TaskList* e);
    TaskList* poll();
    void moveToFirst(TaskList* e); // or use();
    TaskList* get(int index);
    TaskList* find(TaskList *task);
    int empty();
    void freePool() ;

    // Iterator
    TaskList* getNext(TaskList* q) ;
    int length();
    static TaskListInfo taskListPool;

private:
    /* variables */

    TaskList* first;
    TaskList* last;

    /* functions */
    int extend_pool(int num);
    void destroy();  
};

typedef TaskListInfo *TaskListInfoPtr;

#endif