00001
00002 #ifndef RC_NODELIST_H
00003 #define RC_NODELIST_H
00004
00009 class NodeList {
00010 friend class SceneGraph;
00011
00016 struct NodeElement {
00017
00018 Node *node;
00019 NodeElement *next;
00020
00021 };
00022
00023
00024
00025 protected:
00026 NodeList();
00027
00028 ~NodeList();
00029
00030 public:
00031
00032 Node *getNode(
00033 const char *name
00034 ) const;
00035
00036 u32 getNodeCount() const;
00037
00038 void getNodes(
00039 Node **node_list
00040 ) const;
00041
00042 void getNodes(
00043 const char *name,
00044 u32 max_nodes,
00045 Node **node_list,
00046 u32 *n
00047 ) const;
00048
00049
00050 u32 getNodeCount(
00051 NodeType_t type
00052 ) const;
00053
00054 void getNodes(
00055 Node **node_list,
00056 NodeType_t type
00057 ) const;
00058
00059 void getNodes (
00060 const char *name,
00061 u32 max_nodes,
00062 Node **node_list,
00063 u32 *n,
00064 NodeType_t type
00065 ) const;
00066
00067
00068 void add(
00069 Node *node
00070 );
00071
00072 void remove(
00073 Node *node
00074 );
00075
00076 protected:
00077
00078
00079
00080
00081
00082 private:
00083 u32 n_nodes;
00084
00085 u32 n_nodes_of_type[NODE_TYPE_LAST];
00086
00087 u32 max_free;
00088 u32 next_free;
00089 NodeElement **free_list;
00090
00091 NodeElement *head;
00092 };
00093
00094 #endif
00095