Simple balanced tree container. More...
#include <mi32/balancedtree.h>
Classes | |
| class | DUMP |
| Interface class to "dump" an item from the tree, used in TraverseTree(). More... | |
| class | TEST |
| Interface class to test two tree items, can use default if _T::operator<() defined. More... | |
Public Member Functions | |
| BALANCEDTREE () | |
| ~BALANCEDTREE () | |
| ERRVALUE | Allocate (INT32 InitialNumItems, TEST Test=TEST()) |
| ERRVALUE | Clear () |
| INT32 | FindAndInsertKey (_ITEMTYPE &Item, INT32 CurTagNum, bool &AddedItem) |
| bool | IsAllocated () const |
| INT32 | LocateKey (const _ITEMTYPE &Item) |
| ERRVALUE | TraverseTree (DUMP &Dump) |
Simple balanced tree container.
| BALANCEDTREE< _ITEMTYPE >::BALANCEDTREE | ( | ) | [inline] |
Constructor.
| BALANCEDTREE< _ITEMTYPE >::~BALANCEDTREE | ( | ) | [inline] |
Destructor.
| ERRVALUE BALANCEDTREE< _ITEMTYPE >::Allocate | ( | INT32 | InitialNumItems, | |
| TEST | Test = TEST() | |||
| ) | [inline] |
Initialize the balanced tree giving an initial number of items.
| ERRVALUE BALANCEDTREE< _ITEMTYPE >::Clear | ( | ) | [inline] |
Clear the balanced tree of all items.
| INT32 BALANCEDTREE< _ITEMTYPE >::FindAndInsertKey | ( | _ITEMTYPE & | Item, | |
| INT32 | CurTagNum, | |||
| bool & | AddedItem | |||
| ) | [inline] |
Locate an item in the tree and return its key value.
If the item does not exist, add it to the tree
| CurTagNum | Tag number to use if 'Item' is added to the tree | |
| AddedItem | Set to 'true' if 'Item' is added to the tree |
| bool BALANCEDTREE< _ITEMTYPE >::IsAllocated | ( | ) | const [inline] |
Determine if the balanced tree Allocate() method has been called.
| INT32 BALANCEDTREE< _ITEMTYPE >::LocateKey | ( | const _ITEMTYPE & | Item | ) | [inline] |
Locate an item in the tree and return its key value.
| ERRVALUE BALANCEDTREE< _ITEMTYPE >::TraverseTree | ( | DUMP & | Dump | ) | [inline] |
Traverse the balanced tree in sorted order.
1.6.1