#include <CTree.h>
Inheritance diagram for CTreeNode:
Public Types | |
enum | Where { Front, End } |
Public Member Functions | |
CTreeNode () | |
CTreeNode (const CTreeNode &cSource) | |
virtual | ~CTreeNode () |
virtual CTreeNode * | append (CTreeNode *pcNode, Where w=End) |
virtual CTreeNode * | append (CTreeNode *pcWhere, CTreeNode *pcAppend, Where w=End) |
virtual CTreeNode * | insert (CTreeNode *pcWhere, CTreeNode *pcInsert) |
virtual void | remove (CTreeNode *pcRemove) |
virtual void | remove (CTreeTraverserBase *pcTraverser) |
virtual void | replace (CTreeNode *pcReplace, CTreeNode *pcWith) |
virtual CTreeNode * | getParent () const |
virtual int | numChildren () const |
virtual const CList< CTreeNode > & | getChildrenList () const |
virtual CTreeNode & | operator= (const CTreeNode &cSource) |
virtual CTreeNode & | operator[] (int i) const |
virtual bool | isEqual (const CTreeNode *pcNode) const |
virtual void | printTree (ostream &out=cout) const |
Protected Member Functions | |
virtual void | print (ostream &out) const |
Protected Attributes | |
CTreeNode * | m_pcParent |
CList< CTreeNode > | m_cChildrenList |
Friends | |
ostream & | operator<< (ostream &out, CTreeNode *pcTreeNode) |
|
|
|
Default constructor. |
|
Copy constructor. |
|
Destructor. |
|
Appends the node 'pcAppend' to the children list of node 'pcWhere'. The tree makes a copy of the node, so you can delete the source after appending. |
|
Appends the node 'cNode' to the children list of this node. |
|
Returns the list of children nodes of this node. |
|
Returns the parent node. |
|
Exchanges the node 'pcWhere' against 'pcInsert'. The node 'pcWhere' will be appended to the children list of 'pcInsert'. The parent node of the inserted one is returned. |
|
Compares two node. |
|
Returns the number of children of this node. |
|
Assigns one node to another. |
|
Returns the i-th child of this node.
|
|
|
|
Prints the tree that starts at this node in breath-first-order. |
|
Remove the node which the iterater points to from the tree. |
|
Remove the specified node from the tree. |
|
Replaces the node given by 'pcReplace' with another given by 'pcWith'. |
|
|
|
|
|
|