本文整理汇总了C++中so_5::environment_t::stop方法的典型用法代码示例。如果您正苦于以下问题:C++ environment_t::stop方法的具体用法?C++ environment_t::stop怎么用?C++ environment_t::stop使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类so_5::environment_t
的用法示例。
在下文中一共展示了environment_t::stop方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
void
init( so_5::environment_t & env )
{
reg_coop( env );
env.stop();
}
示例2: init
// The SObjectizer Environment initialization.
void init( so_5::environment_t & env )
{
// Creating and registering a cooperation.
env.register_agent_as_coop( "coop", env.make_agent< a_hello_t >() );
// Stopping SObjectizer.
env.stop();
}
示例3:
virtual void
on_deregistered(
so_5::environment_t & env,
const std::string & coop_name,
const so_5::coop_dereg_reason_t &) override
{
{
std::lock_guard< std::mutex > lock{ m_lock };
m_names.erase( coop_name );
}
if( "a_0_0" == coop_name )
env.stop();
}
示例4: runtime_error
void
init( so_5::environment_t & env )
{
const std::string coop_name( "main_coop" );
env.register_agent_as_coop( coop_name, new test_agent_t( env ) );
bool exception_thrown = false;
try
{
// Create a duplicate.
env.register_agent_as_coop( coop_name, new test_agent_t( env ) );
}
catch( const so_5::exception_t & )
{
exception_thrown = true;
}
if( !exception_thrown )
throw std::runtime_error( "duplicating coop should not be registered" );
env.stop();
}
示例5:
//.........这里部分代码省略.........
CHECK_LAYER( env, 31 )
CHECK_LAYER( env, 32 )
CHECK_LAYER( env, 33 )
CHECK_LAYER( env, 34 )
CHECK_LAYER( env, 35 )
CHECK_LAYER( env, 36 )
CHECK_LAYER( env, 37 )
CHECK_LAYER( env, 38 )
CHECK_LAYER( env, 39 )
CHECK_LAYER( env, 40 )
CHECK_LAYER( env, 41 )
CHECK_LAYER( env, 42 )
CHECK_LAYER( env, 43 )
CHECK_LAYER( env, 44 )
CHECK_LAYER( env, 45 )
CHECK_LAYER( env, 46 )
CHECK_LAYER( env, 47 )
CHECK_LAYER( env, 48 )
CHECK_LAYER( env, 49 )
CHECK_LAYER( env, 50 )
CHECK_LAYER( env, 51 )
CHECK_LAYER( env, 52 )
CHECK_LAYER( env, 53 )
CHECK_LAYER( env, 54 )
CHECK_LAYER( env, 55 )
CHECK_LAYER( env, 56 )
CHECK_LAYER( env, 57 )
CHECK_LAYER( env, 58 )
CHECK_LAYER( env, 59 )
CHECK_LAYER( env, 60 )
CHECK_LAYER( env, 61 )
CHECK_LAYER( env, 62 )
CHECK_LAYER( env, 63 )
CHECK_LAYER_EXISTS( env, 1 );
CHECK_LAYER_EXISTS( env, 2 );
CHECK_LAYER_EXISTS( env, 3 );
CHECK_LAYER_EXISTS( env, 4 );
CHECK_LAYER_EXISTS( env, 5 );
CHECK_LAYER_EXISTS( env, 6 );
CHECK_LAYER_EXISTS( env, 7 );
CHECK_LAYER_EXISTS( env, 8 );
CHECK_LAYER_EXISTS( env, 9 );
CHECK_LAYER_EXISTS( env, 10 );
CHECK_LAYER_EXISTS( env, 11 );
CHECK_LAYER_EXISTS( env, 12 );
CHECK_LAYER_EXISTS( env, 13 );
CHECK_LAYER_EXISTS( env, 14 );
CHECK_LAYER_EXISTS( env, 15 );
CHECK_LAYER_EXISTS( env, 16 );
CHECK_LAYER_EXISTS( env, 17 );
CHECK_LAYER_EXISTS( env, 18 );
CHECK_LAYER_EXISTS( env, 19 );
CHECK_LAYER_EXISTS( env, 20 );
CHECK_LAYER_EXISTS( env, 21 );
CHECK_LAYER_EXISTS( env, 22 );
CHECK_LAYER_EXISTS( env, 23 );
CHECK_LAYER_EXISTS( env, 24 );
CHECK_LAYER_EXISTS( env, 25 );
CHECK_LAYER_EXISTS( env, 26 );
CHECK_LAYER_EXISTS( env, 27 );
CHECK_LAYER_EXISTS( env, 28 );
CHECK_LAYER_EXISTS( env, 29 );
CHECK_LAYER_EXISTS( env, 30 );
CHECK_LAYER_EXISTS( env, 31 );
CHECK_LAYER_EXISTS( env, 32 );
CHECK_LAYER_EXISTS( env, 33 );
CHECK_LAYER_EXISTS( env, 34 );
CHECK_LAYER_EXISTS( env, 35 );
CHECK_LAYER_EXISTS( env, 36 );
CHECK_LAYER_EXISTS( env, 37 );
CHECK_LAYER_EXISTS( env, 38 );
CHECK_LAYER_EXISTS( env, 39 );
CHECK_LAYER_EXISTS( env, 40 );
CHECK_LAYER_EXISTS( env, 41 );
CHECK_LAYER_EXISTS( env, 42 );
CHECK_LAYER_EXISTS( env, 43 );
CHECK_LAYER_EXISTS( env, 44 );
CHECK_LAYER_EXISTS( env, 45 );
CHECK_LAYER_EXISTS( env, 46 );
CHECK_LAYER_EXISTS( env, 47 );
CHECK_LAYER_EXISTS( env, 48 );
CHECK_LAYER_EXISTS( env, 49 );
CHECK_LAYER_EXISTS( env, 50 );
CHECK_LAYER_EXISTS( env, 51 );
CHECK_LAYER_EXISTS( env, 52 );
CHECK_LAYER_EXISTS( env, 53 );
CHECK_LAYER_EXISTS( env, 54 );
CHECK_LAYER_EXISTS( env, 55 );
CHECK_LAYER_EXISTS( env, 56 );
CHECK_LAYER_EXISTS( env, 57 );
CHECK_LAYER_EXISTS( env, 58 );
CHECK_LAYER_EXISTS( env, 59 );
CHECK_LAYER_EXISTS( env, 60 );
CHECK_LAYER_EXISTS( env, 61 );
CHECK_LAYER_EXISTS( env, 62 );
CHECK_LAYER_EXISTS( env, 63 );
env.stop();
}