Pyrogenesis  13997
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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>

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:

Definition at line 30 of file EntityMap.h.

Member Typedef Documentation

template<class T>
typedef _iter<value_type const> EntityMap< T >::const_iterator

Definition at line 97 of file EntityMap.h.

template<class T>
typedef _iter<value_type> EntityMap< T >::iterator

Definition at line 96 of file EntityMap.h.

template<class T>
typedef entity_id_t EntityMap< T >::key_type

Definition at line 37 of file EntityMap.h.

template<class T>
typedef T EntityMap< T >::mapped_type

Definition at line 38 of file EntityMap.h.

template<class T>
typedef key_val<entity_id_t, T> EntityMap< T >::value_type

Definition at line 45 of file EntityMap.h.

Constructor & Destructor Documentation

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

Definition at line 56 of file EntityMap.h.

template<class T>
EntityMap< T >::~EntityMap ( )
inline

Definition at line 66 of file EntityMap.h.

Member Function Documentation

template<class T>
iterator EntityMap< T >::begin ( )
inline

Definition at line 99 of file EntityMap.h.

template<class T>
const_iterator EntityMap< T >::begin ( ) const
inline

Definition at line 109 of file EntityMap.h.

template<class T>
void EntityMap< T >::clear ( )
inline

Definition at line 194 of file EntityMap.h.

template<class T>
size_t EntityMap< T >::count ( const entity_id_t  key) const
inline

Definition at line 231 of file EntityMap.h.

template<class T>
bool EntityMap< T >::empty ( ) const
inline

Definition at line 121 of file EntityMap.h.

template<class T>
iterator EntityMap< T >::end ( )
inline

Definition at line 105 of file EntityMap.h.

template<class T>
const_iterator EntityMap< T >::end ( ) const
inline

Definition at line 115 of file EntityMap.h.

template<class T>
void EntityMap< T >::erase ( iterator  it)
inline

Definition at line 171 of file EntityMap.h.

template<class T>
void EntityMap< T >::erase ( const entity_id_t  key)
inline

Definition at line 181 of file EntityMap.h.

template<class T>
iterator EntityMap< T >::find ( const entity_id_t  key)
inline

Definition at line 211 of file EntityMap.h.

template<class T>
const_iterator EntityMap< T >::find ( const entity_id_t  key) const
inline

Definition at line 221 of file EntityMap.h.

template<class T>
void EntityMap< T >::insert ( const key_type  key,
const mapped_type value 
)
inline

Definition at line 125 of file EntityMap.h.

template<class T>
EntityMap& EntityMap< T >::operator= ( const EntityMap< T > &  )
private
template<class T>
size_t EntityMap< T >::size ( ) const
inline

Definition at line 122 of file EntityMap.h.

Member Data Documentation

template<class T>
value_type* EntityMap< T >::m_Buffer
private

Definition at line 50 of file EntityMap.h.

template<class T>
size_t EntityMap< T >::m_BufferCapacity
private

Definition at line 49 of file EntityMap.h.

template<class T>
size_t EntityMap< T >::m_BufferSize
private

Definition at line 48 of file EntityMap.h.

template<class T>
size_t EntityMap< T >::m_Count
private

Definition at line 52 of file EntityMap.h.


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