コード例 #1
0
 // ----------------------------------------------------------------------
 void
 DefaultNodeGenerator::
 init_processor_factories( shawn::SimulationController& sc,
                           ProcessorFactoryList& pfl )
    throw( std::runtime_error )
 {
    shawn::StrTok tok( sc.environment().optional_string_param( "processors", "" ), ", " );
    for ( shawn::StrTok::iterator it = tok.begin(), end = tok.end();
          it != end;
          ++it )
    {
       shawn::ProcessorFactoryHandle pfh = sc.processor_keeper_w().find_w( *it );
       assert( pfh != NULL ); // not found throws...
       pfl.push_back( pfh );
    }
 }
コード例 #2
0
ファイル: sumo_init.cpp プロジェクト: MarcStelzner/shawn
extern "C" void
init_sumo( shawn::SimulationController& sc )
{
    std::cout << "Initialising app SUMO" << std::endl;
    sc.processor_keeper_w().add(new sumo::LogMovementProcessorFactory());
}