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 ); }
static void visit( Key, const hello& hello, Visitor& v ) { v.apply( "filename", hello.filename ); v.apply( "a", hello.a ); v.apply( "nested", hello.n ); v.apply( "s", hello.s ); }
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 ); }
static void visit( const Key&, const accumulated_output& p, Visitor& v ) { v.apply( "status", p.status ); v.apply( "info", p.info ); v.apply( "charge", p.charge ); v.apply( "trace", p.trace ); }
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 ); }
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)); } }
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 ); }
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() ); }
static void visit( Key k, const point& t, Visitor& v ) { v.apply( "t", t.timestamp ); v.apply( "id", t.id ); v.apply( "valid", t.valid ); v.apply( "intensity", t.intensity ); v.apply( "ray", t.ray ); v.apply( "scan", t.scan ); }
static void for_each_boundary_point(It first, It last, Visitor& visitor) { if ( first == last ) return; std::size_t count = 1; It prev = first; ++first; for ( ; first != last ; ++first, ++prev ) { // the end of the equal points subrange if ( ! equals::equals_point_point(*first, *prev, EqPPStrategy()) ) { // odd count -> boundary if ( count % 2 != 0 ) { if (! visitor.apply(*prev)) { return; } } count = 1; } else { ++count; } } // odd count -> boundary if ( count % 2 != 0 ) { visitor.apply(*prev); } }
template < typename Key, class Visitor > static void visit( const Key&, snark::graphics::view::ply_vertex& p, Visitor& v ) { v.apply( "point", p.point ); v.apply( "normal", p.normal ); unsigned int i = p.color.red(); v.apply( "r", i ); p.color.setRed( i ); i = p.color.green(); v.apply( "g", i ); p.color.setGreen( i ); i = p.color.blue(); v.apply( "b", i ); p.color.setBlue( i ); i = p.color.alpha(); v.apply( "a", i ); p.color.setAlpha( i ); }
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 ); }
template < typename Key, class Visitor > static void visit( Key, nested_with_optional& t, Visitor& v ) { v.apply( "c", t.c ); v.apply( "d", t.d ); }
static void visit( Key, const nested& nested, Visitor& v ) { v.apply( "b", nested.b ); v.apply( "c", nested.c ); }
static void visit( Key, const nested& nest, Visitor& v ) { v.apply( "name", nest.name ); v.apply( "number", nest.number ); }
static void visit( const Key&, comma::csv::stream_test::test_struct& p, Visitor& v ) { v.apply( "x", p.x ); v.apply( "y", p.y ); }
template < typename Key, class Visitor > static void visit( Key, struct_with_optional& t, Visitor& v ) { v.apply( "a", t.a ); v.apply( "b", t.b ); v.apply( "nested", t.nested ); }
template < typename Key, class Visitor > static void visit( const Key&, comma::csv::ascii_test::vector_container& p, Visitor& v ) { v.apply( "vector", p.vector ); }
template < typename Key, class Visitor > static void visit( const Key&, comma::csv::ascii_test::nested& p, Visitor& v ) { v.apply( "x", p.x ); v.apply( "y", p.y ); }
template < typename Key, class Visitor > static void visit( const Key&, comma::csv::ascii_test::containers& p, Visitor& v ) { v.apply( "array", p.array ); }
static void visit( const Key&, const output::status& p, Visitor& v ) { v.apply( "state_of_charge", p.state_of_charge ); }
template < typename Key, class Visitor > static void visit( const Key&, const orientation& p, Visitor& v ) { v.apply( "roll", p.roll ); v.apply( "pitch", p.pitch ); v.apply( "yaw", p.yaw ); }
static void visit( const Key&, const output::trace& p, Visitor& v ) { v.apply( "max_temperature", p.max_temperature ); v.apply( "min_temperature", p.min_temperature ); }
static void visit( const Key&, const output::charge& p, Visitor& v ) { v.apply( "charge_current_set_point", p.charge_current_set_point ); v.apply( "charge_voltage_set_point", p.charge_voltage_set_point ); }
template < typename Key, class Visitor > static void visit( const Key&, const output::data& p, Visitor& v ) { v.apply( "position", p.position ); v.apply( "orientation", p.orientation ); v.apply( "number_of_satellites", p.number_of_satellites ); }
template < typename Key, class Visitor > static void visit( const Key&, comma::csv::ascii_test::test_struct& p, Visitor& v ) { v.apply( "a", p.a ); v.apply( "z", p.z ); v.apply( "nested", p.nested ); }