Mercurial > hg > Members > kono > Cerium
comparison TaskManager/Test/test_render/SceneGraphList.h @ 530:18446bce1b8b
add SceneGraphList
author | aaa |
---|---|
date | Wed, 21 Oct 2009 00:56:51 +0900 |
parents | |
children | fab6f20021c9 |
comparison
equal
deleted
inserted
replaced
529:fb8ed646feb8 | 530:18446bce1b8b |
---|---|
1 #ifndef SCENE_GRAPH_LIST | |
2 #define SCENE_GRAPH_LIST | |
3 | |
4 #include <stdlib.h> | |
5 #include "SgStruct.h" | |
6 | |
7 class SceneGraphList : SgStruct { | |
8 public: | |
9 SgStruct* pool; | |
10 SgStruct* first; | |
11 SgStruct* last; | |
12 int sgid; | |
13 | |
14 SceneGraphList (SgStruct* ms) { | |
15 first = last = this; | |
16 next = prev = this; | |
17 pool = ms; | |
18 sgid = 0; | |
19 } | |
20 | |
21 ~SceneGraphList () { | |
22 free(pool); | |
23 } | |
24 | |
25 void addFirst(SgStruct* e); | |
26 void addLast(SgStruct* e); | |
27 SgStruct* getFirst(); | |
28 SgStruct* getLast(); | |
29 int remove(SgStruct* e); | |
30 SgStruct* poll(); | |
31 SgStruct* get(char *name); | |
32 }; | |
33 | |
34 #endif |