solinject  1.0.0
C++17 Dependency Injection header-only library
sol::di::impl::ScopedServiceBuilder< TService, TServiceParents > Class Template Reference

Builder for scoped DI services. More...

#include <ScopedServiceBuilder.hpp>

Inheritance diagram for sol::di::impl::ScopedServiceBuilder< TService, TServiceParents >:
[legend]
Collaboration diagram for sol::di::impl::ScopedServiceBuilder< TService, TServiceParents >:
[legend]

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...
 

Detailed Description

template<class TService, class... TServiceParents>
class sol::di::impl::ScopedServiceBuilder< TService, TServiceParents >

Builder for scoped DI services.

Template Parameters
Tservice type

Member Typedef Documentation

◆ AbstractDIServicePtr

template<class TService , class... TServiceParents>
using sol::di::impl::ScopedServiceBuilder< TService, TServiceParents >::AbstractDIServicePtr = typename Base::DIServicePtr

Pointer to an IService instance.

◆ Factory

template<class TService , class... TServiceParents>
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.

Constructor & Destructor Documentation

◆ ScopedServiceBuilder()

template<class TService , class... TServiceParents>
sol::di::impl::ScopedServiceBuilder< TService, TServiceParents >::ScopedServiceBuilder ( Factory  factory)
inline

Constructor.

Parameters
factoryfactory function

Member Function Documentation

◆ BuildDIService()

template<class TService , class... TServiceParents>
AbstractDIServicePtr sol::di::impl::ScopedServiceBuilder< TService, TServiceParents >::BuildDIService ( ) const
inlineoverridevirtual

Builds a DI service instance.

Returns
pointer to the DI service instance

Implements sol::di::impl::IScopedServiceBuilder.


The documentation for this class was generated from the following file: