#include <singletonsubclass.hpp>


For the user code, it should behave exactly like the standard SingletonFactory. The configuration of the product actually to be created is delayed until the ctor call, so it can be hidden away to the implementation of a class using the SingletonFactory.
Definition at line 128 of file singletonsubclass.hpp.
Public Member Functions | |
| template<class SU> | |
| SingletonSubclassFactory (singleton::UseSubclass< SU > &) | |
| The singleton-factory ctor configures what concrete type to create. | |
| lumiera::SingletonSubclassFactory< SI, Create, Life, Threading >::SingletonSubclassFactory | ( | singleton::UseSubclass< SU > & | ) | [inline] |
The singleton-factory ctor configures what concrete type to create.
It takes type information passed as dummy parameter and installs a trampoline object in the static field of class Adapter to perform the necessary up/downcasts. This allows to use whatever policy class is desired, but parametrises this policy template with the concrete type to be created. (only the "create" policy needs to know the actual class, because it allocates storage)
Definition at line 145 of file singletonsubclass.hpp.
1.5.6