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

IDMapTable< ID, INFO > Class Template Reference

Template for ID -> INFO (pointer) mapping. More...

#include <maptable.h>

Collaboration diagram for IDMapTable< ID, INFO >:

Collaboration graph
[legend]
List of all members.

Public Types

typedef IDMapTableNode< ID,
INFO > 
Node

Public Member Functions

 IDMapTable ()
 Construct empty map table.

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

 ~IDMapTable ()
 Destructor cleans up the map table.

INFO AddNode (ID id, INFO info, bool *is_known=NULL)
 Add a node to the ID -> INFO mapping.

INFO lookup (ID id, bool *was_found=NULL)
 Perform lookup of ID and return INFO.

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


Private Member Functions

 IDMapTable (const IDMapTable &)
 Do not use:.

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


Private Attributes

TLBTree< Node, TLDefaultOperators_CDT<
Node > > 
map
 This is the actual storage of the information.


Detailed Description

template<typename ID, typename INFO>
class IDMapTable< ID, INFO >

Template for ID -> INFO (pointer) mapping.

Author:
Wolfgang Wieser ] wwieser (a) gmx <*> de [
Template for ID -> INFO (pointer/integer) mapping internally using a B-Tree. This is the mapping class.

This class is NOT C++-safe.

Definition at line 80 of file maptable.h.


Member Typedef Documentation

template<typename ID, typename INFO>
typedef IDMapTableNode<ID,INFO> IDMapTable< ID, INFO >::Node
 

Definition at line 83 of file maptable.h.


Constructor & Destructor Documentation

template<typename ID, typename INFO>
IDMapTable< ID, INFO >::IDMapTable const IDMapTable< ID, INFO > &   )  [private]
 

Do not use:.

template<typename ID, typename INFO>
IDMapTable< ID, INFO >::IDMapTable  )  [inline]
 

Construct empty map table.

Definition at line 95 of file maptable.h.

template<typename ID, typename INFO>
IDMapTable< ID, INFO >::IDMapTable uint  m  )  [inline]
 

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

Definition at line 97 of file maptable.h.

template<typename ID, typename INFO>
IDMapTable< ID, INFO >::~IDMapTable  )  [inline]
 

Destructor cleans up the map table.

Definition at line 99 of file maptable.h.


Member Function Documentation

template<typename ID, typename INFO>
INFO IDMapTable< ID, INFO >::AddNode ID  id,
INFO  info,
bool *  is_known = NULL
[inline]
 

Add a node to the ID -> INFO mapping.

Returns (INFO)0 on success or associated INFO if ID already known.
Additionally, is_known is set in this case if non-NULL.

Definition at line 108 of file maptable.h.

template<typename ID, typename INFO>
void IDMapTable< ID, INFO >::clear  )  [inline]
 

Clear map table (all information is simply purged).

Definition at line 136 of file maptable.h.

template<typename ID, typename INFO>
INFO IDMapTable< ID, INFO >::lookup ID  id,
bool *  was_found = NULL
[inline]
 

Perform lookup of ID and return INFO.

Returns (INFO)0 on failure or associated INFO if ID is found.
Additionally, was_found is set in this case if non-NULL.

Definition at line 128 of file maptable.h.

template<typename ID, typename INFO>
void IDMapTable< ID, INFO >::operator= const IDMapTable< ID, INFO > &   )  [private]
 

Do not use:.


Member Data Documentation

template<typename ID, typename INFO>
TLBTree< Node,TLDefaultOperators_CDT<Node> > IDMapTable< ID, INFO >::map [private]
 

This is the actual storage of the information.

Definition at line 87 of file maptable.h.


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