Common System 0.2.0
Common interfaces and patterns for system integration
Loading...
Searching...
No Matches
kcenon::common::concepts::ServiceImplementation Concept Referenceexport

A type that implements a service interface. More...

#include <service.h>

Concept definition

template<typename TImpl, typename TInterface>
std::is_base_of_v<TInterface, TImpl> &&
std::is_default_constructible_v<TImpl>
A type that implements a service interface.
Definition service.h:77
A type that can be used as a service interface.
Definition service.h:58

Detailed Description

A type that implements a service interface.

Service implementations must derive from the interface and be default-constructible for automatic instantiation by the container.

Example usage:

template<ServiceInterface TInterface, ServiceImplementation<TInterface> TImpl>
void register(IServiceContainer& container) {
container.register_type<TInterface, TImpl>();
}

Definition at line 77 of file service.h.