本文整理汇总了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" );
}
示例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());
}
示例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());
}
示例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);
}
示例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);
}
示例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());
}
示例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());
}
示例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);
}