Sauce-0.10.1
A C++ Dependency Injection Framework
|
A factory that accepts Modules and creates Injectors. More...
#include <sauce/modules.h>
Public Member Functions | |
Modules () | |
Create an empty Modules. More... | |
Modules & | add (void(*module)(Binder &)) |
Add the bindings defined by the given module function. More... | |
template<typename Module > | |
Modules & | add () |
Add the bindings defined by the given Module type. More... | |
template<typename Module > | |
Modules & | add (Module &module) |
Add the bindings defined by the given Module instance. More... | |
sauce::shared_ptr< Injector > | createInjector () const |
Create an Injector that can provide dependencies specified by all added Modules. More... | |
template<typename Locker , typename Lockable > | |
sauce::shared_ptr< Injector > | createInjector (Lockable &lockable) const |
Create an Injector that can provide dependencies specified by all added Modules. More... | |
A factory that accepts Modules and creates Injectors.
|
inline |
Create an empty Modules.
|
inline |
Add the bindings defined by the given Module type.
The module here is any default constructable type providing operator()(Binding & bindings).
An Injector created after adding a module will understand how to provide dependencies specified by that module.
|
inline |
Add the bindings defined by the given Module instance.
The module here is any value providing operator()(Binding & bindings).
An Injector created after adding a module will understand how to provide dependencies specified by that module.
Add the bindings defined by the given module function.
An Injector created after adding a module will understand how to provide dependencies specified by that module.
|
inline |
Create an Injector that can provide dependencies specified by all added Modules.
Any modules added after an Injector is created will have no effect on that Injector.
|
inline |
Create an Injector that can provide dependencies specified by all added Modules.
Any modules added after an Injector is created will have no effect on that Injector.