handler specialization for lambda handler More...
#include <handler.h>
Public Types | |
using | handler_backend_t = lambda_holder_t< Handler, M > |
alias type for lambda, which will actually process messages | |
Public Member Functions | |
handler_t (actor_base_t &actor, handler_backend_t &&handler_) | |
constructs handler from actor & lambda wrapper | |
void | call (message_ptr_t &message) noexcept override |
attempt to delivery message to the handler | |
bool | select (message_ptr_t &message) noexcept override |
returns true if the message can be handled by the handler | |
void | call_no_check (message_ptr_t &message) noexcept override |
unconditionally invokes the handler for the message | |
const void * | message_type () const noexcept override |
unique per-message-type pointer used for routing | |
Public Member Functions inherited from rotor::handler_base_t | |
handler_base_t (actor_base_t &actor, const void *handler_type_) noexcept | |
constructs handler_base_t from raw pointer to actor, raw pointer to message type and raw pointer to handler type | |
bool | operator== (const handler_base_t &rhs) const noexcept |
compare two handler for equality | |
virtual handler_ptr_t | upgrade (const void *tag) noexcept |
"upgrades" handler by tagging it | |
Public Attributes | |
handler_backend_t | handler |
actually lambda function for message processing | |
Public Attributes inherited from rotor::handler_base_t | |
const void * | handler_type |
pointer to unique handler type ( typeid(Handler).name() ) | |
actor_base_t * | actor_ptr |
non-null pointer to actor_base_t the actor of the handler, | |
size_t | precalc_hash |
precalculated hash for the handler | |
Static Public Attributes | |
static const void * | handler_type |
static pointer to unique pointer-to-member function name ( typeid(Handler).name() ) | |
handler specialization for lambda handler
|
inlineoverridevirtualnoexcept |
attempt to delivery message to the handler
The message is delivered only if its type matches to the handler message type, otherwise it is silently ignored
Implements rotor::handler_base_t.
|
inlineoverridevirtualnoexcept |
unconditionally invokes the handler for the message
It assumes that the handler is able to handle the message. See select
method.
Implements rotor::handler_base_t.
|
inlineoverridevirtualnoexcept |
unique per-message-type pointer used for routing
Implements rotor::handler_base_t.
|
inlineoverridevirtualnoexcept |
returns true
if the message can be handled by the handler
Implements rotor::handler_base_t.