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

Abstract message visitor interface. More...

#include <message.h>

Inheritance diagram for rotor::message_visitor_t:
rotor::misc::default_stringifier_t

Public Member Functions

virtual bool try_visit (const message_base_t &message) const =0
 returns true if a message has been successfully processed
 

Detailed Description

Abstract message visitor interface.

As the message type is dynamic and might not be known at compile type, the try_visit method returns true or false to indicate whether a message has been successfully processed. If it returns false, that might indicate, that some other message visitor should try a luck.

It should be noted, that it is potentially slow (not very performant) as it involves multiple visitors and multiple message try attemps (the double dispatch visitor pattern is not available).

Member Function Documentation

◆ try_visit()

virtual bool rotor::message_visitor_t::try_visit ( const message_base_t message) const
pure virtual

returns true if a message has been successfully processed

Implemented in rotor::misc::default_stringifier_t.


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