Sauce-0.10.1: sauce/internal/resolved_binding.h Source File

Sauce-0.10.1 A C++ Dependency Injection Framework

- Main Page
- Classes
- Files

- File List

resolved_binding.h
1 #ifndef SAUCE_INTERNAL_RESOLVED_BINDING_H_
2 #define SAUCE_INTERNAL_RESOLVED_BINDING_H_
3
4 #include <sauce/memory.h>
5 #include <sauce/named.h>
6 #include <sauce/internal/key.h>
7 #include <sauce/internal/type_id.h>
8 #include <sauce/internal/opaque_binding.h>
9
10 namespace sauce {
11
12 class Injector;
13
14 namespace internal {
15
19 template<typename Dependency>
20 class ResolvedBinding: public OpaqueBinding {
21 public:
22
23 typedef typename Key<Dependency>::Ptr IfacePtr;
24 typedef sauce::shared_ptr<ResolvedBinding<Dependency> > BindingPtr;
25
26 virtual ~ResolvedBinding() {}
27
31 NamedTypeId getKey() const {
32 return namedTypeIdOf<Dependency>(getName());
33 }
34
41 virtual void validateAcyclic(sauce::shared_ptr<Injector>, TypeIds &) const = 0;
42
48 virtual void get(IfacePtr &, BindingPtr, sauce::shared_ptr<Injector>) const = 0;
49
50 };
51
52 }
53
54 namespace i = ::sauce::internal;
55
56 }
57
58 #endif // SAUCE_INTERNAL_RESOLVED_BINDING_H_