Public Member Functions | Private Member Functions | Private Attributes

EntityManager Class Reference

Centralized point for keeping track of and properly disposing of Entity objects. More...

#include <EntityManager.h>

List of all members.

Public Member Functions

 EntityManager ()
 ~EntityManager ()
bool create (EntityType type, Uint definitionId, const std::string &name)
bool destroy (const std::string &name)
Entityget (const std::string &name)
const std::string & getError ()

Private Member Functions

void createFactories ()

Private Attributes

vector< EntityFactory * > mFactories
vector< Entity * > mEntities
string mErrorMessage

Detailed Description

Centralized point for keeping track of and properly disposing of Entity objects.


Constructor & Destructor Documentation

EntityManager::EntityManager (  ) 
EntityManager::~EntityManager (  ) 

Cleans up all allocated memory for Entities.

Note:
Once the EntityManager is destroyed, all references to stored objects become invalid.

Member Function Documentation

bool EntityManager::create ( EntityType  type,
Uint  definitionId,
const std::string &  name 
)
void EntityManager::createFactories (  )  [private]
bool EntityManager::destroy ( const std::string &  name  ) 
Entity* EntityManager::get ( const std::string &  name  ) 
const string & EntityManager::getError (  ) 

Gets the last error produced.


Member Data Documentation

vector<Entity*> EntityManager::mEntities [private]

List of Entity Objects managed by this EntityManager.

string EntityManager::mErrorMessage [private]

Last error message.

List of EntityFactory objects.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines