CORGI
An open source project by FPL.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Groups Pages
Entity Manager

EntityManager class and functions. More...

Detailed Description

EntityManager class and functions.

Classes

class  corgi::EntityManager
 The EntityManager is the code that manages all Entities and Components in the game. Normally the game will instantiate EntityManager, and then use it to create and control all of its Entities. More...
 
class  corgi::EntityFactoryInterface
 An interface for an Entity factory, which creates Entities for a given EntityManager. More...
 

Typedefs

typedef VectorPool
< corgi::Entity >
::VectorPoolReference 
corgi::EntityRef
 A typedef that should be used as the primary way to reference an Entity. More...
 

Typedef Documentation

typedef VectorPool< Entity >::VectorPoolReference corgi::EntityRef

A typedef that should be used as the primary way to reference an Entity.

This should be used as the primary way to reference an Entity.

An EntityRef can be treated like a pointer to an Entity. In most cases, it functions interchangeably with a normal pointer, but it also contains extra functionality for determining if the EntityRef is invalid. For instance, if the Entity that the EntityRef points to is deallocated, the EntityRef will no longer be valid (even if new data exists in the same memory location previously held by the deallocated Entity).

EntityRefs are typically passed by reference or const reference. If an EntityRef is const, then you can only access the underlying Entity data in a read-only manner.