7 #ifndef ELM_INHSTRUCT_BINTREE_H
8 #define ELM_INHSTRUCT_BINTREE_H
10 namespace elm {
namespace inhstruct {
36 int count(Node *node)
const;
37 bool contains(Node *current, Node *node)
const;
38 bool visit(Visitor *visitor, Node *node)
const;
39 bool visitPreOrder(Visitor *visitor, Node *node)
const;
40 bool visitPostOrder(Visitor *visitor, Node *node)
const;
41 void search(Visitor *visitor, Node *node)
const;
42 void clear(Node *node);
46 inline bool isEmpty(
void)
const;
47 inline bool contains(Node *node);
48 inline int count(
void)
const;
49 inline Node *
root(
void)
const;
50 inline void setRoot(Node *node);
51 inline void visit(Visitor *visitor)
const;
52 inline void visitPreOrder(Visitor *visitor)
const;
53 inline void visitPostOrder(Visitor *visitor)
const;
54 void search(Visitor *visitor)
const;
55 inline void clear(
void);
84 inline bool BinTree::contains(
Node *node) {
85 return contains(_root, node);
97 visit(visitor, _root);
100 visitPreOrder(visitor, _root);
103 visitPostOrder(visitor, _root);
112 #endif // ELM_INHSTRUCT_BINTREE_H