|
| virtual | ~Conduit ()=default |
| virtual Tap | Attach (Callback_t callback) |
| | Register a callback for this event.
|
| virtual bool | Detach (std::uint64_t id) |
| | Detach by subscription ID.
|
| virtual bool | Pause (std::uint64_t id) |
| virtual bool | Resume (std::uint64_t id) |
| virtual bool | IsPaused (std::uint64_t id) const |
| virtual void | Trigger (ArgTypes... args) const |
| | Trigger the event, invoking all registered callbacks.
|
| void | operator() (ArgTypes... args) const |
| | Convenience operator for triggering the event.
|
| Tap | operator% (Callback_t callback) |
template<typename... ArgTypes>
class hdk::grid::eps::Conduit< ArgTypes >
Definition at line 14 of file EPS.hpp.
template<typename... ArgTypes>
Register a callback for this event.
Adds a callback to the list of subscriptions. The callback will be invoked whenever Trigger() is called, with the provided arguments passed to the callback.
- Parameters
-
| callback | The callback function to register (std::function) |
- Returns
- Tap An RAII handle that manages the subscription lifetime
- Note
- Callback must be callable with the template ArgTypes
-
Move semantics: callback is moved into the dispatcher
Definition at line 120 of file EPS.hpp.
Referenced by operator%().
template<typename... ArgTypes>
Trigger the event, invoking all registered callbacks.
Invokes all active callbacks with the provided arguments. Callbacks are invoked sequentially in the order they were registered. If a callback throws an exception, behavior is undefined.
Thread safety: This method acquires a lock to copy callbacks, then releases it before invocation. This allows callbacks to subscribe/unsubscribe during execution, but the newly subscribed callbacks will be invoked on the next Trigger call.
- Parameters
-
| args | Arguments to pass to each callback |
- Note
- This method is thread-safe
-
Safe to call from multiple threads concurrently
-
Safe for callbacks to subscribe/unsubscribe (though changes take effect next trigger)
Definition at line 180 of file EPS.hpp.
Referenced by operator()().