SObjectizer-5 Extra
|
A template for broadcasting mbox with fixed set of destinations. More...
#include <broadcast.hpp>
Public Member Functions | |
mbox_id_t | id () const override |
void | subscribe_event_handler (const std::type_index &, const message_limit::control_block_t *, agent_t &) override |
void | unsubscribe_event_handlers (const std::type_index &, agent_t &) override |
std::string | query_name () const override |
mbox_type_t | type () const override |
void | do_deliver_message (const std::type_index &msg_type, const message_ref_t &message, unsigned int overlimit_reaction_deep) override |
void | set_delivery_filter (const std::type_index &, const delivery_filter_t &, agent_t &) override |
void | drop_delivery_filter (const std::type_index &, agent_t &) noexcept override |
environment_t & | environment () const noexcept override |
Static Public Member Functions | |
static mbox_t | make (environment_t &env, const Container &destinations) |
Factory method for the creation of new instance of a mbox. More... | |
static mbox_t | make (environment_t &env, Container &&destinations) |
Factory method for the creation of new instance of a mbox. More... | |
template<typename Input_It > | |
static mbox_t | make (environment_t &env, Input_It first, Input_It last) |
Factory method for the creation of new instance of a mbox. More... | |
template<typename Another_Container > | |
static mbox_t | make (environment_t &env, const Another_Container &destinations) |
Factory method for the creation of new instance of a mbox. More... | |
Protected Member Functions | |
fixed_mbox_template_t (outliving_reference_t< environment_t > env, mbox_id_t id, const Container &destinations) | |
Initializing constructor. More... | |
fixed_mbox_template_t (outliving_reference_t< environment_t > env, mbox_id_t id, Container &&destinations) | |
Initializing constructor. More... | |
template<typename Input_It > | |
fixed_mbox_template_t (outliving_reference_t< environment_t > env, mbox_id_t id, Input_It first, Input_It last) | |
Initializing constructor. More... | |
Private Attributes | |
outliving_reference_t< environment_t > | m_env |
const mbox_id_t | m_id |
const Container | m_destinations |
A template for broadcasting mbox with fixed set of destinations.
make
methods should be used.Container | Type of a container for holding list of destination mboxes. By default it is std::vector<mbox_t> but a user can set any type of sequential container. For example: using my_broadcast_mbox = so_5::extra::mboxes::broadcast::fixed_mbox_template_t< std::array<so_5::mbox_t, 10> >; |
Definition at line 60 of file broadcast.hpp.
|
inlineprotected |
Initializing constructor.
Intended for the case when a set of destinations should be taken from a const reference to the container of the same type.
env | SObjectizer Environment to work in. |
id | A unique ID of that |
destinations | Source container with a set of destination mboxes. |
Definition at line 72 of file broadcast.hpp.
|
inlineprotected |
Initializing constructor.
Intended for the case when a set of destinations should be borrowed (moved) from a temporary container of the same type.
env | SObjectizer Environment to work in. |
id | A unique ID of that |
destinations | Source container with a set of destination mboxes. The content of this container will be borrowed. |
Definition at line 89 of file broadcast.hpp.
|
inlineprotected |
Initializing constructor.
Intended for the case when a set of destination mboxes is specified by a pair of iterators.
env | SObjectizer Environment to work in. |
id | A unique ID of that |
first | The left border of a range (inclusive). |
last | The right border of a range (exclusive). |
Definition at line 108 of file broadcast.hpp.
|
inlineoverride |
Definition at line 161 of file broadcast.hpp.
|
inlineoverridenoexcept |
Definition at line 186 of file broadcast.hpp.
|
inlineoverridenoexcept |
Definition at line 192 of file broadcast.hpp.
|
inlineoverride |
Definition at line 124 of file broadcast.hpp.
|
inlinestatic |
Factory method for the creation of new instance of a mbox.
Copies the whole content from destinations container.
Usage example:
env | SObjectizer Environment to work in. |
destinations | A set of destinations for a new mbox. |
Definition at line 216 of file broadcast.hpp.
|
inlinestatic |
Factory method for the creation of new instance of a mbox.
Borrows (moves from) the whole content from destinations container.
Usage example:
env | SObjectizer Environment to work in. |
destinations | A temporary container with a set of destination mboxes. The content of that container will be moved into a new mbox. |
Definition at line 255 of file broadcast.hpp.
|
inlinestatic |
Factory method for the creation of new instance of a mbox.
Uses values from a range [first, last) for initialization of destinations container.
Usage example:
env | SObjectizer Environment to work in. |
first | The left border of a range (inclusive). |
last | The right border of a range (exclusive). |
Definition at line 296 of file broadcast.hpp.
|
inlinestatic |
Factory method for the creation of new instance of a mbox.
Uses the whole content of a container of other type.
Usage example:
env | SObjectizer Environment to work in. |
destinations | The container (or range object) with a set of destinations to a new mbox. |
Definition at line 336 of file broadcast.hpp.
|
inlineoverride |
Definition at line 146 of file broadcast.hpp.
|
inlineoverride |
Definition at line 176 of file broadcast.hpp.
|
inlineoverride |
Definition at line 127 of file broadcast.hpp.
|
inlineoverride |
Definition at line 155 of file broadcast.hpp.
|
inlineoverride |
Definition at line 137 of file broadcast.hpp.
|
private |
Definition at line 64 of file broadcast.hpp.
|
private |
Definition at line 62 of file broadcast.hpp.
|
private |
Definition at line 63 of file broadcast.hpp.