Pyrogenesis  trunk
Classes | Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
EntityMap< T > Class Template Reference

A fast replacement for map<entity_id_t, T>. More...

#include <EntityMap.h>

Collaboration diagram for EntityMap< T >:
Collaboration graph
[legend]

Classes

struct  _iter
 
struct  key_val
 

Public Types

typedef entity_id_t key_type
 
typedef T mapped_type
 
typedef key_val< entity_id_t, Tvalue_type
 
typedef _iter< value_typeiterator
 
typedef _iter< value_type const > const_iterator
 

Public Member Functions

 EntityMap ()
 
 ~EntityMap ()
 
iterator begin ()
 
iterator end ()
 
const_iterator begin () const
 
const_iterator end () const
 
bool empty () const
 
size_t size () const
 
void insert (const key_type key, const mapped_type &value)
 
void erase (iterator it)
 
void erase (const entity_id_t key)
 
void clear ()
 
iterator find (const entity_id_t key)
 
const_iterator find (const entity_id_t key) const
 
size_t count (const entity_id_t key) const
 

Private Member Functions

 EntityMap (const EntityMap &)
 
EntityMapoperator= (const EntityMap &)
 

Private Attributes

size_t m_BufferSize
 
size_t m_BufferCapacity
 
value_typem_Buffer
 
size_t m_Count
 

Detailed Description

template<class T>
class EntityMap< T >

A fast replacement for map<entity_id_t, T>.

We make the following assumptions:

Member Typedef Documentation

template<class T>
typedef _iter<value_type const> EntityMap< T >::const_iterator
template<class T>
typedef _iter<value_type> EntityMap< T >::iterator
template<class T>
typedef entity_id_t EntityMap< T >::key_type
template<class T>
typedef T EntityMap< T >::mapped_type
template<class T>
typedef key_val<entity_id_t, T> EntityMap< T >::value_type

Constructor & Destructor Documentation

template<class T>
EntityMap< T >::EntityMap ( const EntityMap< T > &  )
private
template<class T>
EntityMap< T >::EntityMap ( )
inline
template<class T>
EntityMap< T >::~EntityMap ( )
inline

Member Function Documentation

template<class T>
iterator EntityMap< T >::begin ( )
inline
template<class T>
const_iterator EntityMap< T >::begin ( ) const
inline
template<class T>
void EntityMap< T >::clear ( )
inline
template<class T>
size_t EntityMap< T >::count ( const entity_id_t  key) const
inline
template<class T>
bool EntityMap< T >::empty ( ) const
inline
template<class T>
iterator EntityMap< T >::end ( )
inline
template<class T>
const_iterator EntityMap< T >::end ( ) const
inline
template<class T>
void EntityMap< T >::erase ( iterator  it)
inline
template<class T>
void EntityMap< T >::erase ( const entity_id_t  key)
inline
template<class T>
iterator EntityMap< T >::find ( const entity_id_t  key)
inline
template<class T>
const_iterator EntityMap< T >::find ( const entity_id_t  key) const
inline
template<class T>
void EntityMap< T >::insert ( const key_type  key,
const mapped_type value 
)
inline
template<class T>
EntityMap& EntityMap< T >::operator= ( const EntityMap< T > &  )
private
template<class T>
size_t EntityMap< T >::size ( ) const
inline

Member Data Documentation

template<class T>
value_type* EntityMap< T >::m_Buffer
private
template<class T>
size_t EntityMap< T >::m_BufferCapacity
private
template<class T>
size_t EntityMap< T >::m_BufferSize
private
template<class T>
size_t EntityMap< T >::m_Count
private

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