SObjectizer
5.5
|
Template class for storing bunch of message handlers. More...
#include <handler_makers.hpp>
Public Member Functions | |
handlers_bunch_t () | |
void | add_handler (std::size_t index, msg_type_and_handler_pair_t &&handler) |
Add another handler to the specified index. More... | |
void | prepare () |
Prepare bunch to use with actual messages. More... | |
bool | handle (const std::type_index &msg_type, message_ref_t &message, invocation_type_t invocation) const |
Find handler for a message and execute it. More... | |
Private Attributes | |
msg_type_and_handler_pair_t | m_handlers [N] |
Vector of message handlers. More... | |
Additional Inherited Members | |
![]() | |
static void | prepare_handlers (msg_type_and_handler_pair_t *left, msg_type_and_handler_pair_t *right) |
Preparation of message handlers vector. More... | |
static SO_5_FUNC bool | find_and_use_handler (const msg_type_and_handler_pair_t *left, const msg_type_and_handler_pair_t *right, const std::type_index &msg_type, message_ref_t &message, invocation_type_t invocation) |
Find and exec message handler. More... | |
Template class for storing bunch of message handlers.
|
inline |
|
inline |
Add another handler to the specified index.
index | Index for new handler. |
handler | Message handler to be added. |
|
inline |
Find handler for a message and execute it.
true | if handler was found. |
false | if handler was not found. |
msg_type | Type of a message or signal. |
message | Message instance to be processed. |
invocation | It is async message or service handler? |
|
inline |
Prepare bunch to use with actual messages.
|
private |
Vector of message handlers.
Will be ordered by msg_type after invoking prepare() method.