Sauce-0.10.1 A C++ Dependency Injection Framework

- Main Page
- Classes
- Files

- File List

opaque_binding.h
1 #ifndef SAUCE_INTERNAL_OPAQUE_BINDING_H_
2 #define SAUCE_INTERNAL_OPAQUE_BINDING_H_
3
4 #include <string>
5 #include <vector>
6
7 #include <sauce/memory.h>
8 #include <sauce/internal/type_id.h>
9
10 namespace sauce {
11
12 class Injector;
13
14 namespace internal {
15
16 class OpaqueBinding;
17
18 typedef sauce::shared_ptr<OpaqueBinding> OpaqueBindingPtr;
19
33 class OpaqueBinding {
34 public:
35
36 virtual ~OpaqueBinding() {}
37
41 virtual std::string getName() const = 0;
42
46 virtual void setName(std::string) = 0;
47
51 virtual NamedTypeId getKey() const = 0;
52
58 virtual bool isModifier() const {
59 return false;
60 }
61
65 virtual TypeId getScopeKey() const = 0;
66
73 virtual void eagerlyInject(OpaqueBindingPtr, sauce::shared_ptr<Injector>) const = 0;
74
78 virtual void setDynamicDependencyNames(std::vector<std::string> const &) = 0;
79
80 };
81
82 }
83
84 namespace i = ::sauce::internal;
85
86 }
87
88 #endif // SAUCE_INTERNAL_OPAQUE_BINDING_H_
sauce::internal::OpaqueBinding::getScopeKey
virtual TypeId getScopeKey() const =0
The TypeId of the (hidden) scope.
sauce::internal
Definition: binder.h:317
sauce::internal::OpaqueBinding::getName
virtual std::string getName() const =0
The dynamic name of this binding.
sauce::internal::OpaqueBinding::eagerlyInject
virtual void eagerlyInject(OpaqueBindingPtr, sauce::shared_ptr< Injector >) const =0
Provide, but do not return the hidden interface.
sauce::internal::OpaqueBinding::getKey
virtual NamedTypeId getKey() const =0
The NamedTypeId of the (hidden) provided interface.
sauce::internal::OpaqueBinding
An opaque binding.
Definition: opaque_binding.h:33
sauce::internal::TypeId
A TypeSignature equipped with specific helper methods dealing in the hidden type. ...
Definition: type_id.h:34
sauce
Definition: binder.h:21
sauce::internal::OpaqueBinding::setName
virtual void setName(std::string)=0
Set the dynamic name of this binding.
sauce::internal::OpaqueBinding::isModifier
virtual bool isModifier() const
Does this binding modify an existing value?
Definition: opaque_binding.h:58
sauce::internal::OpaqueBinding::setDynamicDependencyNames
virtual void setDynamicDependencyNames(std::vector< std::string > const &)=0
Accept the list of dynamic dependency names this binding was created with.