10#include "subscription.h"
11#include <unordered_map>
16#pragma warning(disable : 4251)
51 auto it_mappings = actor_map.find(
static_cast<const void *
>(&actor));
52 for (
auto it : it_mappings->second) {
61 bool empty() const noexcept {
return actor_map.empty(); }
67 using point_map_t = std::unordered_map<const void *, subscription_info_ptr_t>;
68 using actor_map_t = std::unordered_map<const void *, point_map_t>;
69 actor_map_t actor_map;
Basic namespace for all rotor functionalities.
Definition rotor.hpp:21
intrusive_ptr_t< address_t > address_ptr_t
intrusive pointer for address
Definition address.hpp:57
intrusive_ptr_t< subscription_info_t > subscription_info_ptr_t
intrusive pointer for subscription_info_t
Definition subscription_point.h:127
universal primitive of concurrent computation
Definition actor_base.h:47
NAT mechanism for rotor
Definition address_mapping.h:33
bool has_subscriptions(const actor_base_t &actor) const noexcept
checks whether an actor has any subscriptions
address_ptr_t get_mapped_address(actor_base_t &actor, const void *) noexcept
returns temporal destination address for the actor/message type
void remove(const subscription_point_t &point) noexcept
forgets subscription point
bool empty() const noexcept
returns true if there is no any subscription for any actor
Definition address_mapping.h:61
void set(actor_base_t &actor, const subscription_info_ptr_t &info) noexcept
associates temporal destination point with actor's message type
void each_subscription(const actor_base_t &actor, Fn &&fn) const noexcept
iterates on all subscriptions for an actor
Definition address_mapping.h:50
pair of handler_base_t linked to particular address_t
Definition subscription_point.h:50