当前位置: 首页>>代码示例>>C++>>正文


C++ SignalArgs::create_reply方法代码示例

本文整理汇总了C++中SignalArgs::create_reply方法的典型用法代码示例。如果您正苦于以下问题:C++ SignalArgs::create_reply方法的具体用法?C++ SignalArgs::create_reply怎么用?C++ SignalArgs::create_reply使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SignalArgs的用法示例。


在下文中一共展示了SignalArgs::create_reply方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: convergence_history

void CPlotXY::convergence_history( SignalArgs & args )
{
  if( is_not_null(m_data.get()) )
  {
    SignalFrame reply = args.create_reply( uri() );
    SignalFrame& options = reply.map( Protocol::Tags::key_options() );
//    std::vector<Real> data(8000);
    CTable<Real>& table = *m_data.get();
    std::vector<std::string> labels =
        list_of<std::string>("x")("y")("z")("u")("v")("w")("p")("t");

    add_multi_array_in(options.main_map, "Table", m_data->array(), ";", labels);

//    for(Uint row = 0 ; row < 1000 ; ++row)
//    {
//      for(Uint col = 0 ; col < 8 ; ++col)
//        data[ (row * 8) + col ] = table[row][col];
//    }

//    XmlNode node = options.add("Table", data, " ; ");

//    node.set_attribute("dimensions", "8");
  }
  else
    throw SetupError( FromHere(), "Data to plot not setup" );
}
开发者ID:Ivor23,项目名称:coolfluid3,代码行数:26,代码来源:CPlotXY.cpp

示例2: signal_create_function_bc

void BoundaryConditions::signal_create_function_bc ( SignalArgs& node )
{
  SignalOptions options( node );

  SignalFrame reply = node.create_reply(uri());
  SignalOptions reply_options(reply);
  reply_options.add_option("created_component", add_function_bc(options.value<std::string>("region_name"), options.value<std::string>("variable_name"))->uri());
}
开发者ID:vivianbolsee,项目名称:coolfluid3,代码行数:8,代码来源:BoundaryConditions.cpp

示例3: signal_create_lss

void LSSAction::signal_create_lss(SignalArgs& node)
{
  SignalOptions options(node);
  LSS::System& lss = create_lss(options.option("matrix_builder").value<std::string>());

  SignalFrame reply = node.create_reply(uri());
  SignalOptions reply_options(reply);
  reply_options.add("created_component", lss.uri());
}
开发者ID:SimonMarie,项目名称:coolfluid3,代码行数:9,代码来源:LSSAction.cpp

示例4: change_link

void CLink::change_link( SignalArgs & args )
{
  SignalOptions options( args );
  SignalFrame reply = args.create_reply();

  std::string path = options.value<std::string>("target_path");
  Component::Ptr target = m_root.lock()->access_component_ptr(path);

  link_to (target);

  reply.map("options").set_option("target_path", path);
}
开发者ID:andrealani,项目名称:coolfluid3,代码行数:12,代码来源:CLink.cpp

示例5: change_link

void Link::change_link( SignalArgs & args )
{
  SignalOptions options( args );
  SignalFrame reply = args.create_reply();

  std::string path = options.value<std::string>("target_path");
  Handle<Component> target = access_component(path);

  link_to (*target);

  reply.map("options").set_option("target_path", class_name<std::string>(), path);
}
开发者ID:BijanZarif,项目名称:coolfluid3,代码行数:12,代码来源:Link.cpp

示例6: signal_create_initial_condition

void InitialConditions::signal_create_initial_condition(SignalArgs& args)
{
  SignalOptions options(args);
  Handle<common::Action> ic;
  if(options.check("builder_name"))
  {
    ic = create_initial_condition(options["field_tag"].value<std::string>(), options["builder_name"].value<std::string>());
  }
  else
  {
    ic = create_initial_condition(options["field_tag"].value<std::string>());
  }

  SignalFrame reply = args.create_reply(uri());
  SignalOptions reply_options(reply);
  reply_options.add("created_component", ic->uri());
}
开发者ID:BijanZarif,项目名称:coolfluid3,代码行数:17,代码来源:InitialConditions.cpp

示例7: signal_create_initial_condition

void InitialConditions::signal_create_initial_condition ( SignalArgs& args )
{
  SignalOptions options( args );

  std::string name = options.value<std::string>("name");

  std::vector<URI> regions;
  if( options.check("regions") )
  {
    regions = options.array<URI>("regions");
  }
  else // if user did not specify, then use the whole topology (all regions)
  {
    regions = solver().options().option("regions").value< std::vector<common::URI> >();
  }

  solver::Action& created_component = create_initial_condition(name,regions);

  SignalFrame reply = args.create_reply(uri());
  SignalOptions reply_options(reply);
  reply_options.add_option("created_component", created_component.uri());
}
开发者ID:tbanyai,项目名称:coolfluid3,代码行数:22,代码来源:InitialConditions.cpp

示例8: list_journal

void CJournal::list_journal ( SignalArgs & args )
{
  SignalFrame reply = args.create_reply( uri() );

  copy_node(m_signals_map.content, reply.main_map.content);
}
开发者ID:Ivor23,项目名称:coolfluid3,代码行数:6,代码来源:CJournal.cpp


注:本文中的SignalArgs::create_reply方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。