Beispiel #1
0
 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 );
 }
Beispiel #2
0
 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 );
 }
Beispiel #3
0
 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 );
 }
Beispiel #4
0
 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 );
 }
Beispiel #6
0
 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));
     }
 }
Beispiel #7
0
 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 );
 }
Beispiel #8
0
 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() );
 }
Beispiel #9
0
 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 );
 }
Beispiel #10
0
    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);
        }
    }
Beispiel #11
0
 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 );
 }
Beispiel #12
0
 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 );
 }
Beispiel #13
0
 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 );
 }    
Beispiel #14
0
 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 );
 }
Beispiel #16
0
 static void visit( const Key&, comma::csv::stream_test::test_struct& p, Visitor& v )
 {
     v.apply( "x", p.x );
     v.apply( "y", p.y );
 }    
Beispiel #17
0
 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 );
 }    
Beispiel #18
0
 template < typename Key, class Visitor > static void visit( const Key&, comma::csv::ascii_test::vector_container& p, Visitor& v )
 {
     v.apply( "vector", p.vector );
 }
Beispiel #19
0
 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 );
 }
Beispiel #20
0
 template < typename Key, class Visitor > static void visit( const Key&, comma::csv::ascii_test::containers& p, Visitor& v )
 {
     v.apply( "array", p.array );
 }
Beispiel #21
0
 static void visit( const Key&, const output::status& p, Visitor& v )
 {
     v.apply( "state_of_charge", p.state_of_charge );
 }
Beispiel #22
0
 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 );
 }
Beispiel #23
0
 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 );
 }
Beispiel #24
0
 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 );
 }
Beispiel #25
0
 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 );
 }
Beispiel #26
0
 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 );
 }