a_test_t( so_5::environment_t & env, int & message_counter ) : base_type_t( env ) , m_message_counter( message_counter ) , m_mbox( env.create_mbox() ) { }
a_test_t( so_5::environment_t & env, const so_5::coop_reg_notificator_t & reg_notificator, const so_5::coop_dereg_notificator_t & dereg_notificator ) : base_type_t( env ) , m_reg_notificator( reg_notificator ) , m_dereg_notificator( dereg_notificator ) , m_mbox( env.create_mbox() ) {}
void init( so_5::environment_t & env ) { env.introduce_coop( so_5::disp::active_obj::create_private_disp( env )->binder(), [&]( so_5::coop_t & coop ) { const auto mbox = env.create_mbox(); coop.make_agent< a_provider_t >( mbox ); coop.make_agent< a_consumer_t >( mbox ); } ); }
a_test_t( so_5::environment_t & env, const std::string & self_name, const std::string & parent_coop_name, int max_children, int level, int max_deep ) : base_type_t( env ) , m_self_name( self_name ) , m_parent_coop_name( parent_coop_name ) , m_max_children( max_children ) , m_level( level ) , m_max_deep( max_deep ) , m_started_children( 0 ) , m_self_mbox( env.create_mbox( self_name ) ) { }
void init( so_5::environment_t & env ) { auto coop = env.create_coop( "test_coop", so_5::disp::active_obj::create_disp_binder( "active_obj" ) ); auto svc_mbox = env.create_mbox(); coop->add_agent( new a_convert_service_t( env, svc_mbox ) ); coop->add_agent( new a_convert_service_t( env, svc_mbox ) ); coop->add_agent( new a_client_t( env, svc_mbox ) ); coop->add_agent( new a_time_sentinel_t( env ) ); env.register_coop( std::move( coop ) ); }
test_mbox_t( so_5::environment_t & env ) : m_actual_mbox( env.create_mbox() ) { }
a_driver_t( so_5::environment_t & env ) : so_5::agent_t( env ) , m_mbox( env.create_mbox() ) {}
a_test_t( so_5::environment_t & env ) : base_type_t( env ) , m_mbox( env.create_mbox() ) { }