Implements the singleton strategy. More...
#include <di.hpp>
Inherits matador::di::strategy.
Public Member Functions | |
| template<typename ... Args> | |
| singleton_strategy (Args &&...args) | |
| void * | acquire () override |
| Acquires an instance. | |
Public Member Functions inherited from matador::di::strategy | |
| virtual | ~strategy ()=default |
Implements the singleton strategy.
The singleton strategy provides only one instance of the type.
| T | Type of the object to be injected |
|
inlineoverridevirtual |
Acquires an instance.
Acquires an instance based on the internal strategy and returns an anonymous pointer to the object
Implements matador::di::strategy.