igor::iComponentMap< T > Class Template Reference

#include <iComponentMap.h>

Public Member Functions

T & add (iEntityID entityID, const T &component)
 
void remove (iEntityID entityID)
 
T * tryGet (iEntityID entityID)
 
T & get (iEntityID entityID)
 
const T & get (iEntityID entityID) const
 
void clear ()
 

Detailed Description

template<typename T>
class igor::iComponentMap< T >

entity to component map

used for handling component types unknown to Igor

Member Function Documentation

◆ add()

template<typename T >
T & igor::iComponentMap< T >::add ( iEntityID  entityID,
const T &  component 
)
inline

adds component for given entity

Parameters
entityIDthe given entity
componentthe component to be added

◆ clear()

template<typename T >
void igor::iComponentMap< T >::clear ( )
inline

◆ get() [1/2]

template<typename T >
T & igor::iComponentMap< T >::get ( iEntityID  entityID)
inline
Returns
a reference to a component of given entity

critical error if entity does not exist

Parameters
entityIDthe given entity id

◆ get() [2/2]

template<typename T >
const T & igor::iComponentMap< T >::get ( iEntityID  entityID) const
inline
Returns
a const reference to a component of given entity

critical error if entity does not exist

Parameters
entityIDthe given entity id

◆ remove()

template<typename T >
void igor::iComponentMap< T >::remove ( iEntityID  entityID)
inline

removes component for given entity id

Parameters
entityIDthe given entity id

◆ tryGet()

template<typename T >
T * igor::iComponentMap< T >::tryGet ( iEntityID  entityID)
inline
Returns
a pointer to a component if available of given entity
Parameters
entityIDthe given entity id

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