9#include "rotor/forward.hpp"
10#include "rotor/address.hpp"
11#include "rotor/subscription_point.h"
12#include "rotor/message.h"
13#include <boost/unordered_map.hpp>
18#pragma warning(disable : 4251)
68 template <typename T> auto &access() noexcept;
71 struct subscription_key_t {
74 inline bool operator==(
const subscription_key_t &other)
const noexcept {
75 return address == other.address && message_type == other.message_type;
79 struct subscription_key_hash_t {
80 inline std::size_t operator()(
const subscription_key_t &k)
const noexcept {
81 return std::size_t(k.address) + 0x9e3779b9 + (size_t(k.message_type) << 6) + (
size_t(k.message_type) >> 2);
85 using addressed_handlers_t = boost::unordered_map<subscription_key_t, joint_handlers_t, subscription_key_hash_t>;
87 using info_container_t = boost::unordered_map<address_ptr_t, std::vector<subscription_info_ptr_t>>;
88 address_t *main_address;
89 info_container_t internal_infos;
90 addressed_handlers_t mine_handlers;
Basic namespace for all rotor functionalities.
Definition rotor.hpp:21
intrusive_ptr_t< handler_base_t > handler_ptr_t
intrusive pointer for handler
Definition forward.hpp:26
intrusive_ptr_t< subscription_info_t > subscription_info_ptr_t
intrusive pointer for subscription_info_t
Definition subscription_point.h:127
Message subscription and delivery point.
Definition address.hpp:33
Base class for rotor message.
Definition message.h:52
pair of handler_base_t linked to particular address_t
Definition subscription_point.h:50
pair internal and external handler_t
Definition subscription.h:40
handlers_t internal
internal handlers, i.e. those which belong to actors of the supervisor
Definition subscription.h:42
handlers_t external
external handlers, i.e. those which belong to actors of other supervisor
Definition subscription.h:44
Holds and classifies message handlers on behalf of supervisor.
Definition subscription.h:30
std::vector< handler_base_t * > handlers_t
vector of handler pointers
Definition subscription.h:35
const void * message_type_t
alias for message type (i.e. stringized typeid)
Definition subscription.h:32