Main Page | Class Hierarchy | Class List | Directories | File List | Class Members

RNReplicaNet::RegistryManagerMap< I, T, C > Class Template Reference

#include <RegistryManagerMap.h>

List of all members.

Public Types

enum  Direction { kForward = 0, kBackward, kUndefined }

Public Member Functions

 RegistryManagerMap ()
virtual ~RegistryManagerMap ()
bool AddItem (const I &index, const T *item)
T * FindItem (const I &index)
bool RemoveItem (const I &index)
void RemoveItem (void)
void BeginIterate (void)
void EndIterate (void)
T * Iterate (void)


Detailed Description

template<class I, class T, class C = std::less<I>>
class RNReplicaNet::RegistryManagerMap< I, T, C >

RegistryManager is a template class for handling classes in organised maps


Constructor & Destructor Documentation

template<class I, class T, class C = std::less<I>>
RNReplicaNet::RegistryManagerMap< I, T, C >::RegistryManagerMap  )  [inline]
 

The ctor performs some basic initialisation

template<class I, class T, class C = std::less<I>>
virtual RNReplicaNet::RegistryManagerMap< I, T, C >::~RegistryManagerMap  )  [inline, virtual]
 

The dtor makes sure everything is tidy


Member Function Documentation

template<class I, class T, class C = std::less<I>>
bool RNReplicaNet::RegistryManagerMap< I, T, C >::AddItem const I &  index,
const T *  item
[inline]
 

Adds an item to the list. This does not allocate an item as this is left to the user to do

Parameters:
item the item pointer to add

template<class I, class T, class C = std::less<I>>
void RNReplicaNet::RegistryManagerMap< I, T, C >::BeginIterate void   )  [inline]
 

Starts the iteration of the items in the list from the start and works forwards

template<class I, class T, class C = std::less<I>>
void RNReplicaNet::RegistryManagerMap< I, T, C >::EndIterate void   )  [inline]
 

Starts the iteration of the items in the list from the end and works backwards

template<class I, class T, class C = std::less<I>>
T* RNReplicaNet::RegistryManagerMap< I, T, C >::FindItem const I &  index  )  [inline]
 

Finds an item using the index and if found also sets the current iterator to the item in the map. The direction of the iterator is set to be kUndefined.

Parameters:
index The index to use.
Returns:
The pointer to T corresponding to the index or null if the index was not found.

template<class I, class T, class C = std::less<I>>
T* RNReplicaNet::RegistryManagerMap< I, T, C >::Iterate void   )  [inline]
 

Iterates through the items in the list

Returns:
returns the next item pointer in the list or returns NULL for the end of the list

template<class I, class T, class C = std::less<I>>
void RNReplicaNet::RegistryManagerMap< I, T, C >::RemoveItem void   )  [inline]
 

Removes the item at the current iterator.

template<class I, class T, class C = std::less<I>>
bool RNReplicaNet::RegistryManagerMap< I, T, C >::RemoveItem const I &  index  )  [inline]
 

Removes an item from the list but does not free the item as this is left to the user to do

Parameters:
item the item pointer to remove
Returns:
True indicates the index was in the map. False indicates the index was not in the map.


The documentation for this class was generated from the following file:
Generated on Sun Oct 30 01:12:31 2005 for Platform by  doxygen 1.4.1