Sauce-0.10.1
A C++ Dependency Injection Framework
|
Binds to a specific single instance. More...
#include <sauce/binder.h>
Public Member Functions | |
ToInstanceClause (IfacePtr iface) | |
![]() | |
Clause< Dependency > & | naming (unsigned int position, std::string const name) |
void | setState (ClauseStatePtr state) |
Additional Inherited Members | |
![]() | |
virtual void | onComplete () |
Clause (ClauseStatePtr state) | |
ClauseStatePtr | getState () |
template<typename Next > | |
Next | pass (Next next) |
void | setDynamicName (std::string const name) |
template<typename Exception > | |
void | throwLater (Exception) |
void | bindDynamicDependencyName (unsigned int position, std::string const name) |
Binds to a specific single instance.
By virtue of always returning the passed instance, this dependency is inheretingly singleton scoped. It also means there is no need to use the actual singleton scope cache, and so we actually declare it as NoScope here.
The constructor template parameter is unused, but a default constructor for the interface is assumed.
|
inline |