本文整理汇总了C++中Visitor::apply方法的典型用法代码示例。如果您正苦于以下问题:C++ Visitor::apply方法的具体用法?C++ Visitor::apply怎么用?C++ Visitor::apply使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Visitor
的用法示例。
在下文中一共展示了Visitor::apply方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: visit
static void visit( Key, const config& config, Visitor& v )
{
v.apply( "filename", config.filename );
v.apply( "size", config.size );
v.apply( "alpha", config.alpha );
v.apply( "beta", config.beta );
}
示例2: visit
static void visit( const Key&, const output::info& p, Visitor& v )
{
v.apply( "voltage", p.voltage );
v.apply( "current", p.current );
v.apply( "max_discharge_current", p.max_discharge_current );
v.apply( "max_regenerative_current", p.max_regenerative_current );
}
示例3: visit
static void visit( Key, config& config, Visitor& v )
{
v.apply( "name", config.name );
v.apply( "size", config.size );
v.apply( "nest", config.nest );
v.apply( "alpha", config.alpha );
v.apply( "beta", config.beta );
}
示例4: for_each_boundary_point
void for_each_boundary_point(Visitor & visitor) const
{
init();
if (m_has_boundary)
{
if (visitor.apply(range::front(m_ls)))
visitor.apply(range::back(m_ls));
}
}
示例5: visit
template < typename Key, class Visitor > static void visit( const Key&, comma::csv::ascii_test::simple_struct& p, Visitor& v )
{
v.apply( "a", p.a );
v.apply( "b", p.b );
v.apply( "c", p.c );
v.apply( "s", p.s );
v.apply( "t", p.t );
v.apply( "nested", p.nested );
}
示例6: visit
template < typename Key, class Visitor > static void visit( const Key&, const snark::graphics::view::ply_vertex& p, Visitor& v )
{
v.apply( "point", p.point );
v.apply( "normal", p.normal );
v.apply( "r", p.color.red() );
v.apply( "g", p.color.green() );
v.apply( "b", p.color.blue() );
v.apply( "a", p.color.alpha() );
}
示例7: visit
template < typename Key, class Visitor > static void visit( const Key&, const position& p, Visitor& v )
{
v.apply( "coordinates", p.coordinates );
v.apply( "z", p.z );
}