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

A base class for the agent messages definition. More...

#include <so_5/h/declspec.hpp>
#include <so_5/h/exception.hpp>
#include <so_5/h/atomic_refcounted.hpp>
#include <so_5/h/types.hpp>
#include <so_5/rt/h/agent_ref_fwd.hpp>
#include <type_traits>
#include <typeindex>
#include <functional>
#include <future>
#include <atomic>

Go to the source code of this file.

Classes

class  so_5::message_t
 A base class for agent messages. More...
 
class  so_5::signal_t
 A base class for agent signals. More...
 
struct  so_5::user_type_message_t< T >
 Template class for representing object of user type as a message. More...
 
struct  so_5::immutable_msg< M >
 A special marker for immutable message. More...
 
struct  so_5::mutable_msg< M >
 A special marker for mutable message. More...
 
struct  so_5::details::message_mutability_traits< T >
 Detector of message type traits in dependency of message immutability or mutability. More...
 
struct  so_5::details::message_mutability_traits< immutable_msg< T > >
 
struct  so_5::details::message_mutability_traits< mutable_msg< T > >
 
struct  so_5::is_user_type_message< M >
 A helper for detection presence of message of user type. More...
 
struct  so_5::is_user_type_message< user_type_message_t< M > >
 
struct  so_5::is_signal< T >
 A helper class for checking that message is a signal. More...
 
struct  so_5::is_classical_message< T >
 A helper class for checking that message is a classical message derived from message_t class. More...
 
struct  so_5::is_mutable_message< T >
 A helper class for checking that message is a mutable message. More...
 
struct  so_5::is_mutable_message< mutable_msg< T > >
 
struct  so_5::message_payload_type_impl< T, is_classical_message >
 Implementation details for message_payload_type. More...
 
struct  so_5::message_payload_type_impl< T, false >
 Implementation details for message_payload_type. More...
 
struct  so_5::message_payload_type< T >
 A helper class for detection of payload type of message. More...
 
struct  so_5::message_payload_type< user_type_message_t< T > >
 
struct  so_5::details::make_message_instance_impl< is_signal, Msg >
 
struct  so_5::details::make_message_instance_impl< true, Msg >
 
class  so_5::msg_service_request_base_t
 A base class for concrete messages with information about service requests. More...
 
struct  so_5::msg_service_request_t< Result, Param >
 A concrete message with information about service request. More...
 
struct  so_5::message_limit::overlimit_context_t
 Description of context for overlimit action. More...
 
struct  so_5::message_limit::control_block_t
 A control block for one message limit. More...
 

Namespaces

 so_5
 Public part of message limit implementation.
 
 so_5::details
 Some reusable and low-level classes/functions which can be used in public header files.
 
 so_5::message_limit
 All stuff related to message limits.
 
 so_5::message_limit::impl
 Internal implementation of message limits related stuff.
 
 so_5::rt
 All code related to implementation of SObjectizer run-time.
 
 so_5::rt::message_limit
 All stuff related to message limits.
 

Typedefs

typedef intrusive_ptr_t< message_t > so_5::message_ref_t
 A smart reference to the message. More...
 
using so_5::message_limit::action_t = std::function< void(const overlimit_context_t &) >
 A type for reaction of message overlimit. More...
 
using so_5::rt::message_t = so_5::message_t
 
using so_5::rt::message_ref_t = so_5::message_ref_t
 
using so_5::rt::signal_t = so_5::signal_t
 
template<typename T >
using so_5::rt::user_type_message_t = so_5::user_type_message_t< T >
 
template<typename M >
using so_5::rt::is_user_type_message = so_5::is_user_type_message< M >
 
template<class T >
using so_5::rt::is_signal = so_5::is_signal< T >
 
template<class T >
using so_5::rt::is_classical_message = so_5::is_classical_message< T >
 
template<typename T >
using so_5::rt::message_payload_type = so_5::message_payload_type< T >
 
using so_5::rt::msg_service_request_base_t = so_5::msg_service_request_base_t
 
template<class Result , class Param >
using so_5::rt::msg_service_request_t = so_5::msg_service_request_t< Result, Param >
 
using so_5::rt::invocation_type_t = so_5::invocation_type_t
 
using so_5::rt::message_limit::overlimit_context_t = so_5::message_limit::overlimit_context_t
 
using so_5::rt::message_limit::action_t = so_5::message_limit::action_t
 
using so_5::rt::message_limit::control_block_t = so_5::message_limit::control_block_t
 

Enumerations

enum  so_5::invocation_type_t : int { so_5::invocation_type_t::event, so_5::invocation_type_t::service_request, so_5::invocation_type_t::enveloped_msg }
 Type of agent method invocation (event handling, service request). More...
 

Functions

template<class Msg >
void so_5::ensure_not_signal ()
 A special compile-time checker to guarantee that the message class is not a signal class. More...
 
template<class Msg >
void so_5::ensure_message_with_actual_data (const Msg *m)
 A special checker to guarantee that the message is an instance of the message_t (not signal_t) and has a not-null pointer to the message data. More...
 
template<class S >
void so_5::ensure_not_mutable_signal ()
 A special compile-time checker to guarantee that S is not a mutable signal. More...
 
template<class Msg >
void so_5::ensure_signal ()
 A special compile-time checker to guarantee that the Msg is derived from the signal_t. More...
 
template<typename Msg >
void so_5::ensure_classical_message ()
 A special compile-time checker to guarantee that Msg is derived from message_t. More...
 
template<typename Msg >
std::enable_if< message_mutability_t::mutable_message==::so_5::details::message_mutability_traits< Msg >::mutability >::type so_5::details::mark_as_mutable_if_necessary (message_t &msg)
 
template<typename Msg >
std::enable_if< message_mutability_t::mutable_message !=::so_5::details::message_mutability_traits< Msg >::mutability >::type so_5::details::mark_as_mutable_if_necessary (message_t &)
 
template<typename Msg , typename... Args>
auto so_5::details::make_message_instance (Args &&... args) -> std::unique_ptr< typename message_payload_type< Msg >::envelope_type >
 A helper for allocate instance of a message. More...
 
invocation_type_t so_5::detect_invocation_type_for_message_kind (message_t::kind_t kind)
 Detect invocation type by analyzing message_kind value. More...
 
invocation_type_t so_5::detect_invocation_type_for_message (const message_t &msg)
 Detect invocation_type for a message. More...
 
invocation_type_t so_5::detect_invocation_type_for_message (const message_ref_t &msg)
 Detect invocation_type for a message. More...
 
template<class Msg >
void so_5::rt::ensure_not_signal ()
 
template<class Msg >
void so_5::rt::ensure_message_with_actual_data (const Msg *m)
 
template<class Msg >
void so_5::rt::ensure_signal ()
 
template<typename Msg >
void so_5::rt::ensure_classical_message ()
 

Detailed Description

A base class for the agent messages definition.