1#if !defined(AFX_TREE_H__BBD70483_77F5_11D3_A029_9012FE27D07B__INCLUDED_)
2#define AFX_TREE_H__BBD70483_77F5_11D3_A029_9012FE27D07B__INCLUDED_
15BEGIN_MOOTOOLS_NAMESPACE
21 TRAVERSAL_GOTO_PARENT_NODE,
22 TRAVERSAL_NODE_HAS_CHILD,
27 TREE_SERIALIZE_END_OF_LEVEL = 0,
28 TREE_SERIALIZE_CHILD_NODE = 1,
29 TREE_SERIALIZE_NO_CHILD,
37 TRAVERSAL_CHILDS_AND_ITSELF,
38 TRAVERSAL_DIRECT_CHILD,
39 TRAVERSAL_FROM_NODE_TO_NODE,
46 TREE_NODE_NONE = 0x00,
47 TREE_NODE_EXPANDED = 0x01,
50#define TREE_NODE_VERSION 3
51#define CTREE_VERSION 2
57 template<
typename CTreeNode>
friend void xDestroy(
CTreeNode *);
73 virtual bool DeleteNode();
75 void SetFlag(TreeNodeFlag
flag,
bool set);
76 unsigned int GetFlags();
78 inline const CTreeNode* GetChild()
const {
return child; };
79 inline const CTreeNode* GetParent()
const {
return parent; };
80 inline const CTreeNode* GetLeft()
const {
return left; };
81 inline const CTreeNode* GetRight()
const {
return right; };
82 inline CTreeNode* GetChild() {
return child; };
83 inline CTreeNode* GetParent() {
return parent; };
84 inline CTreeNode* GetLeft() {
return left; };
85 inline CTreeNode* GetRight() {
return right; };
87 inline void SetChild(
CTreeNode *node) { child = node; };
88 inline void SetParent(
CTreeNode* node) { parent = node; };
89 inline void SetLeft(
CTreeNode* node) { left = node; };
90 inline void SetRight(
CTreeNode* node) { right = node; };
95 virtual CTreeNode *CopyFrom(
unsigned int flags = 0)
const;
96 virtual bool operator==(
const CTreeNode& node);
128 virtual bool NodeInformation(
CTreeNode *node, TreeTraversalInfo info) = 0;
132class DLL_TOOLSFUNCTION
CTree :
public CXObject
138 DECLARE_SERIAL_XOBJECT(
CTree);
144 bool IsEmpty()
const;
154 static int GetDepth(
const CTreeNode *node);
175 void SetSilent(
bool silent) { silentSerialization =
silent; }
195 bool silentSerialization;
199END_MOOTOOLS_NAMESPACE
CCustomData class is a handly class for storing any kind of data.
CXTString< TCHAR > CXString
CXString depend on the target OS. Could be CXStringW (Windows) or CXStringA (Linux / Macos)
Definition XString.h:118
The class defines an x, y, z 3D point which can use int, float or double.
Definition 3DPoint.h:27