BALANCEDTREE< _BT > Class Template Reference

Wrapper class to the BTree API. More...

#include <mi32/btreefun.h>

List of all members.

Public Member Functions

ERRVALUE Allocate (INT32 InitialNumItems, TEST Test=TEST())
 BALANCEDTREE ()
ERRVALUE Clear ()
ERRVALUE DumpTree (DUMP &Dump)
INT32 FindAndInsertKey (_BT &Item, INT32 CurTagNum, bool &AddedItem)
bool IsAllocated () const
INT32 LocateKey (const _BT &Item)
void SetTestFunc (TEST &NewTest)
ERRVALUE TraverseTree (DUMP &Dump)
 ~BALANCEDTREE ()

Classes

class  DUMP
 Interface class to "dump" an item from the tree, used in DumpTree() and TraverseTree(). More...
class  TEST
 Interface class to test two tree items, can use default if _T::operator<() defined. More...


Detailed Description

template<typename _BT>
class BALANCEDTREE< _BT >

Wrapper class to the BTree API.

Definition at line 205 of file btreefun.h.


Constructor & Destructor Documentation

template<typename _BT>
BALANCEDTREE< _BT >::BALANCEDTREE (  )  [inline]

Constructor.

Definition at line 234 of file btreefun.h.

template<typename _BT>
BALANCEDTREE< _BT >::~BALANCEDTREE (  )  [inline]

Destructor.

Definition at line 238 of file btreefun.h.


Member Function Documentation

template<typename _BT>
ERRVALUE BALANCEDTREE< _BT >::Allocate ( INT32  InitialNumItems,
TEST  Test = TEST() 
) [inline]

Initialize the balanced tree giving an initial number of items.

Definition at line 247 of file btreefun.h.

template<typename _BT>
ERRVALUE BALANCEDTREE< _BT >::Clear (  )  [inline]

Clear the balanced tree of all items.

Definition at line 257 of file btreefun.h.

template<typename _BT>
ERRVALUE BALANCEDTREE< _BT >::DumpTree ( DUMP Dump  )  [inline]

Dump the balanced tree in no particular order.

Definition at line 261 of file btreefun.h.

template<typename _BT>
INT32 BALANCEDTREE< _BT >::FindAndInsertKey ( _BT &  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

Parameters:
CurTagNum  Tag number to use if 'Item' is added to the tree
AddedItem  Set to 'true' if 'Item' is added to the tree

Definition at line 267 of file btreefun.h.

template<typename _BT>
bool BALANCEDTREE< _BT >::IsAllocated (  )  const [inline]

Determine if the balanced tree Allocate() method has been called.

Definition at line 279 of file btreefun.h.

template<typename _BT>
INT32 BALANCEDTREE< _BT >::LocateKey ( const _BT &  Item  )  [inline]

Locate an item in the tree and return its key value.

Definition at line 283 of file btreefun.h.

template<typename _BT>
void BALANCEDTREE< _BT >::SetTestFunc ( TEST NewTest  )  [inline]

Set a new test function for locating tree items.

Definition at line 288 of file btreefun.h.

template<typename _BT>
ERRVALUE BALANCEDTREE< _BT >::TraverseTree ( DUMP Dump  )  [inline]

Dump the balanced tree in sorted order.

Definition at line 296 of file btreefun.h.


The documentation for this class was generated from the following file:
Generated on Thu Apr 26 04:46:58 2007 for TNTsdk by  doxygen 1.5.2