solinject
1.0.0
C++17 Dependency Injection header-only library
|
Go to the documentation of this file.
37 namespace sol::di::impl
90 m_RegisteredServiceBuilders[type].push_back(serviceBuilder);
101 for (
const auto& pair : m_RegisteredServiceBuilders)
103 auto& serviceBuilders = pair.second;
106 builtServices.
reserve(serviceBuilders.size());
109 serviceBuilders.begin(),
110 serviceBuilders.end(),
114 return builder->BuildDIService();
118 result[pair.first] = builtServices;
RegisteredServicesMap BuildDIServices() const
Builds DI services.
Definition: ScopedServiceBuilders.hpp:97
void RegisterScopedService(std::type_index type, ScopedServiceBuilderPtr serviceBuilder)
Registers a scoped service.
Definition: ScopedServiceBuilders.hpp:88
void RegisterScopedService(Factory< T > factory)
Registers a scoped service.
Definition: ScopedServiceBuilders.hpp:75
typename IServiceTyped< T >::ServicePtr ServicePtr
Pointer to an instance of a service.
Definition: ScopedServiceBuilders.hpp:55
T back_inserter(T... args)
Scoped DI service builders collection.
Definition: ScopedServiceBuilders.hpp:40
std::map< std::type_index, std::vector< ScopedServiceBuilderPtr > > RegisteredServiceBuildersMap
Map of registered DI service builders.
Definition: ScopedServiceBuilders.hpp:67
typename std::shared_ptr< T > ServicePtr
Pointer to an instance of a service.
Definition: IServiceTyped.hpp:36
typename std::function< ServicePtr(const Container &)> Factory
Factory function that accepts a reference to a DI container and returns a pointer to an instance of a...
Definition: IServiceTyped.hpp:42
Builder for scoped DI services.
Definition: ScopedServiceBuilder.hpp:33
typename IServiceTyped< T >::Factory Factory
Factory function that accepts a reference to a DI container and returns a pointer to an instance of a...
Definition: ScopedServiceBuilders.hpp:48