SObjectizer  5.5
Classes | Namespaces | Typedefs | Enumerations | Functions
mchain.hpp File Reference

Public part of message chain related stuff. More...

#include <so_5/mbox.hpp>
#include <so_5/handler_makers.hpp>
#include <so_5/fwd.hpp>
#include <so_5/details/invoke_noexcept_code.hpp>
#include <so_5/details/remaining_time_counter.hpp>
#include <chrono>
#include <functional>

Go to the source code of this file.

Classes

struct  so_5::mchain_props::demand_t
 Description of one demand in message chain. More...
 
class  so_5::mchain_props::capacity_t
 Parameters for defining chain size. More...
 
class  so_5::abstract_message_chain_t
 An interace of message chain. More...
 
class  so_5::mchain_params_t
 Parameters for message chain. More...
 
class  so_5::mchain_receive_result_t
 A result of receive from mchain. More...
 
struct  so_5::mchain_props::details::bulk_processing_basic_data_t
 
class  so_5::mchain_props::details::mchain_bulk_processing_basic_params_t< Basic_Data >
 
class  so_5::mchain_bulk_processing_params_t< Data, Derived >
 Basic parameters for advanced receive from mchain and for multi chain select. More...
 
struct  so_5::mchain_props::details::adv_receive_data_t
 Container of parameters for receive() function. More...
 
class  so_5::mchain_receive_params_t< Msg_Count_Status >
 Parameters for advanced receive from mchain. More...
 
class  so_5::mchain_props::details::receive_actions_performer_t< Bunch >
 Helper class with implementation of main actions of advanced receive operation. More...
 
class  so_5::prepared_receive_t< Handlers_Count >
 Special container for holding receive parameters and receive cases. More...
 

Namespaces

 so_5
 Public part of message limit implementation.
 
 so_5::mchain_props
 Various properties and parameters of message chains.
 
 so_5::mchain_props::details
 Implementation details.
 

Typedefs

using so_5::mchain_props::duration_t = std::chrono::high_resolution_clock::duration
 An alias for type for repesenting timeout values. More...
 
using so_5::mchain_props::not_empty_notification_func_t = std::function< void() >
 Type of functor for notifies about arrival of a message to the empty chain. More...
 
using so_5::mchain_t = intrusive_ptr_t< abstract_message_chain_t >
 Short name for smart pointer to message chain. More...
 

Enumerations

enum  so_5::mchain_props::memory_usage_t { so_5::mchain_props::memory_usage_t::dynamic, so_5::mchain_props::memory_usage_t::preallocated }
 Memory allocation for storage for size-limited chains. More...
 
enum  so_5::mchain_props::overflow_reaction_t { so_5::mchain_props::overflow_reaction_t::abort_app, so_5::mchain_props::overflow_reaction_t::throw_exception, so_5::mchain_props::overflow_reaction_t::drop_newest, so_5::mchain_props::overflow_reaction_t::remove_oldest }
 What reaction must be performed on attempt to push new message to the full message chain. More...
 
enum  so_5::mchain_props::extraction_status_t { so_5::mchain_props::extraction_status_t::no_messages, so_5::mchain_props::extraction_status_t::msg_extracted, so_5::mchain_props::extraction_status_t::chain_closed }
 Result of extraction of message from a message chain. More...
 
enum  so_5::mchain_props::close_mode_t { so_5::mchain_props::close_mode_t::drop_content, so_5::mchain_props::close_mode_t::retain_content }
 What to do with chain's content at close. More...
 
enum  so_5::mchain_props::msg_count_status_t { so_5::mchain_props::msg_count_status_t::undefined, so_5::mchain_props::msg_count_status_t::defined }
 Status of limit for messages to be extracted/handled during a bulk operation on a mchain. More...
 

Functions

duration_t so_5::mchain_props::details::no_wait_special_timevalue ()
 Special value of duration to indicate 'no_wait' case. More...
 
duration_t so_5::mchain_props::details::infinite_wait_special_timevalue ()
 Special value of duration to indicate 'infinite_wait' case. More...
 
bool so_5::mchain_props::details::is_no_wait_timevalue (duration_t v)
 Is time value means 'no_wait'? More...
 
bool so_5::mchain_props::details::is_infinite_wait_timevalue (duration_t v)
 Is time value means 'infinite_wait'? More...
 
duration_t so_5::mchain_props::details::actual_timeout (infinite_wait_indication)
 Helper function for detection of actual value for waiting timeout. More...
 
duration_t so_5::mchain_props::details::actual_timeout (no_wait_indication)
 Helper function for detection of actual value for waiting timeout. More...
 
template<typename V >
duration_t so_5::mchain_props::details::actual_timeout (V value)
 Helper function for detection of actual value for waiting timeout. More...
 
void so_5::close_drop_content (const mchain_t &ch)
 Helper function for closing a message chain with dropping all its content. More...
 
void so_5::close_retain_content (const mchain_t &ch)
 Helper function for closing a message chain with retaining all its content. More...
 
mchain_receive_params_t< mchain_props::msg_count_status_t::undefined > so_5::from (mchain_t chain)
 A helper function for simplification of creation of mchain_receive_params instance. More...
 
template<typename Bunch >
mchain_receive_result_t so_5::mchain_props::details::receive_with_finite_total_time (const mchain_receive_params_t< msg_count_status_t::defined > &params, const Bunch &bunch)
 An implementation of advanced receive when a limit for total operation time is defined. More...
 
template<typename Bunch >
mchain_receive_result_t so_5::mchain_props::details::receive_without_total_time (const mchain_receive_params_t< msg_count_status_t::defined > &params, const Bunch &bunch)
 An implementation of advanced receive when there is no limit for total operation time is defined. More...
 
template<typename Bunch >
mchain_receive_result_t so_5::mchain_props::details::perform_receive (const mchain_receive_params_t< msg_count_status_t::defined > &params, const Bunch &bunch)
 An implementation of main receive actions. More...
 
template<mchain_props::msg_count_status_t Msg_Count_Status, typename... Handlers>
mchain_receive_result_t so_5::receive (const mchain_receive_params_t< Msg_Count_Status > &params, Handlers &&... handlers)
 Advanced version of receive from mchain. More...
 
template<mchain_props::msg_count_status_t Msg_Count_Status, typename... Handlers>
prepared_receive_t< sizeof...(Handlers) > so_5::prepare_receive (const mchain_receive_params_t< Msg_Count_Status > &params, Handlers &&... handlers)
 Create parameters for receive function to be used later. More...
 
template<std::size_t Handlers_Count>
mchain_receive_result_t so_5::receive (const prepared_receive_t< Handlers_Count > &prepared)
 A receive operation to be done on previously prepared receive params. More...
 
Helper functions for creating parameters for mchain.
mchain_params_t so_5::make_unlimited_mchain_params ()
 Create parameters for size-unlimited mchain. More...
 
mchain_params_t so_5::make_limited_without_waiting_mchain_params (std::size_t max_size, mchain_props::memory_usage_t memory_usage, mchain_props::overflow_reaction_t overflow_reaction)
 Create parameters for size-limited mchain without waiting on overflow. More...
 
mchain_params_t so_5::make_limited_with_waiting_mchain_params (std::size_t max_size, mchain_props::memory_usage_t memory_usage, mchain_props::overflow_reaction_t overflow_reaction, mchain_props::duration_t wait_timeout)
 Create parameters for size-limited mchain with waiting on overflow. More...
 

Detailed Description

Public part of message chain related stuff.

Since
v.5.5.13