SObjectizer  5.8
Loading...
Searching...
No Matches
so_5::impl::so_quick_environment_t< Init > Class Template Reference

Auxiliary class for the SObjectizer launching. More...

#include <api.hpp>

Inheritance diagram for so_5::impl::so_quick_environment_t< Init >:
so_5::environment_t

Public Member Functions

 so_quick_environment_t (Init init, so_5::environment_params_t &&env_params)
 
void init () override
 Initialization hook.
 
- Public Member Functions inherited from so_5::environment_t
 environment_t (environment_params_t &&so_environment_params)
 
virtual ~environment_t ()
 
 environment_t (const environment_t &)=delete
 
environment_toperator= (const environment_t &)=delete
 
void call_exception_logger (const std::exception &event_exception, const coop_handle_t &coop) noexcept
 Call event exception logger for logging an exception.
 
exception_reaction_t exception_reaction () const noexcept
 An exception reaction for the whole SO Environment.
 
error_logger_terror_logger () const
 Get the error_logger object.
 
template<class Agent , typename... Args>
std::unique_ptr< Agent > make_agent (Args &&... args)
 Helper method for simplification of agents creation.
 
stats::controller_tstats_controller ()
 Access to controller of run-time monitoring.
 
stats::repository_tstats_repository ()
 Access to repository of data sources for run-time monitoring.
 
so_5::disp::abstract_work_thread_factory_shptr_t work_thread_factory () const noexcept
 Access to the global work thread factory.
 
template<typename... Args>
decltype(auto) introduce_coop (Args &&... args)
 Helper method for simplification of cooperation creation and registration.
 
work_thread_activity_tracking_t work_thread_activity_tracking () const
 Get activity tracking flag for the whole SObjectizer Environment.
 
disp_binder_shptr_t so_make_default_disp_binder ()
 Get binding to the default dispatcher.
 
bool autoshutdown_disabled () const
 Get autoshutdown_disabled flag.
 
so_5::timer_id_t so_schedule_timer (const low_level_api::schedule_timer_params_t params)
 Schedule timer event.
 
void so_single_timer (const low_level_api::single_timer_params_t params)
 Schedule a single shot timer event.
 
template<typename Lambda >
mbox_t make_custom_mbox (Lambda &&lambda)
 Create a custom mbox.
 
mbox_t create_mbox ()
 Create an anonymous MPMC mbox.
 
mbox_t create_mbox (nonempty_name_t mbox_name)
 Create named MPMC mbox.
 
mbox_t introduce_named_mbox (mbox_namespace_name_t mbox_namespace, nonempty_name_t mbox_name, const std::function< mbox_t() > &mbox_factory)
 Introduce named mbox with user-provided factory.
 
mchain_t create_mchain (const mchain_params_t &params)
 Create message chain.
 
void install_exception_logger (event_exception_logger_unique_ptr_t logger)
 Set up an exception logger.
 
coop_unique_holder_t make_coop ()
 Create a cooperation.
 
coop_unique_holder_t make_coop (disp_binder_shptr_t disp_binder)
 Create a cooperation with specified dispatcher binder.
 
coop_unique_holder_t make_coop (coop_handle_t parent)
 Create a new cooperation that will be a child for specified parent coop.
 
coop_unique_holder_t make_coop (coop_handle_t parent, disp_binder_shptr_t disp_binder)
 Create a new cooperation that will be a child for specified parent coop.
 
coop_handle_t register_coop (coop_unique_holder_t agent_coop)
 Register a cooperation.
 
template<class A >
coop_handle_t register_agent_as_coop (std::unique_ptr< A > agent)
 Register single agent as a cooperation.
 
template<class A >
coop_handle_t register_agent_as_coop (std::unique_ptr< A > agent, disp_binder_shptr_t disp_binder)
 Register single agent as a cooperation with specified dispatcher binder.
 
void deregister_coop (coop_handle_t coop, int reason) noexcept
 Deregister the cooperation.
 
template<class SO_Layer >
SO_Layer * query_layer_noexcept () const
 
template<class SO_Layer >
SO_Layer * query_layer () const
 Get access to the layer with exception if layer is not found.
 
template<class SO_Layer >
void add_extra_layer (std::unique_ptr< SO_Layer > layer_ptr)
 Add an additional layer.
 
void run ()
 Run the SObjectizer Run-Time.
 
void stop () noexcept
 Send a shutdown signal to the Run-Time.
 
stop_guard_t::setup_result_t setup_stop_guard (stop_guard_shptr_t guard, stop_guard_t::what_if_stop_in_progress_t reaction_on_stop_in_progress=stop_guard_t::what_if_stop_in_progress_t::throw_exception)
 Set up a new stop_guard.
 
void remove_stop_guard (stop_guard_shptr_t guard)
 Remove stop_guard and complete the stop operation if necessary.
 
void change_message_delivery_tracer_filter (so_5::msg_tracing::filter_shptr_t filter)
 Change the current msg_tracing's filter to a new one.
 

Private Types

using base_type_t = so_5::environment_t
 

Private Attributes

Init m_init
 Initialization routine.
 

Detailed Description

template<class Init>
class so_5::impl::so_quick_environment_t< Init >

Auxiliary class for the SObjectizer launching.

It is used as wrapper on various types of initialization routines.

Definition at line 30 of file api.hpp.

Member Typedef Documentation

◆ base_type_t

template<class Init >
using so_5::impl::so_quick_environment_t< Init >::base_type_t = so_5::environment_t
private

Definition at line 32 of file api.hpp.

Constructor & Destructor Documentation

◆ so_quick_environment_t()

template<class Init >
so_5::impl::so_quick_environment_t< Init >::so_quick_environment_t ( Init init,
so_5::environment_params_t && env_params )
inline
Parameters
initInitialization routine.
env_paramsSObjectizer Environment parameters.

Definition at line 35 of file api.hpp.

Member Function Documentation

◆ init()

template<class Init >
void so_5::impl::so_quick_environment_t< Init >::init ( )
inlineoverridevirtual

Initialization hook.

Attention
A hang inside of this method will prevent the Run-Time from stopping. For example if a dialog with an application user is performed inside init() then SObjectizer cannot finish its work until this dialog is finished.

Implements so_5::environment_t.

Definition at line 46 of file api.hpp.

Member Data Documentation

◆ m_init

template<class Init >
Init so_5::impl::so_quick_environment_t< Init >::m_init
private

Initialization routine.

Definition at line 53 of file api.hpp.


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