Main Page   Class Hierarchy   Data Structures   File List   Data Fields   Globals  

CTTreeNode Class Reference

Define a tree of objects Implemented in: tvu_list_tree_array.cpp. More...

#include <tvu_typesdef.h>

Inheritance diagram for CTTreeNode::

CTObject

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 CTObjectGetValue ()
 For calculating. More...

virtual CTObjectCalculate (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...

TINTGetOrderType ()

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...


Detailed Description

Define a tree of objects Implemented in: tvu_list_tree_array.cpp.


Constructor & Destructor Documentation

CTTreeNode::CTTreeNode ( )
 

Constructors/Destructors.

CTTreeNode::~CTTreeNode ( ) [virtual]
 

destructor.


Member Function Documentation

CTTree CTTreeNode::Add ( LPCTObject pObject )
 

Add an object to the tree.

CTTree CTTreeNode::AddByData ( LPCTObject pObject )
 

Add an object to the tree ordered by data.

CTTree CTTreeNode::AddByID ( LPCTObject pObject )
 

Add an object to the tree ordered by ID.

CTTree CTTreeNode::AddByName ( LPCTObject pObject )
 

Add an object to the tree ordered by name.

CTObject * CTTreeNode::Calculate ( TINT iOperator,
CTObject * Object ) [virtual]
 

Calculate the mathematical operators: +, -, *, / and the comparing operators: =, <, <=, >, >=. In this case, the returned value is an object of CTInt.

Reimplemented from CTObject.

CTTreeNode::DEFINE_ID_FUNCTIONS ( CTTreeNode,
CTObject,
CLASSNAME_TYPE_TREE_ID,
CLASSNAME_TYPE_TREE ) [inline]
 

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:

TVOID CTTreeNode::Delete ( TBOOL bDeleteData = TFALSE ) [virtual]
 

Delete the buffer bDeleteData = TRUE => delete the objects contained in the array.

CTTree CTTreeNode::Find ( LPCTObject pObject )
 

Find a sub tree by the object: detect automatically if the tree is orderd by ID/name/data.

CTTree CTTreeNode::FindByData ( LPCTObject pObject )
 

Find a sub tree by the data conatained by the nodes.

CTTree CTTreeNode::FindByID ( TWORD id )
 

Find a sub tree by the ID of object.

CTTree CTTreeNode::FindByName ( TLPCSTR name )
 

Find a sub tree by the name of object.

CTTree CTTreeNode::FindByNameLong ( TLPCSTR name,
TINT nLen = 0 )
 

Find a sub tree by the name of object Find "xyz....".

LPCTObject CTTreeNode::GetNodeData ( ) [inline]
 

Get the data contained by a node.

02153 { return m_Data; };

CTObject * CTTreeNode::GetValue ( ) [virtual]
 

For calculating.

Reimplemented from CTObject.

TBOOL CTTreeNode::IsEmpty ( ) [inline]
 

if the tree is empty.

02150 { return m_Data == TNULL; };

CTTreeNode & CTTreeNode::operator= ( CTTreeNode & Item )
 

Operations.


Field Documentation

CTTree CTTreeNode::m_Left
 

Data contained by node.

TINT CTTreeNode::m_OrderType
 

The left/right sub trees;.

CTTree CTTreeNode::m_Right
 

Data contained by node.


The documentation for this class was generated from the following file:
Generated at Wed Aug 6 15:59:01 2003 for TVU's libraries for video surveillance: by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001