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

A type that can be used as a service interface. More...

#include <service.h>

Concept definition

template<typename T>
concept kcenon::common::concepts::ServiceInterface = std::is_polymorphic_v<T> &&
std::has_virtual_destructor_v<T>
A type that can be used as a service interface.
Definition service.h:58

Detailed Description

A type that can be used as a service interface.

A type that can serve as a service interface.

Service interfaces must be polymorphic (have virtual methods) and have a virtual destructor to ensure proper cleanup through base pointers.

Example usage:

template<ServiceInterface T>
void register_service(IServiceContainer& container) {
container.register_type<T, ConcreteT>();
}

Definition at line 58 of file service.h.