Sauce-0.10.1: sauce::internal::OpaqueBinding Class Reference

Sauce-0.10.1 A C++ Dependency Injection Framework

- Main Page
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | List of all members
sauce::internal::OpaqueBinding Class Referenceabstract

An opaque binding. More...

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

Inheritance diagram for sauce::internal::OpaqueBinding:
[legend]

## Public Member Functions
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 NamedTypeId | getKey () const =0
| The NamedTypeId of the (hidden) provided interface.
virtual bool | isModifier () const
| Does this binding modify an existing value?
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.
virtual void | setDynamicDependencyNames (std::vector< std::string > const &)=0
| Accept the list of dynamic dependency names this binding was created with.

## Detailed Description

An opaque binding.

Bindings associate an interface with an implementation. How that provision comes about is determine by derived types. Binding itself is a pure interface.

To be type-homogenous, OpaqueBinding is not a template, and particularly not a template of any specific interface or implementation types. It however has a TypeId, which indirectly identifies the interface it is bound to. The interface is raised to the type system in ResolvedBinding, a class template deriving from OpaqueBinding.

## Member Function Documentation

virtual void sauce::internal::OpaqueBinding::eagerlyInject | ( | OpaqueBindingPtr | ,
|  | sauce::shared_ptr< Injector > |
| ) |  | const
| pure virtual

Provide, but do not return the hidden interface.

Instead, cache the instance in its appropriate scope, if any. If the binding is not scoped, do nothing.

virtual bool sauce::internal::OpaqueBinding::isModifier | ( |  | ) | const
| inlinevirtual

Does this binding modify an existing value?

If not, it must provide a new value, and so is "providing" binding.

{
return false;
}

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

- sauce/internal/opaque_binding.h