Sauce-0.10.1
A C++ Dependency Injection Framework
Public Member Functions | Friends | List of all members
sauce::BindClause< Iface > Class Template Reference

A builder that creates a single binding. More...

#include <sauce/binder.h>

Inheritance diagram for sauce::BindClause< Iface >:
Inheritance graph
[legend]
Collaboration diagram for sauce::BindClause< Iface >:
Collaboration graph
[legend]

Public Member Functions

template<typename Name >
NamedClause< Named< Iface, Name > > named ()
 
NamedClause< Named< Iface, Unnamed > > named (std::string const name)
 
ToInstanceClause< Named< Iface, Unnamed > > toInstance (IfacePtr iface)
 
template<typename Method >
ToMethodClause< Named< Iface, Unnamed >, Method > toMethod (Method method)
 
template<typename Signature >
ToMethodNamingClause< Named< Iface, Unnamed >, Signature > toMethodNaming (typename ToMethodNamingClause< Named< Iface, Unnamed >, Signature >::Method method)
 
template<typename SetDependency >
ToMethodNamingClause< Named< Iface, Unnamed >, void(Iface::*)(SetDependency)> setting (typename ToMethodNamingClause< Named< Iface, Unnamed >, void(Iface::*)(SetDependency)>::Method method, std::string name=unnamed())
 
template<typename SetIface , typename Name >
ToMethodNamingClause< Named< Iface, Unnamed >, void(Iface::*)(Named< SetIface, Name >)> setting (typename ToMethodNamingClause< Named< Iface, Unnamed >, void(Iface::*)(Named< SetIface, Name >)>::Method method)
 
template<typename Scope >
InClause< Named< Iface, Unnamed >, Scope > in ()
 
template<typename Ctor >
ToClause< Named< Iface, Unnamed >, NoScope, Ctor > to ()
 
template<typename ProviderCtor >
ToProviderClause< ProviderDependency, NoScope, ProviderCtor > toProvider ()
 
- Public Member Functions inherited from sauce::internal::Clause< Named< Iface, Unnamed > >
Clause< Named< Iface, Unnamed > > & naming (unsigned int position, std::string const name)
 
void setState (ClauseStatePtr state)
 

Friends

class Binder
 

Additional Inherited Members

- Protected Member Functions inherited from sauce::internal::Clause< Named< Iface, Unnamed > >
virtual void onComplete ()
 
 Clause (ClauseStatePtr state)
 
ClauseStatePtr getState ()
 
Next pass (Next next)
 
void setDynamicName (std::string const name)
 
void throwLater (Exception)
 
void bindDynamicDependencyName (unsigned int position, std::string const name)
 

Detailed Description

template<typename Iface>
class sauce::BindClause< Iface >

A builder that creates a single binding.

Member Function Documentation

◆ in()

template<typename Iface >
template<typename Scope >
InClause< Named< Iface, Unnamed >, Scope > sauce::BindClause< Iface >::in ( )
inline
300 {
301 return this->pass(InClause<Named<Iface, Unnamed>, Scope>());
302 }

◆ named() [1/2]

template<typename Iface >
template<typename Name >
NamedClause< Named< Iface, Name > > sauce::BindClause< Iface >::named ( )
inline
259 {
260 return this->pass(NamedClause<Named<Iface, Name> >());
261 }

◆ named() [2/2]

template<typename Iface >
NamedClause< Named< Iface, Unnamed > > sauce::BindClause< Iface >::named ( std::string const  name)
inline
263 {
264 this->setDynamicName(name);
265 return this->pass(NamedClause<Named<Iface, Unnamed> >());
266 }

◆ setting() [1/2]

template<typename Iface >
template<typename SetIface , typename Name >
ToMethodNamingClause< Named< Iface, Unnamed >, void(Iface::*)(Named< SetIface, Name >)> sauce::BindClause< Iface >::setting ( typename ToMethodNamingClause< Named< Iface, Unnamed >, void(Iface::*)(Named< SetIface, Name >)>::Method  method)
inline
295 {
296 return this->pass(ToMethodNamingClause<Named<Iface, Unnamed>, void(Iface::*) (Named<SetIface, Name>)>(method));
297 }

◆ setting() [2/2]

template<typename Iface >
template<typename SetDependency >
ToMethodNamingClause< Named< Iface, Unnamed >, void(Iface::*)(SetDependency)> sauce::BindClause< Iface >::setting ( typename ToMethodNamingClause< Named< Iface, Unnamed >, void(Iface::*)(SetDependency)>::Method  method,
std::string  name = unnamed() 
)
inline
286 {
287 ToMethodNamingClause<Named<Iface, Unnamed>, void(Iface::*) (SetDependency)> toMethodNamingClause(method);
288 toMethodNamingClause = this->pass(toMethodNamingClause);
289 toMethodNamingClause.bindDynamicDependencyName(0, name);
290 return toMethodNamingClause;
291 }

◆ to()

template<typename Iface >
template<typename Ctor >
ToClause< Named< Iface, Unnamed >, NoScope, Ctor > sauce::BindClause< Iface >::to ( )
inline
305 {
306 return this->pass(ToClause<Named<Iface, Unnamed>, NoScope, Ctor>());
307 }

◆ toInstance()

template<typename Iface >
ToInstanceClause< Named< Iface, Unnamed > > sauce::BindClause< Iface >::toInstance ( IfacePtr  iface)
inline
268 {
269 return this->pass(ToInstanceClause<Named<Iface, Unnamed> >(iface));
270 }

◆ toMethod()

template<typename Iface >
template<typename Method >
ToMethodClause< Named< Iface, Unnamed >, Method > sauce::BindClause< Iface >::toMethod ( Method  method)
inline
273 {
274 return this->pass(ToMethodClause<Named<Iface, Unnamed>, Method>(method));
275 }

◆ toMethodNaming()

template<typename Iface >
template<typename Signature >
ToMethodNamingClause< Named< Iface, Unnamed >, Signature > sauce::BindClause< Iface >::toMethodNaming ( typename ToMethodNamingClause< Named< Iface, Unnamed >, Signature >::Method  method)
inline
279 {
280 return this->pass(ToMethodNamingClause<Named<Iface, Unnamed>, Signature>(method));
281 }

◆ toProvider()

template<typename Iface >
template<typename ProviderCtor >
ToProviderClause< ProviderDependency, NoScope, ProviderCtor > sauce::BindClause< Iface >::toProvider ( )
inline
310 {
311 return this->pass(ToProviderClause<ProviderDependency, NoScope, ProviderCtor>());
312 }

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