rotor
Event loop friendly C++ actor micro-framework
 
Loading...
Searching...
No Matches
rotor::handler_intercepted_t Struct Reference

proxies call to the original hanlder, applying tag-specific actions More...

#include <handler.h>

Inheritance diagram for rotor::handler_intercepted_t:
rotor::handler_base_t

Public Member Functions

 handler_intercepted_t (handler_ptr_t backend_, const void *tag_) noexcept
 constructs handler_intercepted_t by proxying original hander
 
handler_ptr_t upgrade (const void *tag) noexcept override
 "upgrades" handler by tagging it
 
void call (message_ptr_t &) 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
 

Additional Inherited Members

- Public Attributes inherited from rotor::handler_base_t
const void * handler_type
 pointer to unique handler type ( typeid(Handler).name() )
 
actor_base_tactor_ptr
 non-null pointer to actor_base_t the actor of the handler,

 
size_t precalc_hash
 precalculated hash for the handler
 

Detailed Description

proxies call to the original hanlder, applying tag-specific actions

Member Function Documentation

◆ call()

void rotor::handler_intercepted_t::call ( message_ptr_t )
overridevirtualnoexcept

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.

◆ call_no_check()

void rotor::handler_intercepted_t::call_no_check ( message_ptr_t )
overridevirtualnoexcept

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.

◆ message_type()

const void * rotor::handler_intercepted_t::message_type ( ) const
overridevirtualnoexcept

unique per-message-type pointer used for routing

Implements rotor::handler_base_t.

◆ select()

bool rotor::handler_intercepted_t::select ( message_ptr_t )
overridevirtualnoexcept

returns true if the message can be handled by the handler

Implements rotor::handler_base_t.

◆ upgrade()

handler_ptr_t rotor::handler_intercepted_t::upgrade ( const void *  tag)
overridevirtualnoexcept

"upgrades" handler by tagging it

Conceptually it intercepts handler call and does tag-specific actions

Reimplemented from rotor::handler_base_t.


The documentation for this struct was generated from the following file: