Sauce-0.10.1: sauce::ToInstanceClause< Dependency > Class Template 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::ToInstanceClause< Dependency > Class Template Reference

Binds to a specific single instance. More...

`#include <sauce/binder.h>`

Inheritance diagram for sauce::ToInstanceClause< Dependency >:
[legend]
Collaboration diagram for sauce::ToInstanceClause< Dependency >:
[legend]

## Public Member Functions
| ToInstanceClause (IfacePtr iface)
Public Member Functions inherited from sauce::internal::Clause< Dependency >
Clause< Dependency > & | naming (unsigned int position, std::string const name)
void | setState (ClauseStatePtr state)

## Additional Inherited Members
Protected Member Functions inherited from sauce::internal::Clause< Dependency >
| Clause (ClauseStatePtr state)
ClauseStatePtr | getState ()
template<typename Next >
Next | pass (Next next)
void | setDynamicName (std::string const name)
template<typename Exception >
void | throwLater (Exception)
void | bindDynamicDependencyName (unsigned int position, std::string const name)

## Detailed Description

### template<typename Dependency>
class sauce::ToInstanceClause< Dependency >

Binds to a specific single instance.

By virtue of always returning the passed instance, this dependency is inheretingly singleton scoped. It also means there is no need to use the actual singleton scope cache, and so we actually declare it as NoScope here.

The constructor template parameter is unused, but a default constructor for the interface is assumed.

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

- sauce/binder.h