|
solinject
1.0.0
C++17 Dependency Injection header-only library
|
Builder for scoped DI services. More...
#include <ScopedServiceBuilder.hpp>
Public Types | |
| using | Base = IScopedServiceBuilder |
| Base for the ScopedServiceBuilder class. | |
| using | DIService = ScopedService< TService, TServiceParents... > |
| Type of the DI service that is being built. | |
| using | AbstractDIServicePtr = typename Base::DIServicePtr |
| Pointer to an IService instance. More... | |
| using | Factory = typename DIService::Factory |
| Factory function that accepts a reference to a DI container and returns a pointer to an instance of a service. More... | |
Public Types inherited from sol::di::impl::IScopedServiceBuilder | |
| using | DIServicePtr = std::shared_ptr< IService > |
| Pointer to an IService instance. | |
Public Member Functions | |
| ScopedServiceBuilder (Factory factory) | |
| Constructor. More... | |
| AbstractDIServicePtr | BuildDIService () const override |
| Builds a DI service instance. More... | |
Builder for scoped DI services.
| T | service type |
| using sol::di::impl::ScopedServiceBuilder< TService, TServiceParents >::AbstractDIServicePtr = typename Base::DIServicePtr |
Pointer to an IService instance.
| using sol::di::impl::ScopedServiceBuilder< TService, TServiceParents >::Factory = typename DIService::Factory |
Factory function that accepts a reference to a DI container and returns a pointer to an instance of a service.
|
inline |
Constructor.
| factory | factory function |
|
inlineoverridevirtual |
Builds a DI service instance.
Implements sol::di::impl::IScopedServiceBuilder.