#include <GLIBNode.h>
Public Member Functions | |
GLIBTreeNode (Data *data) | |
Constructor. | |
virtual | ~GLIBTreeNode () |
Destructor. | |
Static Public Member Functions | |
static void | DeleteAllGLIBTreeNodes (GLIBTreeNode< Data, ConfigData > *Node, DeleteTreeDataEnum DeleteTreeData) |
Delete Node and all its children. | |
static GLIBTreeNode< Data, ConfigData > * | Insert (GLIBTreeNode< Data, ConfigData > *Node, ACompareNodesAlgorithm< Data, ConfigData > *Compare, Data *NodeData, bool *Inserted) |
Recursively search for the correct place for a node and insert it. | |
static GLIBTreeNode< Data, ConfigData > * | Remove (GLIBTreeNode< Data, ConfigData > *Node, ACompareNodesAlgorithm< Data, ConfigData > *Compare, Data *NodeData) |
Delete a node from the tree. | |
static Data * | Lookup (GLIBTreeNode< Data, ConfigData > *Node, ACompareNodesAlgorithm< Data, ConfigData > *Compare, Data *NodeData) |
Recursive search for data. If not found, return NULL. | |
static Data * | Search (GLIBTreeNode< Data, ConfigData > *Node, ACompareNodesAlgorithm< Data, ConfigData > *Compare, Data *NodeData) |
Loop search for data. If not found, return NULL. | |
static int | GetHeight (GLIBTreeNode< Data, ConfigData > *Node) |
Get height (depth) of the tree. | |
static int | GetNodeCount (GLIBTreeNode< Data, ConfigData > *Node) |
Get the number of nodes in a tree. | |
Static Protected Member Functions | |
static GLIBTreeNode< Data, ConfigData > * | Balance (GLIBTreeNode< Data, ConfigData > *Node) |
Balance the node tree. | |
static GLIBTreeNode< Data, ConfigData > * | RemoveLeftmost (GLIBTreeNode< Data, ConfigData > *Node, GLIBTreeNode< Data, ConfigData > **Leftmost) |
Remove the leftmost node. | |
static GLIBTreeNode< Data, ConfigData > * | RestoreLeftBalance (GLIBTreeNode< Data, ConfigData > *Node, int OldBalance) |
Balance the left side of the tree. | |
static GLIBTreeNode< Data, ConfigData > * | RestoreRightBalance (GLIBTreeNode< Data, ConfigData > *Node, int OldBalance) |
Balance the right side of the tree. | |
static GLIBTreeNode< Data, ConfigData > * | RotateLeft (GLIBTreeNode< Data, ConfigData > *Node) |
Rotate node one node to the left. | |
static GLIBTreeNode< Data, ConfigData > * | RotateRight (GLIBTreeNode< Data, ConfigData > *Node) |
Rotate node one node to the right. | |
Protected Attributes | |
GLIBTreeNode< Data, ConfigData > * | m_Left |
Pointer to the left node. | |
GLIBTreeNode< Data, ConfigData > * | m_Right |
Pointer to the right node. | |
Data * | m_Data |
Pointer to the data in the node. | |
signed char | m_Balance |
Balance of the node - used to rebranch tree. |
Definition at line 17 of file GLIBNode.h.
|
Definition at line 349 of file GLIBNode.h. References GLIBTreeNode< Data, ConfigData >::m_Balance, GLIBTreeNode< Data, ConfigData >::m_Left, GLIBTreeNode< Data, ConfigData >::m_Right, GLIBTreeNode< Data, ConfigData >::RotateLeft(), and GLIBTreeNode< Data, ConfigData >::RotateRight(). Referenced by GLIBTreeNode< Data, ConfigData >::Insert(), GLIBTreeNode< Data, ConfigData >::RestoreLeftBalance(), and GLIBTreeNode< Data, ConfigData >::RestoreRightBalance(). |
|
Definition at line 472 of file GLIBNode.h. References GLIBTreeNode< Data, ConfigData >::m_Data, GLIBTreeNode< Data, ConfigData >::m_Left, and GLIBTreeNode< Data, ConfigData >::m_Right. Referenced by GLIBTree< Data, ConfigData >::~GLIBTree(). |
|
Definition at line 316 of file GLIBNode.h. References GLIBTreeNode< Data, ConfigData >::m_Left, and GLIBTreeNode< Data, ConfigData >::m_Right. Referenced by GLIBTree< Data, ConfigData >::GetHeight(). |
|
Definition at line 336 of file GLIBNode.h. References GLIBTreeNode< Data, ConfigData >::m_Left, and GLIBTreeNode< Data, ConfigData >::m_Right. Referenced by GLIBTree< Data, ConfigData >::GetNumberOfNodes(). |
|
Definition at line 149 of file GLIBNode.h. References GLIBTreeNode< Data, ConfigData >::Balance(), GLIBTreeNode< Data, ConfigData >::m_Balance, GLIBTreeNode< Data, ConfigData >::m_Data, GLIBTreeNode< Data, ConfigData >::m_Left, and GLIBTreeNode< Data, ConfigData >::m_Right. Referenced by GLIBTree< Data, ConfigData >::Insert(). |
|
Definition at line 266 of file GLIBNode.h. References GLIBTreeNode< Data, ConfigData >::m_Data, GLIBTreeNode< Data, ConfigData >::m_Left, and GLIBTreeNode< Data, ConfigData >::m_Right. Referenced by GLIBTree< Data, ConfigData >::Find(). |
|
Definition at line 212 of file GLIBNode.h. References GLIBTreeNode< Data, ConfigData >::m_Balance, GLIBTreeNode< Data, ConfigData >::m_Data, GLIBTreeNode< Data, ConfigData >::m_Left, GLIBTreeNode< Data, ConfigData >::m_Right, GLIBTreeNode< Data, ConfigData >::RemoveLeftmost(), GLIBTreeNode< Data, ConfigData >::RestoreLeftBalance(), and GLIBTreeNode< Data, ConfigData >::RestoreRightBalance(). Referenced by GLIBTree< Data, ConfigData >::Delete(). |
|
Definition at line 368 of file GLIBNode.h. References GLIBTreeNode< Data, ConfigData >::m_Left, GLIBTreeNode< Data, ConfigData >::m_Right, and GLIBTreeNode< Data, ConfigData >::RestoreLeftBalance(). Referenced by GLIBTreeNode< Data, ConfigData >::Remove(). |
|
Definition at line 382 of file GLIBNode.h. References GLIBTreeNode< Data, ConfigData >::Balance(), GLIBTreeNode< Data, ConfigData >::m_Balance, and GLIBTreeNode< Data, ConfigData >::m_Left. Referenced by GLIBTreeNode< Data, ConfigData >::Remove(), and GLIBTreeNode< Data, ConfigData >::RemoveLeftmost(). |
|
Definition at line 396 of file GLIBNode.h. References GLIBTreeNode< Data, ConfigData >::Balance(), GLIBTreeNode< Data, ConfigData >::m_Balance, and GLIBTreeNode< Data, ConfigData >::m_Right. Referenced by GLIBTreeNode< Data, ConfigData >::Remove(). |
|
Definition at line 410 of file GLIBNode.h. References GLIBTreeNode< Data, ConfigData >::m_Balance, GLIBTreeNode< Data, ConfigData >::m_Left, and GLIBTreeNode< Data, ConfigData >::m_Right. Referenced by GLIBTreeNode< Data, ConfigData >::Balance(). |
|
Definition at line 442 of file GLIBNode.h. References GLIBTreeNode< Data, ConfigData >::m_Balance, GLIBTreeNode< Data, ConfigData >::m_Left, and GLIBTreeNode< Data, ConfigData >::m_Right. Referenced by GLIBTreeNode< Data, ConfigData >::Balance(). |
|
Definition at line 292 of file GLIBNode.h. References GLIBTreeNode< Data, ConfigData >::m_Data, GLIBTreeNode< Data, ConfigData >::m_Left, and GLIBTreeNode< Data, ConfigData >::m_Right. Referenced by GLIBTree< Data, ConfigData >::Search(). |