template<typename SIG, typename ID, template< class > class Wrapper = PassAsIs>
class lib::factory::MultiFact< SIG, ID, Wrapper >
Factory for creating a family of objects by ID.
The actual factory functions are to be installed from the usage site through calls to defineProduction . Each generated object will be treated by the Wrapper template, allowing for the generation of smart-ptrs. The embedded class Singleton allows to build a family of singleton objects; it is to be instantiated at the call site and acts as singleton factory, accessible through a MultiFact instance as frontend.
Definition at line 262 of file multifact.hpp.
|
bool | contains (ID id) const |
|
template<typename FUNC > |
void | defineProduction (ID id, FUNC &&fun) |
| to set up a production line, associated with a specific ID
|
|
bool | empty () const |
|
template<typename... ARGS> |
Product | invokeFactory (ID const &id, ARGS &&...args) |
| more legible alias for the function operator
|
|
template<typename... ARGS> |
Product | operator() (ID const &id, ARGS &&...args) |
| Core operation of the factory: Select a production line and invoke the fabrication function. More...
|
|