Oxygen Engine
Modern C++ 3D Engine using OpenGL
Loading...
Searching...
No Matches
oe::util::Factory< Base, Key > Class Template Reference

Public Member Functions

Base * createEntity (const Key &key)
 
void remove (Base *entity)
 
template<typename ElementClass >
void linkEntityToClass (const std::string &name, const int &priority=0)
 
std::map< int, Key > getEntitiesNames ()
 

Member Function Documentation

◆ createEntity()

template<typename Base , typename Key >
Base * oe::util::Factory< Base, Key >::createEntity ( const Key &  key)
inline

Generate an entity instance from an identifier

◆ getEntitiesNames()

template<typename Base , typename Key >
std::map< int, Key > oe::util::Factory< Base, Key >::getEntitiesNames ( )
inline

Get all registered entity keys

Note
list is orderered by priority

◆ linkEntityToClass()

template<typename Base , typename Key >
template<typename ElementClass >
void oe::util::Factory< Base, Key >::linkEntityToClass ( const std::string &  name,
const int &  priority = 0 
)
inline

Link an entity identified by a key with a class

◆ remove()

template<typename Base , typename Key >
void oe::util::Factory< Base, Key >::remove ( Base *  entity)
inline

Supress an entity


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