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

Public Member Functions

template<typename Dependency >
void validateAcyclic (bool validateProviding, InjectorPtr injector, TypeIds &ids, std::string const name) const
 
template<typename Dependency >
void inject (typename Key< Dependency >::Ptr &injected, InjectorPtr injector, std::string const name) const
 
template<typename Scope >
void eagerlyInject (InjectorPtr injector) const
 
sauce::auto_ptr< LockacquireLock ()
 Create an RAII synchronization lock. More...
 

Friends

class ::sauce::Modules
 

Member Function Documentation

◆ acquireLock()

template<typename ImplicitBindings >
sauce::auto_ptr< Lock > sauce::internal::BaseInjector< ImplicitBindings >::acquireLock ( )
inline

Create an RAII synchronization lock.

90 {
91 sauce::auto_ptr<Lock> lock = lockFactory->createLock();
92 return lock;
93 }

◆ eagerlyInject()

template<typename ImplicitBindings >
template<typename Scope >
void sauce::internal::BaseInjector< ImplicitBindings >::eagerlyInject ( InjectorPtr  injector) const
inline
83 {
84 bindings.template eagerlyInject<Scope>(injector);
85 }

◆ inject()

template<typename ImplicitBindings >
template<typename Dependency >
void sauce::internal::BaseInjector< ImplicitBindings >::inject ( typename Key< Dependency >::Ptr &  injected,
InjectorPtr  injector,
std::string const  name 
) const
inline
74 {
75 typedef typename Key<Dependency>::Normalized Normalized;
76 typedef typename Key<Dependency>::Iface Iface;
77 bindings.template get<Normalized>(injected, injector, name);
78 SelfInjector<Iface> selfInjector;
79 selfInjector.setSelf(injected);
80 }
Named< Dependency, Unnamed > Normalized
Note Normalized is not Iface, but Named<Iface, Unnamed>.
Definition: key.h:27

◆ validateAcyclic()

template<typename ImplicitBindings >
template<typename Dependency >
void sauce::internal::BaseInjector< ImplicitBindings >::validateAcyclic ( bool  validateProviding,
InjectorPtr  injector,
TypeIds &  ids,
std::string const  name 
) const
inline
67 {
68 typedef typename Key<Dependency>::Normalized Normalized;
69 CircularDependencyGuard<ImplicitBindings, Normalized> guard(ids, name);
70 bindings.template validateAcyclic<Normalized>(validateProviding, injector, ids, name);
71 }

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