|
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. | |
| Modules & | add (void(*module)(Binder &)) |
| Add the bindings defined by the given module function. | |
| template<typename Module > | |
| Modules & | add () |
| Add the bindings defined by the given Module type. | |
| template<typename Module > | |
| Modules & | add (Module &module) |
| Add the bindings defined by the given Module instance. | |
| sauce::shared_ptr< Injector > | createInjector () const |
| Create an Injector that can provide dependencies specified by all added Modules. | |
| 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. | |
A factory that accepts Modules and creates Injectors.
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 |
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.

|
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.

1.8.3