Component enlister and smart pointer factory.
More...
#include <ComponentFactory.hpp>
Component enlister and smart pointer factory.
Component developers need only to worry about the enlisting capabilities of this class. Component creation is Object's responsability.
◆ Key
Component key type.
Component keys are essentially the name of the component we will use when refering to it during enlistment and creation.
◆ Create() [1/2]
Component smart pointer creator.
- Parameters
-
key | Key of the desired component. |
- Returns
- A smart pointer to the newly created component.
◆ Create() [2/2]
template<typename T >
static ComponentVec EzGL::ComponentFactory::Create |
( |
T const & |
keys | ) |
|
|
inlinestatic |
Component container creator.
- Template Parameters
-
T | Container of keys with iterator support. |
- Parameters
-
keys | Keys of the desired components. |
- Returns
- A container of smart pointers to the newly created components.
◆ Enlist()
template<class T >
static Key EzGL::ComponentFactory::Enlist |
( |
Key const & |
key | ) |
|
|
inlinestatic |
Component enlister.
It is NOT RECOMMENDED for you to call this directly. Use the EZGL_COMPONENT_ENLIST macro, it will do a lot of the work for you as well as make sure that your component gets enlisted before anyone attempts to create it.
- Template Parameters
-
T | Name of the component class being enlisted. |
- Parameters
-
key | Key that should be associated with the component. |
- Returns
- Same value as the
key
parameter.
The documentation for this class was generated from the following files: