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


orogen
Author(s): Sylvain Joyeux/sylvain.joyeux@m4x.org
autogenerated on Thu Jan 2 2014 11:38:57