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

Base class for parts of the fluent binding API. More...

#include <sauce/internal/clause.h>

Inheritance diagram for sauce::internal::Clause< Dependency >:
Inheritance graph
[legend]

Public Member Functions

Clause< Dependency > & naming (unsigned int position, std::string const name)
 
void setState (ClauseStatePtr state)
 

Protected Member Functions

virtual void onComplete ()
 
 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::internal::Clause< Dependency >

Base class for parts of the fluent binding API.

Constructor & Destructor Documentation

◆ Clause() [1/2]

template<typename Dependency >
sauce::internal::Clause< Dependency >::Clause ( )
inlineprotected
107 :
108 state() {}

◆ Clause() [2/2]

template<typename Dependency >
sauce::internal::Clause< Dependency >::Clause ( ClauseStatePtr  state)
inlineprotected
110 :
111 state(state) {
112 throwLater(PartialBindingExceptionFor<Dependency>());
113 }

◆ ~Clause()

template<typename Dependency >
virtual sauce::internal::Clause< Dependency >::~Clause ( )
inlinevirtual
140{}

Member Function Documentation

◆ bindDynamicDependencyName()

template<typename Dependency >
void sauce::internal::Clause< Dependency >::bindDynamicDependencyName ( unsigned int  position,
std::string const  name 
)
inlineprotected
134 {
135 state->bindDynamicDependencyName(position, name);
136 }

◆ getState()

template<typename Dependency >
ClauseStatePtr sauce::internal::Clause< Dependency >::getState ( )
inlineprotected
115 {
116 return state;
117 }

◆ naming()

template<typename Dependency >
Clause< Dependency > & sauce::internal::Clause< Dependency >::naming ( unsigned int  position,
std::string const  name 
)
inline
142 {
143 this->bindDynamicDependencyName(position, name);
144 return *this;
145 }

◆ onComplete()

template<typename Dependency >
virtual void sauce::internal::Clause< Dependency >::onComplete ( )
inlineprotectedvirtual
103 {
104 throwLater(PartialBindingExceptionFor<Dependency>());
105 }

◆ pass()

template<typename Dependency >
template<typename Next >
Next sauce::internal::Clause< Dependency >::pass ( Next  next)
inlineprotected
120 {
121 next.setState(state);
122 return next;
123 }

◆ setDynamicName()

template<typename Dependency >
void sauce::internal::Clause< Dependency >::setDynamicName ( std::string const  name)
inlineprotected
125 {
126 state->setDynamicName(name);
127 }

◆ setState()

template<typename Dependency >
void sauce::internal::Clause< Dependency >::setState ( ClauseStatePtr  state)
inline
147 {
148 this->state = state;
149 getState()->clearException();
150 onComplete();
151 }

◆ throwLater()

template<typename Dependency >
template<typename Exception >
void sauce::internal::Clause< Dependency >::throwLater ( Exception  )
inlineprotected
130 {
131 state->template throwLater<Exception>();
132 }

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