00001
00002 #ifndef GEOMETRY_MSGS_MESSAGE_POLYGON_H
00003 #define GEOMETRY_MSGS_MESSAGE_POLYGON_H
00004 #include <string>
00005 #include <vector>
00006 #include <ostream>
00007 #include "ros/serialization.h"
00008 #include "ros/builtin_message_traits.h"
00009 #include "ros/message_operations.h"
00010 #include "ros/message.h"
00011 #include "ros/time.h"
00012
00013 #include "geometry_msgs/Point32.h"
00014
00015 namespace geometry_msgs
00016 {
00017 template <class ContainerAllocator>
00018 struct Polygon_ : public ros::Message
00019 {
00020 typedef Polygon_<ContainerAllocator> Type;
00021
00022 Polygon_()
00023 : points()
00024 {
00025 }
00026
00027 Polygon_(const ContainerAllocator& _alloc)
00028 : points(_alloc)
00029 {
00030 }
00031
00032 typedef std::vector< ::geometry_msgs::Point32_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::geometry_msgs::Point32_<ContainerAllocator> >::other > _points_type;
00033 std::vector< ::geometry_msgs::Point32_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::geometry_msgs::Point32_<ContainerAllocator> >::other > points;
00034
00035
00036 ROS_DEPRECATED uint32_t get_points_size() const { return (uint32_t)points.size(); }
00037 ROS_DEPRECATED void set_points_size(uint32_t size) { points.resize((size_t)size); }
00038 ROS_DEPRECATED void get_points_vec(std::vector< ::geometry_msgs::Point32_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::geometry_msgs::Point32_<ContainerAllocator> >::other > & vec) const { vec = this->points; }
00039 ROS_DEPRECATED void set_points_vec(const std::vector< ::geometry_msgs::Point32_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::geometry_msgs::Point32_<ContainerAllocator> >::other > & vec) { this->points = vec; }
00040 private:
00041 static const char* __s_getDataType_() { return "geometry_msgs/Polygon"; }
00042 public:
00043 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00044
00045 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00046
00047 private:
00048 static const char* __s_getMD5Sum_() { return "cd60a26494a087f577976f0329fa120e"; }
00049 public:
00050 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00051
00052 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00053
00054 private:
00055 static const char* __s_getMessageDefinition_() { return "#A specification of a polygon where the first and last points are assumed to be connected\n\
00056 geometry_msgs/Point32[] points\n\
00057 \n\
00058 ================================================================================\n\
00059 MSG: geometry_msgs/Point32\n\
00060 # This contains the position of a point in free space(with 32 bits of precision).\n\
00061 # It is recommeded to use Point wherever possible instead of Point32. \n\
00062 # \n\
00063 # This recommendation is to promote interoperability. \n\
00064 #\n\
00065 # This message is designed to take up less space when sending\n\
00066 # lots of points at once, as in the case of a PointCloud. \n\
00067 \n\
00068 float32 x\n\
00069 float32 y\n\
00070 float32 z\n\
00071 "; }
00072 public:
00073 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00074
00075 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00076
00077 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00078 {
00079 ros::serialization::OStream stream(write_ptr, 1000000000);
00080 ros::serialization::serialize(stream, points);
00081 return stream.getData();
00082 }
00083
00084 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00085 {
00086 ros::serialization::IStream stream(read_ptr, 1000000000);
00087 ros::serialization::deserialize(stream, points);
00088 return stream.getData();
00089 }
00090
00091 ROS_DEPRECATED virtual uint32_t serializationLength() const
00092 {
00093 uint32_t size = 0;
00094 size += ros::serialization::serializationLength(points);
00095 return size;
00096 }
00097
00098 typedef boost::shared_ptr< ::geometry_msgs::Polygon_<ContainerAllocator> > Ptr;
00099 typedef boost::shared_ptr< ::geometry_msgs::Polygon_<ContainerAllocator> const> ConstPtr;
00100 };
00101 typedef ::geometry_msgs::Polygon_<std::allocator<void> > Polygon;
00102
00103 typedef boost::shared_ptr< ::geometry_msgs::Polygon> PolygonPtr;
00104 typedef boost::shared_ptr< ::geometry_msgs::Polygon const> PolygonConstPtr;
00105
00106
00107 template<typename ContainerAllocator>
00108 std::ostream& operator<<(std::ostream& s, const ::geometry_msgs::Polygon_<ContainerAllocator> & v)
00109 {
00110 ros::message_operations::Printer< ::geometry_msgs::Polygon_<ContainerAllocator> >::stream(s, "", v);
00111 return s;}
00112
00113 }
00114
00115 namespace ros
00116 {
00117 namespace message_traits
00118 {
00119 template<class ContainerAllocator>
00120 struct MD5Sum< ::geometry_msgs::Polygon_<ContainerAllocator> > {
00121 static const char* value()
00122 {
00123 return "cd60a26494a087f577976f0329fa120e";
00124 }
00125
00126 static const char* value(const ::geometry_msgs::Polygon_<ContainerAllocator> &) { return value(); }
00127 static const uint64_t static_value1 = 0xcd60a26494a087f5ULL;
00128 static const uint64_t static_value2 = 0x77976f0329fa120eULL;
00129 };
00130
00131 template<class ContainerAllocator>
00132 struct DataType< ::geometry_msgs::Polygon_<ContainerAllocator> > {
00133 static const char* value()
00134 {
00135 return "geometry_msgs/Polygon";
00136 }
00137
00138 static const char* value(const ::geometry_msgs::Polygon_<ContainerAllocator> &) { return value(); }
00139 };
00140
00141 template<class ContainerAllocator>
00142 struct Definition< ::geometry_msgs::Polygon_<ContainerAllocator> > {
00143 static const char* value()
00144 {
00145 return "#A specification of a polygon where the first and last points are assumed to be connected\n\
00146 geometry_msgs/Point32[] points\n\
00147 \n\
00148 ================================================================================\n\
00149 MSG: geometry_msgs/Point32\n\
00150 # This contains the position of a point in free space(with 32 bits of precision).\n\
00151 # It is recommeded to use Point wherever possible instead of Point32. \n\
00152 # \n\
00153 # This recommendation is to promote interoperability. \n\
00154 #\n\
00155 # This message is designed to take up less space when sending\n\
00156 # lots of points at once, as in the case of a PointCloud. \n\
00157 \n\
00158 float32 x\n\
00159 float32 y\n\
00160 float32 z\n\
00161 ";
00162 }
00163
00164 static const char* value(const ::geometry_msgs::Polygon_<ContainerAllocator> &) { return value(); }
00165 };
00166
00167 }
00168 }
00169
00170 namespace ros
00171 {
00172 namespace serialization
00173 {
00174
00175 template<class ContainerAllocator> struct Serializer< ::geometry_msgs::Polygon_<ContainerAllocator> >
00176 {
00177 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00178 {
00179 stream.next(m.points);
00180 }
00181
00182 ROS_DECLARE_ALLINONE_SERIALIZER;
00183 };
00184 }
00185 }
00186
00187 namespace ros
00188 {
00189 namespace message_operations
00190 {
00191
00192 template<class ContainerAllocator>
00193 struct Printer< ::geometry_msgs::Polygon_<ContainerAllocator> >
00194 {
00195 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::geometry_msgs::Polygon_<ContainerAllocator> & v)
00196 {
00197 s << indent << "points[]" << std::endl;
00198 for (size_t i = 0; i < v.points.size(); ++i)
00199 {
00200 s << indent << " points[" << i << "]: ";
00201 s << std::endl;
00202 s << indent;
00203 Printer< ::geometry_msgs::Point32_<ContainerAllocator> >::stream(s, indent + " ", v.points[i]);
00204 }
00205 }
00206 };
00207
00208
00209 }
00210 }
00211
00212 #endif // GEOMETRY_MSGS_MESSAGE_POLYGON_H
00213