#include <tvu_typesdef.h>
Inheritance diagram for CTTreeNode::
Public Types | |
enum | { OT_NAME, OT_ID, OT_DATA } |
Public Methods | |
CTTreeNode () | |
Constructors/Destructors. More... | |
virtual | ~CTTreeNode () |
destructor. More... | |
virtual TVOID | Delete (TBOOL bDeleteData=TFALSE) |
Delete the buffer bDeleteData = TRUE => delete the objects contained in the array. More... | |
DEFINE_ID_FUNCTIONS (CTTreeNode, CTObject, CLASSNAME_TYPE_TREE_ID, CLASSNAME_TYPE_TREE) public | |
Overwrite. More... | |
virtual CTObject* | GetValue () |
For calculating. More... | |
virtual CTObject* | Calculate (TINT iOperator, CTObject *Object) |
Calculate the mathematical operators: +, -, *, / and the comparing operators: =, <, <=, >, >=. In this case, the returned value is an object of CTInt. More... | |
CTTreeNode& | operator= (CTTreeNode &Item) |
Operations. More... | |
TBOOL | IsEmpty () |
if the tree is empty. More... | |
TBOOL | IsNotEmpty () |
LPCTObject | GetNodeData () |
Get the data contained by a node. More... | |
CTTree | Add (LPCTObject pObject) |
Add an object to the tree. More... | |
CTTree | AddByName (LPCTObject pObject) |
Add an object to the tree ordered by name. More... | |
CTTree | AddByID (LPCTObject pObject) |
Add an object to the tree ordered by ID. More... | |
CTTree | AddByData (LPCTObject pObject) |
Add an object to the tree ordered by data. More... | |
CTTree | Find (LPCTObject pObject) |
Find a sub tree by the object: detect automatically if the tree is orderd by ID/name/data. More... | |
CTTree | FindByName (TLPCSTR name) |
Find a sub tree by the name of object. More... | |
CTTree | FindByNameLong (TLPCSTR name, TINT nLen=0) |
Find a sub tree by the name of object Find "xyz....". More... | |
CTTree | FindByID (TWORD id) |
Find a sub tree by the ID of object. More... | |
CTTree | FindByData (LPCTObject pObject) |
Find a sub tree by the data conatained by the nodes. More... | |
TINT& | GetOrderType () |
Data Fields | |
LPCTObject | m_Data |
CTTree | m_Left |
Data contained by node. More... | |
CTTree | m_Right |
Data contained by node. More... | |
TINT | m_OrderType |
The left/right sub trees;. More... |
|
Constructors/Destructors.
|
|
destructor.
|
|
Add an object to the tree.
|
|
Add an object to the tree ordered by data.
|
|
Add an object to the tree ordered by ID.
|
|
Add an object to the tree ordered by name.
|
|
Calculate the mathematical operators: +, -, *, / and the comparing operators: =, <, <=, >, >=. In this case, the returned value is an object of CTInt.
Reimplemented from CTObject. |
|
Overwrite.
02135 : 02137 virtual CTList GetSaveLoadObjects(TBOOL bOnLoad = TTRUE); 02139 virtual TBOOL Save(LPCTFile pFile, TINT Marge); 02141 virtual CTTree CreateNewTree() { return new CTTreeNode; }; public: |
|
Delete the buffer bDeleteData = TRUE => delete the objects contained in the array.
|
|
Find a sub tree by the object: detect automatically if the tree is orderd by ID/name/data.
|
|
Find a sub tree by the data conatained by the nodes.
|
|
Find a sub tree by the ID of object.
|
|
Find a sub tree by the name of object.
|
|
Find a sub tree by the name of object Find "xyz....".
|
|
Get the data contained by a node.
02153 { return m_Data; }; |
|
For calculating.
Reimplemented from CTObject. |
|
if the tree is empty.
02150 { return m_Data == TNULL; }; |
|
Operations.
|
|
Data contained by node.
|
|
The left/right sub trees;.
|
|
Data contained by node.
|