SObjectizer-5 Extra
Public Types | Public Member Functions | Private Attributes | List of all members
so_5::extra::mboxes::collecting_mbox::details::collected_messages_bunch_builder_t< Config_Type > Class Template Reference

A builder for case when collecting_mbox collects messages. More...

#include <collecting_mbox.hpp>

Public Types

using message_type = collected_messages_bunch_t< Config_Type >
 Actual message type to be used. More...
 

Public Member Functions

void store (message_ref_t message, std::size_t messages_to_collect)
 Store another instance of collecting messages. More...
 
bool is_ready_to_be_sent (std::size_t messages_to_collect) const noexcept
 
std::unique_ptr< message_typeextract_message ()
 

Private Attributes

std::unique_ptr< message_typem_current_msg
 The current instance of messages_collected to store messages to be delivered. More...
 
std::size_t m_collected_messages = 0
 Count of collected messages. More...
 

Detailed Description

template<typename Config_Type>
class so_5::extra::mboxes::collecting_mbox::details::collected_messages_bunch_builder_t< Config_Type >

A builder for case when collecting_mbox collects messages.

Template Parameters
Config_Typea type with enumeration of all necessary type traits. It is expected to be config_type with appropriate type parameters.

Definition at line 335 of file collecting_mbox.hpp.

Member Typedef Documentation

◆ message_type

Actual message type to be used.

Definition at line 339 of file collecting_mbox.hpp.

Member Function Documentation

◆ extract_message()

template<typename Config_Type >
std::unique_ptr< message_type > so_5::extra::mboxes::collecting_mbox::details::collected_messages_bunch_builder_t< Config_Type >::extract_message ( )
inline

Definition at line 397 of file collecting_mbox.hpp.

◆ is_ready_to_be_sent()

template<typename Config_Type >
bool so_5::extra::mboxes::collecting_mbox::details::collected_messages_bunch_builder_t< Config_Type >::is_ready_to_be_sent ( std::size_t  messages_to_collect) const
inlinenoexcept

Definition at line 391 of file collecting_mbox.hpp.

◆ store()

template<typename Config_Type >
void so_5::extra::mboxes::collecting_mbox::details::collected_messages_bunch_builder_t< Config_Type >::store ( message_ref_t  message,
std::size_t  messages_to_collect 
)
inline

Store another instance of collecting messages.

Parameters
messageMessage to be stored.
messages_to_collectTotal count of message to be collected. This parameter is necessary because a new instance of messages_collected can be created inside this method.

Definition at line 358 of file collecting_mbox.hpp.

Member Data Documentation

◆ m_collected_messages

template<typename Config_Type >
std::size_t so_5::extra::mboxes::collecting_mbox::details::collected_messages_bunch_builder_t< Config_Type >::m_collected_messages = 0
private

Count of collected messages.

If m_collected_messages != 0 then m_current_msg must not be nullptr.

Definition at line 353 of file collecting_mbox.hpp.

◆ m_current_msg

template<typename Config_Type >
std::unique_ptr< message_type > so_5::extra::mboxes::collecting_mbox::details::collected_messages_bunch_builder_t< Config_Type >::m_current_msg
private

The current instance of messages_collected to store messages to be delivered.

Can be nullptr if there is no new messages.

Definition at line 347 of file collecting_mbox.hpp.


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