CommandHandlerRef Struct Template
Typed reference wrapper for invoking a registered handler. More...
Declaration
Public Operators Index
template <typename CommandType> | |
| operator bool () const noexcept | |
|
Checks if this reference points to a valid handler. More... | |
Public Member Functions Index
template <typename CommandType> | |
| bool | submit (const CommandType &cmd) const noexcept |
|
Submits a command to the referenced handler. More... | |
Public Member Attributes Index
template <typename CommandType> | |
| void * | owner = nullptr |
|
Pointer to the handler instance. More... | |
template <typename CommandType> | |
| bool(* | submitFn)(void *, const void *) noexcept = nullptr |
|
Type-erased trampoline for command dispatch. More... | |
Description
Typed reference wrapper for invoking a registered handler.
- Template Parameters
-
CommandType The specific command type this reference handles.
Definition at line 43 of file CommandHandlerRegistry.ixx.
Public Operators
operator bool()
| inline explicit nodiscard noexcept |
Checks if this reference points to a valid handler.
- Returns
True if both owner and submitFn are non-null.
Definition at line 60 of file CommandHandlerRegistry.ixx.
References helios::engine::runtime::messaging::command::CommandHandlerRef< CommandType >::owner and helios::engine::runtime::messaging::command::CommandHandlerRef< CommandType >::submitFn.
Public Member Functions
submit()
| inline noexcept |
Submits a command to the referenced handler.
- Parameters
-
cmd The command instance to submit.
- Returns
True if the command was accepted/handled.
Definition at line 70 of file CommandHandlerRegistry.ixx.
References helios::engine::runtime::messaging::command::CommandHandlerRef< CommandType >::owner and helios::engine::runtime::messaging::command::CommandHandlerRef< CommandType >::submitFn.
Public Member Attributes
owner
|
Pointer to the handler instance.
Definition at line 48 of file CommandHandlerRegistry.ixx.
Referenced by helios::engine::runtime::messaging::command::CommandHandlerRef< CommandType >::operator bool and helios::engine::runtime::messaging::command::CommandHandlerRef< CommandType >::submit.
submitFn
|
Type-erased trampoline for command dispatch.
Definition at line 53 of file CommandHandlerRegistry.ixx.
Referenced by helios::engine::runtime::messaging::command::CommandHandlerRef< CommandType >::operator bool and helios::engine::runtime::messaging::command::CommandHandlerRef< CommandType >::submit.
The documentation for this struct was generated from the following file:
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.