|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Event-driven table abstraction for event-driven simulations. More...
#include <aleph.H>#include <tpl_dynArray.H>#include <ah-errors.H>#include <functional>#include <memory>#include <type_traits>Go to the source code of this file.
Classes | |
| class | Event_Table< Signature > |
| Abstract base class for type-safe event tables. More... | |
| class | Event_Table< void *(void *)> |
| Specialization of Event_Table for legacy void*(void*) signature. More... | |
| class | Static_Event_Table< Signature > |
| Fixed-size event table implementation. More... | |
| class | Dynamic_Event_Table< Signature > |
| Dynamic (growable) event table implementation. More... | |
Typedefs | |
| typedef void *(* | Event_Fct) (void *) |
| Type alias for legacy event handler functions. | |
| using | Legacy_Static_Event_Table = Static_Event_Table< void *(void *)> |
| Legacy event table type (uses void* for input/output). | |
| using | Legacy_Dynamic_Event_Table = Dynamic_Event_Table< void *(void *)> |
| Legacy dynamic event table type (uses void* for input/output). | |
Event-driven table abstraction for event-driven simulations.
This file provides type-safe event tables for managing event handlers in event-driven simulations and frameworks. Events can be registered as function pointers, lambdas, functors, or std::function objects, with compile-time type safety for arguments and return values.
Event tables map integer indices to event handler callables. Two implementations are provided:
Both implementations are templated on the event signature, allowing type-safe event handlers with arbitrary arguments and return types.
Definition in file driven_table.H.
| typedef void *(* Event_Fct) (void *) |
Type alias for legacy event handler functions.
Event functions take a void* input parameter and return a void* result. This allows arbitrary data to be passed to and returned from events.
Definition at line 112 of file driven_table.H.
| using Legacy_Dynamic_Event_Table = Dynamic_Event_Table<void*(void*)> |
Legacy dynamic event table type (uses void* for input/output).
This alias maintains backward compatibility with code using the old Dynamic_Event_Table interface with void* event handlers.
Definition at line 595 of file driven_table.H.
| using Legacy_Static_Event_Table = Static_Event_Table<void*(void*)> |
Legacy event table type (uses void* for input/output).
This alias maintains backward compatibility with code using the old Event_Table interface with void* event handlers.
Definition at line 586 of file driven_table.H.