Add very old versions (for history).
[opsoft_archive.git] / silentbob / silentbob-1.4 / gclib / include / Tree.h
blob947089be36b13c0cb9268b2d8e7a93e5280c8b86
1 /*
2 * (c) Oleg Puchinin 2007
3 * graycardinalster@gmail.com
5 */
7 #ifndef DEFINE_TREE_H
8 #define DEFINE_TREE_H
10 struct node_t;
11 struct node_t
13 char * key;
14 char * userData;
15 node_t * parentNode;
16 EList * childNodes; // node_t *
19 class Tree
21 public:
22 Tree ();
23 ~Tree ();
25 node_t * rootNode;
26 node_t * newNode (node_t * parent, char * key = NULL, char * userData = NULL);
27 char * freeNode (node_t * node, Dfunc_t f);
28 EList * childs (node_t * node);
29 node_t * searchDown (node_t * node, char *key);
30 node_t * searchUp (node_t * node, char *key);
31 EList * keyChilds (node_t * node, char * key);
34 #endif