C CASTLE / MODULE NOTES
CASTLE/Modules/Events

MODULE 09 / 15

Event dispatcher

Dispatch application events to registered handlers using fixed-capacity Castle facilities.

#include "castle/events/delegate_dispatcher.h"

Overview

Dispatches application events to registered handlers using fixed-capacity Castle facilities.

Namespace: castle::events

Main API

APIPurpose
delegate_dispatcherMain dispatcher type and its event subscription/dispatch operations.
Event subscriptionConnect handlers to event identifiers or types.
Dispatch/postSend an event to the matching listeners.
Capacity/stateFixed limits and bounded failure reporting.

Example

// Configure a dispatcher, register handlers, then dispatch events.
// The exact event type is defined by the header template parameters.

Embedded notes

  • No heap-backed event queue is required by the fixed-capacity design.