opaque_intermediates.h
Go to the documentation of this file.
00001 #ifndef TEST_OPAQUE_INTERMEDIATES_HH
00002 #define TEST_OPAQUE_INTERMEDIATES_HH
00003 
00004 namespace NotOrogenCompatible
00005 {
00006     class Point2D
00007     {
00008         float _x, _y;
00009 
00010     public:
00011         explicit Point2D(float x = 0, float y = 0)
00012             : _x(x), _y(y) {}
00013 
00014         float x() const { return _x; }
00015         float y() const { return _y; }
00016         float& x() { return _x; }
00017         float& y() { return _y; }
00018 
00019         bool operator == (Point2D const& other) const
00020         { return other.x() == x() && other.y() == y(); }
00021     };
00022 }
00023 
00024 namespace TestOpaque
00025 {
00026     struct Point2D
00027     {
00028         short padding; // to make sure TestOpaque::Point2D and NotOrogenCompatible::Point2D are never aligned in the same way
00029         double x, y;
00030     };
00031 
00032     struct Position
00033     {
00034         double timestamp;
00035         NotOrogenCompatible::Point2D p;
00036 
00037         bool operator == (Position const& other) const
00038         { return other.timestamp == timestamp && other.p == p; }
00039     };
00040 }
00041 
00042 #endif
00043 


orogen
Author(s): Sylvain Joyeux/sylvain.joyeux@m4x.org
autogenerated on Sat Jun 8 2019 19:52:17