Some reusable and low-level classes/functions which can be used in public header files.
More...
|
| class | actual_lock_holder_t |
| | A class to be used as mixin with actual std::mutex instance inside. More...
|
| |
| struct | always_false |
| | A simple metafunction that always "returns" false. More...
|
| |
| struct | handlers_bunch_basics_t |
| | Basic part of handlers_bunch implementation. More...
|
| |
| class | handlers_bunch_t |
| | Template class for storing bunch of message handlers. More...
|
| |
| class | handlers_bunch_t< 0 > |
| | A specialization of handlers_bunch_t for the case when there is no any handlers. More...
|
| |
| class | introduce_coop_helper_t |
| | Helper class for building and registering new cooperation. More...
|
| |
| struct | is_agent_method_pointer |
| | Check whether T is a non-static member function pointer. More...
|
| |
| struct | is_agent_method_pointer< method_arity::nullary, Result(Agent::*)() > |
| |
| struct | is_agent_method_pointer< method_arity::nullary, Result(Agent::*)() const > |
| |
| struct | is_agent_method_pointer< method_arity::nullary, Result(Agent::*)() const noexcept > |
| |
| struct | is_agent_method_pointer< method_arity::nullary, Result(Agent::*)() noexcept > |
| |
| struct | is_agent_method_pointer< method_arity::unary, Result(Agent::*)(Handler_Argument) const > |
| |
| struct | is_agent_method_pointer< method_arity::unary, Result(Agent::*)(Handler_Argument) const noexcept > |
| |
| struct | is_agent_method_pointer< method_arity::unary, Result(Agent::*)(Handler_Argument) noexcept > |
| |
| struct | is_agent_method_pointer< method_arity::unary, Result(Agent::*)(Handler_Argument)> |
| |
| struct | lock_holder_detector |
| | A selector of actual lock_holder type in dependency of lock type. More...
|
| |
| struct | lock_holder_detector< null_mutex_t > |
| |
| struct | make_message_instance_impl |
| |
| struct | make_message_instance_impl< true, Msg > |
| |
| struct | message_handler_format_detector |
| | A helper template to detect type of message from the format of an event handler. More...
|
| |
| struct | message_handler_format_detector< const MESSAGE & > |
| |
| struct | message_handler_format_detector< const mhood_t< MESSAGE > & > |
| |
| struct | message_handler_format_detector< mhood_t< MESSAGE > > |
| |
| struct | message_mutability_traits |
| | Detector of message type traits in dependency of message immutability or mutability. More...
|
| |
| struct | message_mutability_traits< immutable_msg< T > > |
| |
| struct | message_mutability_traits< mutable_msg< T > > |
| |
| class | mhood_base_t |
| | A type to be used as a base for mhood_t implementation. More...
|
| |
| class | mhood_base_t< M, mhood_type_t::classical_message, message_mutability_t::immutable_message > |
| | A special base for the case when message type is derived from message_t. More...
|
| |
| class | mhood_base_t< M, mhood_type_t::classical_message, message_mutability_t::mutable_message > |
| | A special base for the case when message type is derived from message_t. More...
|
| |
| class | mhood_base_t< M, mhood_type_t::classical_signal, message_mutability_t::immutable_message > |
| | A special base for the case when message type is derived from message_t. More...
|
| |
| class | mhood_base_t< M, mhood_type_t::classical_signal, message_mutability_t::mutable_message > |
| | A special base for the case when message type is derived from message_t. More...
|
| |
| class | mhood_base_t< M, mhood_type_t::user_type_message, message_mutability_t::immutable_message > |
| | A special base for the case when message type is not related to message_t. More...
|
| |
| class | mhood_base_t< M, mhood_type_t::user_type_message, message_mutability_t::mutable_message > |
| | A special base for the case when message type is not related to message_t. More...
|
| |
| struct | mhood_mutability_detector |
| | A special detector of message immutability/mutability. More...
|
| |
| struct | mhood_type_detector |
| | A special selector of message hood type. More...
|
| |
| struct | msg_type_and_handler_pair_t |
| | Description of an event handler. More...
|
| |
| class | no_lock_holder_t |
| | A class to be used as mixin without any real mutex instance inside. More...
|
| |
| class | remaining_time_counter_t |
| | Helper class for calculating remaining time. More...
|
| |
| struct | should_terminate_if_throws_t |
| | Metafunction that tells is exceptions enabled or not. More...
|
| |
| struct | should_terminate_if_throws_t< exceptions_enabled_t > |
| |
| struct | should_terminate_if_throws_t< terminate_if_throws_t > |
| |
|
| template<typename L > |
| void | abort_on_fatal_error (L logging_lambda) noexcept |
| |
| template<typename L > |
| scope_exit_details::at_exit_t< L > | at_scope_exit (L &&l) |
| | Helper function for creation action to be performed at scope exit. More...
|
| |
| template<typename L > |
| auto | invoke_noexcept_code (L lambda) noexcept -> decltype(lambda()) |
| |
| template<typename Main_Action , typename Rollback_Action > |
| auto | do_with_rollback_on_exception (Main_Action main_action, Rollback_Action rollback_action) -> decltype(main_action()) |
| | Helper function for do some action with rollback in the case of an exception. More...
|
| |
| template<typename Predicate > |
| bool | wait_for_big_interval (std::unique_lock< std::mutex > &lock, std::condition_variable &cv, std::chrono::steady_clock::duration timeout, Predicate pred) |
| | Helper function for safe call of condition_variable::wait_for with possible big timeouts. More...
|
| |
| template<typename Lambda > |
| void | suppress_exceptions (Lambda &&lambda) noexcept |
| | Helper function for execution a block of code with suppression of any exceptions raised inside that block. More...
|
| |
| template<typename Bunch > |
| void | fill_handlers_bunch (Bunch &bunch, std::size_t) |
| |
| template<typename Bunch , typename... Others> |
| void | fill_handlers_bunch (Bunch &bunch, std::size_t index, msg_type_and_handler_pair_t &&handler, Others &&... other_handlers) |
| |
| template<typename Bunch , typename Lambda , typename... Others> |
| void | fill_handlers_bunch (Bunch &bunch, std::size_t index, Lambda &&lambda, Others &&... other_handlers) |
| |
| template<typename Msg > |
| std::enable_if< message_mutability_t::mutable_message==::so_5::details::message_mutability_traits< Msg >::mutability >::type | 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 | mark_as_mutable_if_necessary (message_ref_t &msg) |
| |
| template<typename Msg > |
| std::enable_if< message_mutability_t::mutable_message !=::so_5::details::message_mutability_traits< Msg >::mutability >::type | mark_as_mutable_if_necessary (message_t &) |
| |
| template<typename Msg > |
| std::enable_if< message_mutability_t::mutable_message !=::so_5::details::message_mutability_traits< Msg >::mutability >::type | mark_as_mutable_if_necessary (message_ref_t &) |
| |
| template<typename Msg , typename... Args> |
| auto | make_message_instance (Args &&... args) -> std::unique_ptr< typename message_payload_type< Msg >::envelope_type > |
| | A helper for allocate instance of a message. More...
|
| |
Some reusable and low-level classes/functions which can be used in public header files.
Some low-level implemetation details which can be used in public header files.
- Since
- v.5.5.4
template<typename Predicate >
| bool so_5::details::wait_for_big_interval |
( |
std::unique_lock< std::mutex > & |
lock, |
|
|
std::condition_variable & |
cv, |
|
|
std::chrono::steady_clock::duration |
timeout, |
|
|
Predicate |
pred |
|
) |
| |
Helper function for safe call of condition_variable::wait_for with possible big timeouts.
In some places of SObjectizer's code big values of wait-time can be used for std::condition_variable::wait_for. For example, that values can be produced by so_5::infinite_wait_special_timevalue() function.
If such big value will be passed to std::condition_variable::wait_for the wait_for can return immediately without any waiting.
To avoid that behavior this helper function should be used instead of the direct call to condition_variable::wait_for.
- Since
- v.5.7.2