Sauce-0.10.1 A C++ Dependency Injection Framework

- Main Page
- Classes
- Files

- File List

injector_binding.h
1 #ifndef SAUCE_INTERNAL_INJECTOR_BINDING_H_
2 #define SAUCE_INTERNAL_INJECTOR_BINDING_H_
3
4 #include <sauce/injector.h>
5 #include <sauce/internal/binding.h>
6 #include <sauce/internal/key.h>
7 #include <sauce/memory.h>
8 #include <sauce/scopes.h>
9
10 namespace sauce {
11 namespace internal {
12
16 class InjectorBinding: public Binding<Key<Injector>::Normalized, NoScope> {
17
18 void validateAcyclic(InjectorPtr, TypeIds &) const {}
19
20 public:
21
27 void inject(InjectorPtr & injected, BindingPtr, InjectorPtr injector) const {
28 injected = injector;
29 }
30
31 };
32
33 }
34
35 namespace i = ::sauce::internal;
36
37 }
38
39 #endif // SAUCE_INTERNAL_INJECTOR_BINDING_H_
sauce::internal
Definition: binder.h:317
sauce::internal::Binding
The base class of all actual binding implementations.
Definition: binding.h:22
sauce
Definition: binder.h:21
sauce::internal::InjectorBinding
An injection that provides the injector itself.
Definition: injector_binding.h:16
sauce::internal::InjectorBinding::inject
void inject(InjectorPtr &injected, BindingPtr, InjectorPtr injector) const
Inject the injector.
Definition: injector_binding.h:27