|
mbox_id_t | id () const override |
|
void | subscribe_event_handler (const std::type_index &, abstract_message_sink_t &) override |
|
void | unsubscribe_event_handler (const std::type_index &, abstract_message_sink_t &) noexcept override |
|
std::string | query_name () const override |
|
mbox_type_t | type () const override |
|
void | do_deliver_message (message_delivery_mode_t delivery_mode, const std::type_index &msg_type, const message_ref_t &message, unsigned int redirection_deep) override |
|
void | set_delivery_filter (const std::type_index &, const delivery_filter_t &, abstract_message_sink_t &) override |
|
void | drop_delivery_filter (const std::type_index &, abstract_message_sink_t &) noexcept override |
|
environment_t & | environment () const noexcept override |
|
|
static mbox_t | make (environment_t &env, const Container &destinations) |
| Factory method for the creation of new instance of a mbox.
|
|
static mbox_t | make (environment_t &env, Container &&destinations) |
| Factory method for the creation of new instance of a mbox.
|
|
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.
|
|
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.
|
|
|
| fixed_mbox_template_t (outliving_reference_t< environment_t > env, mbox_id_t id, const Container &destinations) |
| Initializing constructor.
|
|
| fixed_mbox_template_t (outliving_reference_t< environment_t > env, mbox_id_t id, Container &&destinations) |
| Initializing constructor.
|
|
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.
|
|
template<typename Container = std::vector<mbox_t>>
class so_5::extra::mboxes::broadcast::fixed_mbox_template_t< Container >
A template for broadcasting mbox with fixed set of destinations.
- Note
- A set of destination is fixed at the creation time and can't be changed later. It can be not flexible enough for some senarios, but allows to avoid any additional locks during the delivery of a message.
-
This type has no public constructors. To create an instance of that type public static
make
methods should be used.
- Attention
- This type of mbox prohibits the delivery of mutable messages. It is because this is MPMC mbox.
-
This type of mbox prohibits subscriptions and usage of delivery filters. An attempt to create a subscription or an attempt to set a delivery filter will lead to an exception.
- Template Parameters
-
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: |
- Since
- v.1.3.1
Definition at line 60 of file broadcast.hpp.
template<typename Container = std::vector<mbox_t>>
template<typename Input_It >
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:
so_5::mbox_t destinations[] = {
some_agent->so_direct_mbox(),
another_agent->so_direct_mbox(),
...
};
auto broadcaster = broadcasting_mbox::make( env,
std::begin(destinations), std::end(destinations) );
...
- Parameters
-
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 295 of file broadcast.hpp.