#include <XFuNTree.h>
Public Types | |
typedef XFuNTreeAbstractIterator< T > | iterator |
typedef XFuNTreeRandomAccessIterator< T > | randomAccessIterator |
typedef XFuNTreePreOrderIterator< T > | preOrderIterator |
typedef XFuNTreePostOrderIterator< T > | postOrderIterator |
Public Member Functions | |
randomAccessIterator | beginRandomAccess () const |
Returns a random iterator pointing to the root of the tree. | |
preOrderIterator | beginPreOrder () const |
Returns a pre-order iterator pointing to the first node in iteration. | |
postOrderIterator | beginPostOrder () const |
Returns a post-order iterator pointing to the first node in iteration. | |
iterator | end () const |
Returns an iterator pointing to an empty node. | |
UINT32 | size () const |
Returns the amount of nodes in the tree. | |
iterator | add (iterator aIterator, T aNewData) |
Adds a new child node to a certain node. | |
iterator | add (iterator aIterator, const UINT32 aIndex, T aNewData) |
Adds a new child node to a certain node as the Nth child node. | |
INT | insert (iterator aIterator, const UINT32 aIndex, T aNewData) |
Inserts new internal data to the Nth child node in a certain node. | |
INT | remove (const T aData) |
Removes a node with the given internal data from the list. | |
INT | remove (iterator &aIterator) |
Removes a node pointed to by an iterator. | |
XFuNTree (const UINT32 aChildNodes) | |
Creates an empty N-tree. | |
~XFuNTree () | |
Destructor. | |
Protected Member Functions | |
void | removeNode (XFuNTreeNode< T > *aNode) |
Removes a node from the tree. | |
Protected Attributes | |
UINT32 | mNodes |
Number of nodes in tree. | |
UINT32 | mChildNodes |
Number of child nodes in each node. | |
XFuNTreeNode< T > * | mRoot |
Pointer to root node in tree. |
Definition at line 23 of file XFuNTree.h.
|
Definition at line 27 of file XFuNTree.h. Referenced by XFuNTree< T >::add(). |
|
Definition at line 30 of file XFuNTree.h. Referenced by XFuNTree< T >::beginPostOrder(). |
|
Definition at line 29 of file XFuNTree.h. Referenced by XFuNTree< T >::beginPreOrder(). |
|
Definition at line 28 of file XFuNTree.h. Referenced by XFuNTree< T >::beginRandomAccess(). |
|
Creates an empty N-tree.
Definition at line 307 of file XFuNTree.h. References XFuNTree< T >::mChildNodes, XFuNTree< T >::mNodes, and XFuNTree< T >::mRoot. |
|
Destructor.
Definition at line 315 of file XFuNTree.h. References XFuNTree< T >::mRoot, and XFuNTree< T >::removeNode(). |
|
Adds a new child node to a certain node as the Nth child node. If the tree is empty, the node will be added as the root. If the Nth node is already reserved, the operation fails.
Definition at line 216 of file XFuNTree.h. References XFuNTreeAbstractIterator< T >::isValid(), XFuNTree< T >::iterator, XFuNTreeNode< T >::mAllocatedChildNodes, XFuNTree< T >::mChildNodes, XFuNTreeNode< T >::mChildren, XFuNTreeNode< T >::mIndexInParent, XFuNTreeAbstractIterator< T >::mNode, XFuNTree< T >::mNodes, and XFuNTreeNode< T >::mParent. |
|
Adds a new child node to a certain node. If the tree is empty, the node will be added as the root. If all child nodes are already reserved, the operation fails.
Definition at line 172 of file XFuNTree.h. References XFuNTreeAbstractIterator< T >::isValid(), XFuNTree< T >::iterator, XFuNTreeNode< T >::mAllocatedChildNodes, XFuNTreeNode< T >::mChildNodes, XFuNTree< T >::mChildNodes, XFuNTreeNode< T >::mChildren, XFuNTreeNode< T >::mIndexInParent, XFuNTreeAbstractIterator< T >::mNode, XFuNTree< T >::mNodes, XFuNTreeNode< T >::mParent, and XFuNTree< T >::mRoot. |
|
Returns a post-order iterator pointing to the first node in iteration.
Definition at line 160 of file XFuNTree.h. References XFuNTree< T >::postOrderIterator. |
|
Returns a pre-order iterator pointing to the first node in iteration.
Definition at line 153 of file XFuNTree.h. References XFuNTree< T >::preOrderIterator. |
|
Returns a random iterator pointing to the root of the tree.
Definition at line 146 of file XFuNTree.h. References XFuNTree< T >::randomAccessIterator. |
|
Returns an iterator pointing to an empty node.
|
|
Inserts new internal data to the Nth child node in a certain node.
Definition at line 244 of file XFuNTree.h. References XFuNTreeAbstractIterator< T >::isValid(), XFuNTreeNode< T >::mChildren, and XFuNTreeAbstractIterator< T >::mNode. |
|
Removes a node pointed to by an iterator.
Definition at line 291 of file XFuNTree.h. References XFuNTreeAbstractIterator< T >::mNode, and XFuNTree< T >::removeNode(). |
|
Removes a node with the given internal data from the list.
Definition at line 267 of file XFuNTree.h. |
|
Removes a node from the tree.
Definition at line 123 of file XFuNTree.h. References XFuNTree< T >::mChildNodes, XFuNTreeNode< T >::mChildren, XFuNTreeNode< T >::mIndexInParent, XFuNTree< T >::mNodes, and XFuNTreeNode< T >::mParent. Referenced by XFuNTree< T >::remove(), and XFuNTree< T >::~XFuNTree(). |
|
Returns the amount of nodes in the tree.
Definition at line 166 of file XFuNTree.h. References XFuNTree< T >::mNodes. |
|
Number of child nodes in each node.
Definition at line 111 of file XFuNTree.h. Referenced by XFuNTree< T >::add(), XFuNTree< T >::removeNode(), and XFuNTree< T >::XFuNTree(). |
|
Number of nodes in tree.
Definition at line 108 of file XFuNTree.h. Referenced by XFuNTree< T >::add(), XFuNTree< T >::removeNode(), XFuNTree< T >::size(), and XFuNTree< T >::XFuNTree(). |
|
Pointer to root node in tree.
Definition at line 114 of file XFuNTree.h. Referenced by XFuNTree< T >::add(), XFuNTree< T >::XFuNTree(), and XFuNTree< T >::~XFuNTree(). |
![]() | ||||
![]() |
Confidential Copyright © 2002-2003 Fathammer | with doxygen by Dimitri van Heesch |