Static CRTP base class for applications managed by Corium Runtime. Subclass Application<Derived> or Application<Derived, EventVariant, MaxServices> for zero-vtable compile-time static dispatch. All framework operations and handlers are protected for clean encapsulation within the derived application.
More...
|
| bool | cancelTimer (TimerId id) noexcept |
| | Cancel an active timer.
|
| |
| EventSinkT< EventVariant > | eventSink () |
| | Access event sink handle.
|
| |
| template<typename ServiceType > |
| ServiceType * | getService () const noexcept |
| | Retrieve registered background service by concrete type.
|
| |
template<typename Filter , typename Handler >
requires (std::is_invocable_r_v<bool, Filter&, const callable_event_type_t<Handler>&>) |
| bool | on (Filter &&filter, Handler &&handler) |
| | Register a filtered event handler executed only when predicate evaluates to true.
|
| |
| template<typename Handler > |
| bool | on (Handler &&handler) |
| | Register event handler with automatic event type deduction from callable signature.
|
| |
| template<typename Rep , typename Period > |
| TimerId | postDelayed (EventVariant event, const std::chrono::duration< Rep, Period > &delay, EventPriority priority=EventPriority::Normal) |
| | Schedule a single-shot delayed event.
|
| |
| template<typename Rep , typename Period > |
| TimerId | postPeriodic (EventVariant event, const std::chrono::duration< Rep, Period > &interval, EventPriority priority=EventPriority::Normal) |
| | Schedule a recurring periodic event.
|
| |
| void | requestQuit () |
| | Request graceful runtime shutdown.
|
| |
| const ServiceRegistryType & | services () const noexcept |
| | Access const background service registry.
|
| |
| ServiceRegistryType & | services () noexcept |
| | Access background service registry.
|
| |
template<typename Derived, typename EventVariantOrBus = DefaultEvents, std::size_t MaxServices = 8>
class corium::Application< Derived, EventVariantOrBus, MaxServices >
Static CRTP base class for applications managed by Corium Runtime. Subclass Application<Derived> or Application<Derived, EventVariant, MaxServices> for zero-vtable compile-time static dispatch. All framework operations and handlers are protected for clean encapsulation within the derived application.
- Template Parameters
-
| Derived | Subclass type implementing lifecycle hooks (onRegisterHandlers, onInitialize, onShutdown, onConfigureServices). |
| EventVariantOrBus | Event variant type list or EventBus type (defaults to DefaultEvents). |
| MaxServices | Maximum number of background services that can be registered (defaults to 8). |
template<typename Derived , typename EventVariantOrBus = DefaultEvents, std::size_t MaxServices = 8>
template<typename Filter , typename Handler >
requires (std::is_invocable_r_v<bool, Filter&, const callable_event_type_t<Handler>&>)
| bool corium::Application< Derived, EventVariantOrBus, MaxServices >::on |
( |
Filter && |
filter, |
|
|
Handler && |
handler |
|
) |
| |
|
inlineprotected |
Register a filtered event handler executed only when predicate evaluates to true.
- Template Parameters
-
| Filter | Callable returning bool when passed the event. |
| Handler | Callable taking const EventType&. |
template<typename Derived , typename EventVariantOrBus = DefaultEvents, std::size_t MaxServices = 8>
template<typename EV , typename QP , typename SP , typename STP , typename OP , typename TP , typename PP >