Define a factory of objects that will fill the environment in term of the environment file.
More...
#include <factory_object.h>
|
static void | Register (std::string const &key, IObject *obj) |
| Register a new object in the factory. More...
|
|
static void | DeleteAll (void) |
| Delete all the objects that have been registered in the factory.
|
|
Define a factory of objects that will fill the environment in term of the environment file.
bool Graphics::FactoryObjects::Contains |
( |
std::string const & |
key | ) |
const |
Search if an object is contained in the factory.
- Parameters
-
key | : Contains the key of the object. |
- Returns
- true : if it's contained.
-
false : if it's not contained.
IObject * Graphics::FactoryObjects::Create |
( |
std::string const & |
key | ) |
const |
Create a new object of the given key.
- Parameters
-
key | : Contains the key of the object. |
void Graphics::FactoryObjects::Register |
( |
std::string const & |
key, |
|
|
IObject * |
obj |
|
) |
| |
|
static |
Register a new object in the factory.
- Parameters
-
key | : Contains the key of the object. |
obj | : Contains the object that will be cloned in order to create a new object. |
The documentation for this class was generated from the following files:
- /home/robin_f/Programming/Git/CPP/LoveBrains/include/Graphics/factory_object.h
- /home/robin_f/Programming/Git/CPP/LoveBrains/src/Graphics/factory_object.cc