SObjectizer  5.5
Namespaces | Classes | Functions
so_5::disp::reuse Namespace Reference

Reusable components for dispatchers. More...

Namespaces

 locks
 Implementation of various types of locks to be used inside dispatchers.
 
 thread_pool_stats
 Helper tools for implementation of run-time monitoring for thread-pool-like dispatchers.
 
 work_thread
 Implemetation details of dispatcher's working thread.
 

Classes

class  binder_for_private_disp_template_t
 A template of binder for a private dispatcher. More...
 
class  binder_for_public_disp_template_t
 A template of binder for a named dispatcher. More...
 
class  mpmc_ptr_queue_t
 Multi-producer/Multi-consumer queue of pointers. More...
 
class  proxy_dispatcher_template_t
 A helper template for simplification of implementation of proxy dispatchers. More...
 
class  work_thread_activity_tracking_flag_mixin_t
 Mixin with thread activity tracking flag. More...
 

Functions

so_5::stats::prefix_t make_disp_prefix (const char *disp_type, const std::string data_sources_name_base, const void *disp_this_pointer)
 Create basic prefix for dispatcher data source names. More...
 
so_5::stats::prefix_t make_disp_working_thread_prefix (const so_5::stats::prefix_t &disp_prefix, std::size_t thread_number)
 Create prefix for dispatcher's working thread data source. More...
 
template<class Dispatcher , class Action >
auto do_with_dispatcher_of_type (dispatcher_t *disp_pointer, const std::string &disp_name, Action action) -> decltype(action(*static_cast< Dispatcher *>(nullptr)))
 A helper method for casing dispatcher to the specified type and performing some action with it. More...
 
template<class Dispatcher , class Action >
auto do_with_dispatcher (environment_t &env, const std::string &disp_name, Action action) -> decltype(action(*static_cast< Dispatcher *>(nullptr)))
 A helper method for extracting dispatcher by name, checking its type and to some action. More...
 

Detailed Description

Reusable components for dispatchers.

This namespace contains classes and functions which can be reused by various types of dispatchers.

Function Documentation

◆ do_with_dispatcher()

template<class Dispatcher , class Action >
auto so_5::disp::reuse::do_with_dispatcher ( environment_t env,
const std::string &  disp_name,
Action  action 
) -> decltype(action(*static_cast<Dispatcher *>(nullptr)))

A helper method for extracting dispatcher by name, checking its type and to some action.

Since
v.5.4.0

◆ do_with_dispatcher_of_type()

template<class Dispatcher , class Action >
auto so_5::disp::reuse::do_with_dispatcher_of_type ( dispatcher_t disp_pointer,
const std::string &  disp_name,
Action  action 
) -> decltype(action(*static_cast<Dispatcher *>(nullptr)))

A helper method for casing dispatcher to the specified type and performing some action with it.

Since
v.5.5.4

◆ make_disp_prefix()

so_5::stats::prefix_t so_5::disp::reuse::make_disp_prefix ( const char *  disp_type,
const std::string  data_sources_name_base,
const void *  disp_this_pointer 
)
inline

Create basic prefix for dispatcher data source names.

Since
v.5.5.4
Parameters
disp_typeTextual marker of dispatcher type (like ot, ao, ag, tp, atp, ...).
data_sources_name_baseUser-supplied optional base for name. Can be empty.
disp_this_pointerPointer to dispatcher instance. Will be used if data_sources_name_base is empty.

◆ make_disp_working_thread_prefix()

so_5::stats::prefix_t so_5::disp::reuse::make_disp_working_thread_prefix ( const so_5::stats::prefix_t disp_prefix,
std::size_t  thread_number 
)
inline

Create prefix for dispatcher's working thread data source.

Since
v.5.5.4
Parameters
disp_prefixPrefix for the dispatcher.
thread_numberThread ordinal number.