template<class AbstractProduct, typename IdentifierType, typename ReturnType = std::unique_ptr<AbstractProduct>, class ProductCreator = std::function<ReturnType()>, class... Args>
class MFactory< AbstractProduct, IdentifierType, ReturnType, ProductCreator, Args >
- Author
- Michael Schlottke (mic) mic@a.nosp@m.ia.r.nosp@m.wth-a.nosp@m.ache.nosp@m.n.de
- Date
- 2014-04-05
- Template Parameters
-
AbstractProduct | The (abstract) base class of the objects to be created. |
IdentifierType | The type to be used to identify derived types. |
ReturnType | Return type of the create() method. |
ProductCreator | The type of the creating function. |
Args | Additional (optional) arguments that should be passed to the constructor of the created objects. |
This follow the factory pattern as described in Alexandrescu (2001).
References: Andrei Alexandrescu (2001): Modern C++ Design.
Definition at line 36 of file factory.h.