Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
|
Object wrapping an entity_id_t, with a SEntityComponentCache to support fast QueryInterface() / CmpPtr<>() calls. More...
#include <Entity.h>
Public Member Functions | |
CEntityHandle () | |
CEntityHandle (entity_id_t id, SEntityComponentCache *componentCache) | |
entity_id_t | GetId () const |
SEntityComponentCache * | GetComponentCache () const |
Private Attributes | |
entity_id_t | m_Id |
SEntityComponentCache * | m_ComponentCache |
Object wrapping an entity_id_t, with a SEntityComponentCache to support fast QueryInterface() / CmpPtr<>() calls.
Components can use IComponent::GetSystemEntity() and IComponent::GetEntityHandle() to get handles to SYSTEM_ENTITY and themselves, and then pass those handles around.
Be careful not to store a CEntityHandle for longer than the lifetime of the entity (listen to MT_Destroy messages to know when to release it) - otherwise the handle will contain a dangling pointer and will probably crash.
|
inline |
|
inline |
|
inline |
|
inline |
|
private |
|
private |