SObjectizer-5 Extra
Classes | Public Types | Public Member Functions | Public Attributes | List of all members
so_5::extra::mboxes::first_last_subscriber_notification::details::template_independent_mbox_data_t Struct Reference

A mixin with actual data which is necessary for implementation of actual mbox. More...

#include <first_last_subscriber_notification.hpp>

Classes

struct  agent_ptr_comparator_t
 A special coparator for agents with respect to agent's priority. More...
 

Public Types

using subscribers_map_t = std::map< agent_t *, subscriber_info_t, agent_ptr_comparator_t >
 Type of subscribers map. More...
 

Public Member Functions

 template_independent_mbox_data_t (environment_t &env, mbox_id_t id, mbox_t notification_mbox, mbox_type_t mbox_type)
 

Public Attributes

environment_t & m_env
 SObjectizer Environment to work in. More...
 
const mbox_id_t m_id
 ID of the mbox. More...
 
const mbox_t m_notification_mbox
 Mbox for notifications about the first/last subscribers. More...
 
const mbox_type_t m_mbox_type
 Type of this mbox (MPMC or MPSC). More...
 
subscribers_map_t m_subscribers
 Subscribers. More...
 
std::size_t m_subscriptions_count {}
 Number of actual subscriptions. More...
 

Detailed Description

A mixin with actual data which is necessary for implementation of actual mbox.

This data type doesn't depend on any template parameters.

Since
v.1.5.2

Definition at line 166 of file first_last_subscriber_notification.hpp.

Member Typedef Documentation

◆ subscribers_map_t

Type of subscribers map.

Definition at line 180 of file first_last_subscriber_notification.hpp.

Constructor & Destructor Documentation

◆ template_independent_mbox_data_t()

so_5::extra::mboxes::first_last_subscriber_notification::details::template_independent_mbox_data_t::template_independent_mbox_data_t ( environment_t &  env,
mbox_id_t  id,
mbox_t  notification_mbox,
mbox_type_t  mbox_type 
)
inline

Definition at line 210 of file first_last_subscriber_notification.hpp.

Member Data Documentation

◆ m_env

environment_t& so_5::extra::mboxes::first_last_subscriber_notification::details::template_independent_mbox_data_t::m_env

SObjectizer Environment to work in.

Definition at line 183 of file first_last_subscriber_notification.hpp.

◆ m_id

const mbox_id_t so_5::extra::mboxes::first_last_subscriber_notification::details::template_independent_mbox_data_t::m_id

ID of the mbox.

Definition at line 186 of file first_last_subscriber_notification.hpp.

◆ m_mbox_type

const mbox_type_t so_5::extra::mboxes::first_last_subscriber_notification::details::template_independent_mbox_data_t::m_mbox_type

Type of this mbox (MPMC or MPSC).

Definition at line 192 of file first_last_subscriber_notification.hpp.

◆ m_notification_mbox

const mbox_t so_5::extra::mboxes::first_last_subscriber_notification::details::template_independent_mbox_data_t::m_notification_mbox

Mbox for notifications about the first/last subscribers.

Definition at line 189 of file first_last_subscriber_notification.hpp.

◆ m_subscribers

subscribers_map_t so_5::extra::mboxes::first_last_subscriber_notification::details::template_independent_mbox_data_t::m_subscribers

Subscribers.

Can be empty.

Definition at line 198 of file first_last_subscriber_notification.hpp.

◆ m_subscriptions_count

std::size_t so_5::extra::mboxes::first_last_subscriber_notification::details::template_independent_mbox_data_t::m_subscriptions_count {}

Number of actual subscriptions.

Note
There could be cases when a delivery filter is set, but subscription isn't made yet. Such cases shouldn't be treated as subscriptions. So we have to store the number of actual subscriptions separately and don't rely on the size of m_subscribers.

Definition at line 208 of file first_last_subscriber_notification.hpp.


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