Sauce-0.10.1 A C++ Dependency Injection Framework

- Main Page
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

Public Types | Public Member Functions | List of all members
sauce::internal::ResolvedBinding< Dependency > Class Template Referenceabstract

A binding for an acknowledged interface. More...

`#include <sauce/internal/resolved_binding.h>`

Inheritance diagram for sauce::internal::ResolvedBinding< Dependency >:

## 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...
Public Member Functions inherited from sauce::internal::OpaqueBinding
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.

## Detailed Description

### template<typename Dependency>
class sauce::internal::ResolvedBinding< Dependency >

A binding for an acknowledged interface.

## Member Function Documentation

template<typename Dependency>

virtual void sauce::internal::ResolvedBinding< Dependency >::get | ( | IfacePtr & | ,
|  | BindingPtr | ,
|  | sauce::shared_ptr< Injector > |
| ) |  | const
| pure virtual

Get an Iface, using the given injector to provide dependencies.

The binding pointer must point to this same binding instance.

template<typename Dependency>

virtual void sauce::internal::ResolvedBinding< Dependency >::validateAcyclic | ( | sauce::shared_ptr< Injector > | ,
|  | TypeIds & |
| ) |  | const
| 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.

The documentation for this class was generated from the following file:

- sauce/internal/resolved_binding.h