Particle Universe  1.2
ParticleUniverse::PoolMap< T > Class Template Reference

#include <ParticleUniversePoolMap.h>

Public Types

typedef std::multimap< String, T * > PoolMapMap
 
typedef PoolMapMap::iterator PoolMapIterator
 

Public Member Functions

 PoolMap (bool managed=false)
 
virtual ~PoolMap (void)
 
bool isEmpty (void)
 
size_t getSize (void)
 
void resetIterator (void)
 
T * getFirst (void)
 
T * getNext (void)
 
bool end (void)
 
void clear (void)
 
void addElement (const String &key, T *element)
 
T * releaseElement (const String &key)
 
void releaseAllElements (void)
 
void lockLatestElement (void)
 
void lockAllElements (void)
 

Public Attributes

PoolMapIterator mPoolMapIterator
 

Protected Attributes

bool mManaged
 
PoolMapMap mReleased
 
PoolMapMap mLocked
 

Detailed Description

template<typename T>
class ParticleUniverse::PoolMap< T >

The PoolMap is an extention of the regular Pool. The PoolMap contains objects that can be found by name.

Member Typedef Documentation

template<typename T>
typedef PoolMapMap::iterator ParticleUniverse::PoolMap< T >::PoolMapIterator
template<typename T>
typedef std::multimap<String, T*> ParticleUniverse::PoolMap< T >::PoolMapMap

Constructor & Destructor Documentation

template<typename T>
ParticleUniverse::PoolMap< T >::PoolMap ( bool  managed = false)
inline
template<typename T>
virtual ParticleUniverse::PoolMap< T >::~PoolMap ( void  )
inlinevirtual

Member Function Documentation

template<typename T>
void ParticleUniverse::PoolMap< T >::addElement ( const String key,
T *  element 
)
inline

Add an element to the PoolMap.

Remarks
Can only be done if the pool doesn't manage the creation and desctruction of the elements.
template<typename T>
void ParticleUniverse::PoolMap< T >::clear ( void  )
inline

Todo

template<typename T>
bool ParticleUniverse::PoolMap< T >::end ( void  )
inline

Todo

template<typename T>
T* ParticleUniverse::PoolMap< T >::getFirst ( void  )
inline

Todo

template<typename T>
T* ParticleUniverse::PoolMap< T >::getNext ( void  )
inline

Todo

template<typename T>
size_t ParticleUniverse::PoolMap< T >::getSize ( void  )
inline

Todo

template<typename T>
bool ParticleUniverse::PoolMap< T >::isEmpty ( void  )
inline

Returns true if the number of released elements is 0.

template<typename T>
void ParticleUniverse::PoolMap< T >::lockAllElements ( void  )
inline

Lock all elements in the pool.

Remarks
All released objects are locked.
template<typename T>
void ParticleUniverse::PoolMap< T >::lockLatestElement ( void  )
inline

Todo

template<typename T>
void ParticleUniverse::PoolMap< T >::releaseAllElements ( void  )
inline

Todo

template<typename T>
T* ParticleUniverse::PoolMap< T >::releaseElement ( const String key)
inline

Get an element from the pool.

Remarks
This function does not only retrieve an object, but the object is also marked as ´released´. This means that the object is exposed to the outside world. If objects in pool are traversed, only the released objects are taken into account.
template<typename T>
void ParticleUniverse::PoolMap< T >::resetIterator ( void  )
inline

Todo

Member Data Documentation

template<typename T>
PoolMapMap ParticleUniverse::PoolMap< T >::mLocked
protected
template<typename T>
bool ParticleUniverse::PoolMap< T >::mManaged
protected
template<typename T>
PoolMapIterator ParticleUniverse::PoolMap< T >::mPoolMapIterator
template<typename T>
PoolMapMap ParticleUniverse::PoolMap< T >::mReleased
protected

The documentation for this class was generated from the following file: