-
Notifications
You must be signed in to change notification settings - Fork 4
/
tree.h
49 lines (36 loc) · 1010 Bytes
/
tree.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#ifndef DATA_STRUCTURE__TREE
#define DATA_STRUCTURE__TREE
/* <INCLUDE> *************/
#include "popc.h"
/* </INCLUDE> ************/
/* <DEFINE> *************/
//#define REQUIRED STUFFS HERE
/* </DEFINE> ************/
/* <CONST> *************/
//#define REQUIRED STUFFS HERE
/* </CONST> ************/
/* <TYPE> *************/
subject treeNode treeNode; //FD!
subject treeNode {
object ptr obj;
treeNode ptr left;
treeNode ptr right;
} treeNode;
pattern treeProto {
} treeProto;
/* </TYPE> ************/
/* <VARIABLE> *************/
/* </VARIABLE> ************/
/* <DECLARATION> *************/
#ifdef Cplusplus
extern "C" {
#endif
void treeInsertNode(treeNode ptr2d root, linkedListCompareDelegate compare, object ptr obj);
void inOrder(treeNode ptr root, linkedListDisplayDelegate display);
void postOrder(treeNode ptr root, linkedListDisplayDelegate display);
void preOrder(treeNode ptr root, linkedListDisplayDelegate display);
#ifdef Cplusplus
}
#endif
/* </DECLARATION> ************/
#endif