SObjectizer  5.5
Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
so_5::execution_hint_t Class Reference

A hint for a dispatcher for execution of event for the concrete execution_demand. More...

#include <execution_demand.hpp>

Public Types

using direct_func_t = std::function< void(execution_demand_t &, current_thread_id_t) >
 Type of function for calling event handler directly. More...
 

Public Member Functions

 execution_hint_t (execution_demand_t &demand, direct_func_t direct_func, thread_safety_t thread_safety)
 Initializing constructor. More...
 
void exec (current_thread_id_t working_thread_id) const
 Call event handler directly. More...
 
bool is_thread_safe () const
 Is thread safe handler? More...
 

Static Public Member Functions

static execution_hint_t create_empty_execution_hint (execution_demand_t &demand)
 

Private Member Functions

 execution_hint_t (execution_demand_t &demand)
 

Private Attributes

execution_demand_tm_demand
 A reference to demand for which that hint has been created. More...
 
direct_func_t m_direct_func
 Function for call event handler directly. More...
 
thread_safety_t m_thread_safety
 Thread safety for event handler. More...
 

Detailed Description

A hint for a dispatcher for execution of event for the concrete execution_demand.

Since
v.5.4.0

Member Typedef Documentation

◆ direct_func_t

Type of function for calling event handler directly.

Constructor & Destructor Documentation

◆ execution_hint_t() [1/2]

so_5::execution_hint_t::execution_hint_t ( execution_demand_t demand,
direct_func_t  direct_func,
thread_safety_t  thread_safety 
)
inline

Initializing constructor.

◆ execution_hint_t() [2/2]

so_5::execution_hint_t::execution_hint_t ( execution_demand_t demand)
inlineprivate

A special constructor for the case when there is no handler for message.

Member Function Documentation

◆ create_empty_execution_hint()

static execution_hint_t so_5::execution_hint_t::create_empty_execution_hint ( execution_demand_t demand)
inlinestatic

Create execution_hint object for the case when event handler not found.

This hint is necessary only for decrementing the counter of messages if message limit is used for the message to be processed.

◆ exec()

void so_5::execution_hint_t::exec ( current_thread_id_t  working_thread_id) const
inline

Call event handler directly.

◆ is_thread_safe()

bool so_5::execution_hint_t::is_thread_safe ( ) const
inline

Is thread safe handler?

Member Data Documentation

◆ m_demand

execution_demand_t& so_5::execution_hint_t::m_demand
private

A reference to demand for which that hint has been created.

◆ m_direct_func

direct_func_t so_5::execution_hint_t::m_direct_func
private

Function for call event handler directly.

◆ m_thread_safety

thread_safety_t so_5::execution_hint_t::m_thread_safety
private

Thread safety for event handler.


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