EntityManager Class Reference

The Entity Manager is the central interface point to all entity related functions of this program. More...

List of all members.

Public Member Functions

 EntityManager ()
 Constructor.
 ~EntityManager ()
 Deconstructor.
void init ()
 Initialises the EntityManager.
void clear ()
 Clears the EntityManager.
void refAdd ()
 Increases the reference counter.
void refRelease ()
 Decreases the reference counter.
bool addEntity (Entity *entity)
 Adds the given Entity to the EntityManager.
EntitycreateEntity (const std::string &name, Entity *parent=NULL)
 Creates (and adds) an Entity with the given name.
EntitygetEntity (const u32 id)
 Gets the Entity with the given ID.
EntitygetEntity (const std::string &name)
 Gets the Entity with the given name.
void removeAllEntities ()
 Removes all entities from the EntityManager.
bool removeEntity (Entity *entity)
 Removes the given Entity.
bool removeEntity (const u32 id)
 Removes the given Entity with the given ID.
bool removeEntity (const std::string &name)
 Removes the given Entity with the given name.


Detailed Description

The Entity Manager is the central interface point to all entity related functions of this program.

Definition at line 30 of file EntityManager.h.


Constructor & Destructor Documentation

EntityManager::EntityManager (  ) 

Constructor.

Definition at line 24 of file EntityManager.cpp.

EntityManager::~EntityManager (  ) 

Deconstructor.

Definition at line 30 of file EntityManager.cpp.


Member Function Documentation

bool EntityManager::addEntity ( Entity entity  ) 

Adds the given Entity to the EntityManager.

Parameters:
entity Pointer to the Entity to add.
Returns:
True if addition was successful, false if addition was a failure.

Definition at line 60 of file EntityManager.cpp.

void EntityManager::clear (  ) 

Clears the EntityManager.

Definition at line 41 of file EntityManager.cpp.

Entity * EntityManager::createEntity ( const std::string &  name,
Entity parent = NULL 
)

Creates (and adds) an Entity with the given name.

Parameters:
name Name of the Entity.
parent Parent of the entity that is going to be created.
Returns:
Pointer to the Entity on success, NULL on failure.

Definition at line 77 of file EntityManager.cpp.

Entity * EntityManager::getEntity ( const std::string &  name  ) 

Gets the Entity with the given name.

Returns:
Pointer to the Entity if found, else NULL.

Definition at line 103 of file EntityManager.cpp.

Entity * EntityManager::getEntity ( const u32  id  ) 

Gets the Entity with the given ID.

Returns:
Pointer to the Entity if found, else NULL.

Definition at line 91 of file EntityManager.cpp.

void EntityManager::init (  ) 

Initialises the EntityManager.

Definition at line 36 of file EntityManager.cpp.

void EntityManager::refAdd (  ) 

Increases the reference counter.

Note:
For internal use only!

Definition at line 48 of file EntityManager.cpp.

void EntityManager::refRelease (  ) 

Decreases the reference counter.

Note:
For internal use only!

Definition at line 54 of file EntityManager.cpp.

void EntityManager::removeAllEntities (  ) 

Removes all entities from the EntityManager.

Definition at line 115 of file EntityManager.cpp.

bool EntityManager::removeEntity ( const std::string &  name  ) 

Removes the given Entity with the given name.

Parameters:
name Name of the Entity to remove.
Returns:
True if removal was successful, false if removal was a failure.

Definition at line 172 of file EntityManager.cpp.

bool EntityManager::removeEntity ( const u32  id  ) 

Removes the given Entity with the given ID.

Parameters:
id ID of the Entity to remove.
Returns:
True if removal was successful, false if removal was a failure.

Definition at line 150 of file EntityManager.cpp.

bool EntityManager::removeEntity ( Entity entity  ) 

Removes the given Entity.

Parameters:
entity Pointer to the Entity to remove.
Returns:
True if removal was successful, false if removal was a failure.

Definition at line 124 of file EntityManager.cpp.


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

Generated on Wed Jun 10 22:26:25 2009 for Sirrf - Simple Irrlicht Framework by  doxygen 1.5.8