The CloningFactory class is the base class for a factory whose objects are created from a registered object by calling the clone()
method.
More...
#include <CloningFactory.h>
template<typename T>
class fl::CloningFactory< T >
The CloningFactory class is the base class for a factory whose objects are created from a registered object by calling the clone()
method.
- Parameters
-
<T> | is the class of the object to be cloned |
- Author
- Juan Rada-Vilela, Ph.D.
- See also
- FactoryManager
- Since
- 5.0
Definition at line 40 of file CloningFactory.h.
◆ CloningFactory() [1/2]
◆ CloningFactory() [2/2]
◆ ~CloningFactory()
◆ available()
Returns a vector of the available objects.
- Returns
- a vector of the available objects
Definition at line 205 of file CloningFactory.h.
◆ cloneObject()
Creates a cloned object by executing the clone method on the registered object.
- Parameters
-
key | is the unique name by which objects are registered |
- Returns
- a cloned object by executing the clone method on the registered object
Definition at line 195 of file CloningFactory.h.
◆ deregisterObject()
Deregisters the given object from the factory and deletes it.
- Parameters
-
key | is the unique name by which objects are registered |
Definition at line 171 of file CloningFactory.h.
◆ getObject()
Gets the object registered by the given key, not a clone of the object.
- Parameters
-
key | is the unique name by which objects are registered |
- Returns
- the object registered by the given key
Definition at line 186 of file CloningFactory.h.
◆ hasObject()
Checks whether the factory has the given object registered.
- Parameters
-
key | is the unique name by which objects are registered |
- Returns
- whether the factory has the given object registered
Definition at line 180 of file CloningFactory.h.
◆ name()
Returns the name of the factory.
- Returns
- the name of the factory
Definition at line 161 of file CloningFactory.h.
◆ objects() [1/2]
Gets the map of registered keys and objects.
- Returns
- the map of registered keys and objects
Definition at line 215 of file CloningFactory.h.
◆ objects() [2/2]
Gets an immutable map of registered keys and objects.
- Returns
- an immutable map of registered keys and objects
Definition at line 220 of file CloningFactory.h.
◆ operator=()
◆ registerObject()
Registers the object in the factory and assumes its ownership.
- Parameters
-
key | is the unique name by which objects are registered |
object | is the object to be cloned via a clone method |
Definition at line 166 of file CloningFactory.h.
The documentation for this class was generated from the following file: