GlPortal Class Reference  0.1.1
Source code documentation of the free and open 3D action puzzle game.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Data Fields | Private Member Functions | Private Attributes | Friends
radix::EntityManager Class Referencefinal

Manager and container of entities. More...

#include <external/RadixEngine/include/radix/EntityManager.hpp>

Inherits list< Entity >.

Public Member Functions

 EntityManager (World &)
 
Entitycreate ()
 
EntitygetById (EntityId id)
 Gets the reference to the entity with specified ID. More...
 
EntitygetByName (const std::string &name)
 Gets the reference to the entity with specified name. More...
 

Data Fields

Worldworld
 

Private Member Functions

void changeEntityName (Entity &, const std::string &, const std::string &)
 

Private Attributes

std::unordered_map
< std::string, Entity & > 
nameMap
 

Friends

class Entity
 

Detailed Description

Manager and container of entities.

Constructor & Destructor Documentation

radix::EntityManager::EntityManager ( World w)

Member Function Documentation

void radix::EntityManager::changeEntityName ( Entity ent,
const std::string &  from,
const std::string &  to 
)
private
Entity & radix::EntityManager::create ( )
Entity & radix::EntityManager::getById ( EntityId  id)

Gets the reference to the entity with specified ID.

Exceptions
std::out_of_rangeif no entity with this ID is found.
Entity & radix::EntityManager::getByName ( const std::string &  name)

Gets the reference to the entity with specified name.

Exceptions
std::out_of_rangeif no entity with this name is found.

Friends And Related Function Documentation

friend class Entity
friend

Field Documentation

std::unordered_map<std::string, Entity&> radix::EntityManager::nameMap
private
World& radix::EntityManager::world

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