Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

ImplicitMapTable< T, ID, OP > Class Template Reference

Template for implicit map ("index" into data). More...

#include <imaptable.h>

Collaboration diagram for ImplicitMapTable< T, ID, OP >:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ImplicitMapTable ()
 Construct empty map table.

 ImplicitMapTable (uint m)
 Construct empty map table with specified order of the B-tree.

 ~ImplicitMapTable ()
 Destructor cleans up the map table.

T * AddNode (T *n)
 Add a node to the map table.

T * lookup (ID k)
 Perform lookup in map table.

void clear ()
 Clear map table (all information is simply purged).


Private Member Functions

 ImplicitMapTable (const ImplicitMapTable &)
 Do not use:.

void operator= (const ImplicitMapTable &)
 Do not use:.


Private Attributes

TLBTree< T *, OP > map
 This is the actual storage of the information.


Detailed Description

template<typename T, typename ID, typename OP>
class ImplicitMapTable< T, ID, OP >

Template for implicit map ("index" into data).

Author:
Wolfgang Wieser ] wwieser (a) gmx <*> de [
This is much like the ID -> INFO mapping provided in maptable.h but instead of storing the ID in the node, the ID is already present in the pointers held and hence need not be stored again.

In effect, this is nothing more than a B-tree with suitable compare operators.

This is only meant to be used for pointer types for T. You need to supply an operator template for comparison operators. In simple cases, you can get along with only providing an order paramter and using the ImplicitMapOperators<> template (this file). In this case, the order parameter must be of type ID.

This class is NOT C++-safe.

Definition at line 96 of file imaptable.h.


Constructor & Destructor Documentation

template<typename T, typename ID, typename OP>
ImplicitMapTable< T, ID, OP >::ImplicitMapTable const ImplicitMapTable< T, ID, OP > &   )  [private]
 

Do not use:.

template<typename T, typename ID, typename OP>
ImplicitMapTable< T, ID, OP >::ImplicitMapTable  )  [inline]
 

Construct empty map table.

Definition at line 110 of file imaptable.h.

template<typename T, typename ID, typename OP>
ImplicitMapTable< T, ID, OP >::ImplicitMapTable uint  m  )  [inline]
 

Construct empty map table with specified order of the B-tree.

Definition at line 112 of file imaptable.h.

template<typename T, typename ID, typename OP>
ImplicitMapTable< T, ID, OP >::~ImplicitMapTable  )  [inline]
 

Destructor cleans up the map table.

Definition at line 114 of file imaptable.h.


Member Function Documentation

template<typename T, typename ID, typename OP>
T* ImplicitMapTable< T, ID, OP >::AddNode T *  n  )  [inline]
 

Add a node to the map table.

Returns NULL on success or already known entry (type T*).

Definition at line 121 of file imaptable.h.

template<typename T, typename ID, typename OP>
void ImplicitMapTable< T, ID, OP >::clear  )  [inline]
 

Clear map table (all information is simply purged).

Definition at line 141 of file imaptable.h.

template<typename T, typename ID, typename OP>
T* ImplicitMapTable< T, ID, OP >::lookup ID  k  )  [inline]
 

Perform lookup in map table.

Returns NULL on failure or associated info (T*) if found.

Definition at line 134 of file imaptable.h.

template<typename T, typename ID, typename OP>
void ImplicitMapTable< T, ID, OP >::operator= const ImplicitMapTable< T, ID, OP > &   )  [private]
 

Do not use:.


Member Data Documentation

template<typename T, typename ID, typename OP>
TLBTree<T*,OP> ImplicitMapTable< T, ID, OP >::map [private]
 

This is the actual storage of the information.

Definition at line 102 of file imaptable.h.


The documentation for this class was generated from the following file:
Generated on Sat Feb 19 22:35:27 2005 for Ray by doxygen 1.3.5