An injector binding candidate created via the injector configuration. More...
#include <BindingBuilder.hpp>
Inherits BindingBuilderBase.
Public Member Functions | |
template<typename DerivedT > | |
void | toEagerSingleton () |
Bind an interface to a concrete singleton type. More... | |
template<typename DerivedT , typename SharedDeleterT > | |
void | toEagerSingleton () |
Bind an interface to a concrete singleton type, using the supplied deleter type. More... | |
void | toEagerSingleton () |
Bind a concrete singleton type. More... | |
void | toReference (BaseT &reference) |
Bind a reference type to a reference value. More... | |
template<typename DerivedT > | |
void | toSingleton () |
Bind an interface to a concrete singleton type. More... | |
template<typename DerivedT , typename SharedDeleterT > | |
void | toSingleton () |
Bind an interface to a concrete singleton type, using the supplied deleter type. More... | |
void | toSingleton () |
Bind a concrete singleton type. More... | |
void | toSingleton (std::shared_ptr< BaseT > instance) |
Bind an interface to a specific instance. More... | |
void | toSingleton (BaseT *instance) |
Bind an interface to a specific instance, via a pointer container type syntax. More... | |
template<typename SharedDeleterT > | |
void | toSingleton (BaseT *instance) |
Bind an interface to a specific instance, via a pointer container type syntax and using the supplied deleter type. More... | |
template<typename ProviderT > | |
void | toSingletonProvider () |
Bind an interface to a singleton provider class. More... | |
template<typename ProviderT > | |
void | toSingletonProvider (std::shared_ptr< ProviderT > provider) |
Bind an interface to a singleton provider class instance. More... | |
void | toSingletonProvider (const std::function< std::shared_ptr< BaseT >()> &provider) |
Bind an interface to a singleton provider function. More... | |
template<typename DerivedT > | |
void | toThreadLocal () |
Bind an interface to a concrete type with thread-local singleton semantics. More... | |
template<typename DerivedT , typename SharedDeleterT > | |
void | toThreadLocal () |
Bind an interface to a concrete type with thread-local singleton semantics, using the supplied deleter type. More... | |
void | toThreadLocal () |
Bind a concrete type with thread-local singleton semantics. More... | |
template<typename DerivedT > | |
void | toUnique () |
Bind an interface to an implementing class. More... | |
void | toUniqueProvider (UniquePtrProviderFunction provider) |
Bind an interface to a unique pointer provider function. More... | |
template<typename ProviderT > | |
void | toUniqueProvider () |
Bind an interface to a unique pointer provider class. More... | |
template<typename ProviderT > | |
void | toUniqueProvider (std::shared_ptr< ProviderT > provider) |
Bind an interface to a unique pointer provider class instance. More... | |
void | toValue () |
Bind a concrete type. More... | |
template<typename ValueT = BaseT> | |
void | toValue (ValueT prototype) |
Bind a concrete type to a prototype value. More... | |
template<typename ProviderFunctionT > | |
void | toValueProvider (ProviderFunctionT provider) |
Bind a concrete type to a value provider function. More... | |
template<typename ProviderT > | |
void | toValueProvider () |
Bind a concrete type to a value provider class. More... | |
template<typename ProviderT > | |
void | toValueProvider (std::shared_ptr< ProviderT > provider) |
Bind a concrete type to a value provider class instance. More... | |
An injector binding candidate created via the injector configuration.
The deleter type is only used for unique bindings.
|
inline |
Bind an interface to a concrete singleton type.
The singleton will be instantiated eagerly.
|
inline |
Bind an interface to a concrete singleton type, using the supplied deleter type.
The singleton will be instantiated eagerly.
|
inline |
Bind a concrete singleton type.
The singleton will be instantiated eagerly.
|
inline |
Bind a reference type to a reference value.
The reference will be provided each time it is requested.
|
inline |
Bind an interface to a concrete singleton type.
The singleton will be instantiated lazily.
|
inline |
Bind an interface to a concrete singleton type, using the supplied deleter type.
The singleton will be instantiated lazily.
|
inline |
Bind a concrete singleton type.
The singleton will be instantiated lazily.
|
inline |
Bind an interface to a specific instance.
This binding call allows the instance to be created and configured before being bound.
The injector has shared ownership of the supplied pointer.
|
inline |
Bind an interface to a specific instance, via a pointer container type syntax.
The injector takes ownership of the supplied pointer.
Do not use this binding call in order to bind an owned raw pointer, as such a call will result in a defective application. Only use this call as if you are initialising a pointer container with a new object.
|
inline |
Bind an interface to a specific instance, via a pointer container type syntax and using the supplied deleter type.
The injector takes ownership of the supplied pointer.
Do not use this binding call in order to bind an owned raw pointer, as such a call will result in a defective application. Only use this call as if you are initialising a pointer container with a new object.
|
inline |
Bind an interface to a singleton provider class.
The provider will be called once when the singleton is first requested.
|
inline |
Bind an interface to a singleton provider class instance.
The provider instance is supplied as a shared pointer, allowing the caller to maintain shared ownership if required.
The provider will be called once when the singleton is first requested.
|
inline |
Bind an interface to a singleton provider function.
The provider will be called once when the singleton is first requested.
|
inline |
Bind an interface to a concrete type with thread-local singleton semantics.
The thread-local singleton will be instantiated lazily for each new calling thread.
|
inline |
Bind an interface to a concrete type with thread-local singleton semantics, using the supplied deleter type.
The thread-local singleton will be instantiated lazily for each new calling thread.
|
inline |
Bind a concrete type with thread-local singleton semantics.
The thread-local singleton will be instantiated lazily for each new calling thread.
|
inline |
Bind an interface to an implementing class.
A new instance of the polymorphic type will be created each time a value is requested.
|
inline |
Bind an interface to a unique pointer provider function.
The provider will be called each time a new polymorphic instance is requested.
|
inline |
Bind an interface to a unique pointer provider class.
The provider will be called each time a new polymorphic instance is requested.
|
inline |
Bind an interface to a unique pointer provider class instance.
The provider instance is supplied as a shared pointer, allowing the caller to maintain shared ownership if required.
The provider will be called each time a new polymorphic instance is requested.
|
inline |
Bind a concrete type.
A new instance of the type will be created each time a value is requested.
|
inline |
Bind a concrete type to a prototype value.
A copy of the prototype value will be created via copy semantics each time a value is requested.
|
inline |
Bind a concrete type to a value provider function.
The provider will be called each time a value is requested.
|
inline |
Bind a concrete type to a value provider class.
The provider will be called each time a value is requested.
|
inline |
Bind a concrete type to a value provider class instance.
The provider instance is supplied as a shared pointer, allowing the caller to maintain shared ownership if required.
The provider will be called each time a value is requested.