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

An event type that includes a module or source name. More...

#include <event.h>

Concept definition

template<typename T>
concept kcenon::common::concepts::NamedEvent = EventType<T> && requires(const T t) {
{ t.module_name } -> std::convertible_to<std::string>;
}
A type that can be used as an event in the event bus.
Definition event.h:52
An event type that includes a module or source name.
Definition event.h:134

Detailed Description

An event type that includes a module or source name.

Events satisfying this concept identify their source module for debugging and routing purposes.

Example usage:

template<NamedEvent E>
void route_event(const E& event) {
auto source = event.module_name;
// Route based on source
}

Definition at line 134 of file event.h.