The ConstructionFactory class is the base class for a factory whose objects are created from a registered ConstructionFactory::Constructor.  
 More...
#include <ConstructionFactory.h>
|  | 
| typedef T(* | Constructor) () | 
|  | The Constructor type definition refers to a zero-parameter method which returns an instance of T.  More... 
 | 
|  | 
template<typename T>
class fl::ConstructionFactory< T >
The ConstructionFactory class is the base class for a factory whose objects are created from a registered ConstructionFactory::Constructor. 
- Author
- Juan Rada-Vilela, Ph.D. 
- See also
- FactoryManager 
- Since
- 5.0 
Definition at line 38 of file ConstructionFactory.h.
◆ Constructor
The Constructor type definition refers to a zero-parameter method which returns an instance of T. 
Definition at line 44 of file ConstructionFactory.h.
 
 
◆ ConstructionFactory()
◆ ~ConstructionFactory()
◆ available()
Returns a vector of keys for the constructors available. 
- Returns
- a vector of keys for the constructors available 
Definition at line 180 of file ConstructionFactory.h.
 
 
◆ constructObject()
Creates an object by executing the constructor associated to the given key. 
- Parameters
- 
  
    | key | is the unique name by which constructors are registered |  
 
- Returns
- an object by executing the constructor associated to the given key 
Definition at line 166 of file ConstructionFactory.h.
 
 
◆ constructors() [1/2]
Gets the map of registered keys and constructors. 
- Returns
- the map of registered keys and constructors 
Definition at line 191 of file ConstructionFactory.h.
 
 
◆ constructors() [2/2]
Gets an immutable map of registered keys and constructors. 
- Returns
- an immutable map of registered keys and constructors 
Definition at line 196 of file ConstructionFactory.h.
 
 
◆ deregisterConstructor()
Deregisters from the factory the constructor associated to the given key. 
- Parameters
- 
  
    | key | is the unique name by which constructors are registered |  
 
Definition at line 143 of file ConstructionFactory.h.
 
 
◆ getConstructor()
Gets the constructor registered by the given key. 
- Parameters
- 
  
    | key | is the unique name by which constructors are registered |  
 
- Returns
- the pointer to the given constructor 
Definition at line 157 of file ConstructionFactory.h.
 
 
◆ hasConstructor()
Checks whether the factory has a constructor registered by the given key. 
- Parameters
- 
  
    | key | is the unique name by which constructors are registered |  
 
- Returns
- whether the factory has the given constructor registered 
Definition at line 151 of file ConstructionFactory.h.
 
 
◆ name()
◆ registerConstructor()
Registers the constructor in the factory. 
- Parameters
- 
  
    | key | is the unique name by which constructors are registered |  | constructor | is the pointer to the constructor of the object |  
 
Definition at line 138 of file ConstructionFactory.h.
 
 
The documentation for this class was generated from the following file: