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

Active objects dispatcher. More...

Namespaces

 impl
 Active objects dispatcher implemetation details.
 

Classes

class  disp_params_t
 Alias for namespace with traits of event queue. More...
 
class  dispatcher_handle_t
 A handle for active_obj dispatcher. More...
 

Functions

SO_5_NODISCARD SO_5_FUNC dispatcher_handle_t make_dispatcher ( environment_t &env, const std::string_view data_sources_name_base, disp_params_t params)
 Create an instance of active_obj dispatcher. More...
 
dispatcher_handle_t make_dispatcher (environment_t &env, const std::string_view data_sources_name_base)
 Create an instance of active_obj dispatcher. More...
 
dispatcher_handle_t make_dispatcher (environment_t &env)
 Create a private active_obj dispatcher. More...
 

Detailed Description

Active objects dispatcher.

Function Documentation

◆ make_dispatcher() [1/3]

dispatcher_handle_t so_5::disp::active_obj::make_dispatcher ( environment_t env,
const std::string_view  data_sources_name_base 
)
inline

Create an instance of active_obj dispatcher.

Usage sample
env,
"db_handler" );
auto coop = env.make_coop(
// The main dispatcher for that coop will be
// this instance of active_obj dispatcher.
disp.binder() );
Since
v.5.6.0
Parameters
envSObjectizer Environment to work in.
data_sources_name_baseValue for creating names of data sources for run-time monitoring.

◆ make_dispatcher() [2/3]

dispatcher_handle_t so_5::disp::active_obj::make_dispatcher ( environment_t env)
inline

Create a private active_obj dispatcher.

Usage sample
auto coop = env.make_coop(
// The main dispatcher for that coop will be
// this instance of active_obj dispatcher.
disp.binder() );
Since
v.5.6.0
Parameters
envSObjectizer Environment to work in.

◆ make_dispatcher() [3/3]

SO_5_FUNC dispatcher_handle_t so_5::disp::active_obj::make_dispatcher ( environment_t env,
const std::string_view  data_sources_name_base,
disp_params_t  params 
)

Create an instance of active_obj dispatcher.

Usage sample
env,
"db_handler",
// Additional params with specific options for queue's traits.
[]( so_5::disp::active_obj::queue_traits::queue_params_t & p ) {
} ) );
auto coop = env.make_coop(
// The main dispatcher for that coop will be
// this instance of active_obj dispatcher.
disp->binder() );
Since
v.5.6.0
Parameters
envSObjectizer Environment to work in.
data_sources_name_baseValue for creating names of data sources for run-time monitoring.
paramsParameters for dispatcher.
Examples:
so_5/chameneos_prealloc_msgs/main.cpp, so_5/chameneos_simple/main.cpp, so_5/disp/main.cpp, so_5/dispatcher_for_children/main.cpp, so_5/dispatcher_hello/main.cpp, so_5/dispatcher_restarts/main.cpp, so_5/hardwork_imit/main.cpp, so_5/many_timers/main.cpp, so_5/ping_pong/main.cpp, so_5/ping_pong_with_owner/main.cpp, so_5/queue_size_stats/main.cpp, and so_5/wrapped_env_demo_2/main.cpp.