Sauce-0.10.1
A C++ Dependency Injection Framework
|
A binding for an acknowledged interface. More...
#include <sauce/internal/resolved_binding.h>
Public Types | |
typedef Key< Dependency >::Ptr | IfacePtr |
typedef sauce::shared_ptr< ResolvedBinding< Dependency > > | BindingPtr |
Public Member Functions | |
NamedTypeId | getKey () const |
The TypeId of the Dependency template parameter. | |
virtual void | validateAcyclic (sauce::shared_ptr< Injector >, TypeIds &) const =0 |
Establish that further dependencies do not introduce cycles with ones already accumulated. More... | |
virtual void | get (IfacePtr &, BindingPtr, sauce::shared_ptr< Injector >) const =0 |
Get an Iface, using the given injector to provide dependencies. More... | |
![]() | |
virtual std::string | getName () const =0 |
The dynamic name of this binding. | |
virtual void | setName (std::string)=0 |
Set the dynamic name of this binding. | |
virtual bool | isModifier () const |
Does this binding modify an existing value? More... | |
virtual TypeId | getScopeKey () const =0 |
The TypeId of the (hidden) scope. | |
virtual void | eagerlyInject (OpaqueBindingPtr, sauce::shared_ptr< Injector >) const =0 |
Provide, but do not return the hidden interface. More... | |
virtual void | setDynamicDependencyNames (std::vector< std::string > const &)=0 |
Accept the list of dynamic dependency names this binding was created with. | |
A binding for an acknowledged interface.
|
pure virtual |
Get an Iface, using the given injector to provide dependencies.
The binding pointer must point to this same binding instance.
|
pure virtual |
Establish that further dependencies do not introduce cycles with ones already accumulated.
This is Tarjan's algorithm using the call stack. When a cycle is detected a CircularDependencyException is thrown.