16#pragma warning(disable : 4251)
75namespace message_support {
76ROTOR_API
const void *register_type(
const std::type_index &type_index)
noexcept;
104 template <
typename... Args>
145template <
typename M,
typename... Args>
Basic namespace for all rotor functionalities.
Definition rotor.hpp:21
intrusive_ptr_t< message_base_t > message_ptr_t
intrusive pointer for message
Definition message.h:118
intrusive_ptr_t< address_t > address_ptr_t
intrusive pointer for address
Definition address.hpp:57
std::deque< message_ptr_t > messages_queue_t
structure to hold messages (intrusive pointers)
Definition message.h:121
boost::intrusive_ref_counter< T, counter_policy_t > arc_base_t
base class to inject ref-counter with the specified policy
Definition arc.hpp:24
auto make_routed_message(const address_ptr_t &addr, const address_ptr_t &route_addr, Args &&...args) -> message_ptr_t
constructs message by constructing it's payload; after delivery to destination address (to all subscr...
Definition message.h:146
auto make_message(const address_ptr_t &addr, Args &&...args) -> message_ptr_t
constructs message by constructing it's payload; intrusive pointer for the message is returned
Definition message.h:124
boost::intrusive_ptr< T > intrusive_ptr_t
alias for intrusive pointer
Definition arc.hpp:27
Base class for rotor message.
Definition message.h:52
address_ptr_t next_route
post-delivery destination address, see make_routed_message() for usage
Definition message.h:68
message_base_t(const void *type_index_, const address_ptr_t &addr)
constructor which takes destination address
Definition message.h:71
const void * type_index
unique message type pointer.
Definition message.h:62
address_ptr_t address
message destination address
Definition message.h:65
struct visitor_t concrete message type visitor
Definition message.h:96
virtual void on(const message_t &, void *)
visit concrete message
Definition message.h:100
the generic message meant to hold user-specific payload
Definition message.h:83
static const void * message_type
unique per-message-type pointer used for routing
Definition message.h:112
T payload_t
alias for payload type
Definition message.h:86
message_t(const address_ptr_t &addr, Args &&...args)
forwards args for payload construction
Definition message.h:105
T payload
user-defined payload
Definition message.h:109
Abstract message visitor interface.
Definition message.h:36
virtual bool try_visit(const message_base_t &message, void *context) const =0
returns true if a message has been successfully processed