00001
00002 #ifndef EVART_BRIDGE_MESSAGE_BODY_H
00003 #define EVART_BRIDGE_MESSAGE_BODY_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 "evart_bridge/Segment.h"
00014 #include "evart_bridge/Dof.h"
00015
00016 namespace evart_bridge
00017 {
00018 template <class ContainerAllocator>
00019 struct Body_ : public ros::Message
00020 {
00021 typedef Body_<ContainerAllocator> Type;
00022
00023 Body_()
00024 : name()
00025 , segments()
00026 , dofs()
00027 {
00028 }
00029
00030 Body_(const ContainerAllocator& _alloc)
00031 : name(_alloc)
00032 , segments(_alloc)
00033 , dofs(_alloc)
00034 {
00035 }
00036
00037 typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > _name_type;
00038 std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > name;
00039
00040 typedef std::vector< ::evart_bridge::Segment_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::evart_bridge::Segment_<ContainerAllocator> >::other > _segments_type;
00041 std::vector< ::evart_bridge::Segment_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::evart_bridge::Segment_<ContainerAllocator> >::other > segments;
00042
00043 typedef std::vector< ::evart_bridge::Dof_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::evart_bridge::Dof_<ContainerAllocator> >::other > _dofs_type;
00044 std::vector< ::evart_bridge::Dof_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::evart_bridge::Dof_<ContainerAllocator> >::other > dofs;
00045
00046
00047 ROS_DEPRECATED uint32_t get_segments_size() const { return (uint32_t)segments.size(); }
00048 ROS_DEPRECATED void set_segments_size(uint32_t size) { segments.resize((size_t)size); }
00049 ROS_DEPRECATED void get_segments_vec(std::vector< ::evart_bridge::Segment_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::evart_bridge::Segment_<ContainerAllocator> >::other > & vec) const { vec = this->segments; }
00050 ROS_DEPRECATED void set_segments_vec(const std::vector< ::evart_bridge::Segment_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::evart_bridge::Segment_<ContainerAllocator> >::other > & vec) { this->segments = vec; }
00051 ROS_DEPRECATED uint32_t get_dofs_size() const { return (uint32_t)dofs.size(); }
00052 ROS_DEPRECATED void set_dofs_size(uint32_t size) { dofs.resize((size_t)size); }
00053 ROS_DEPRECATED void get_dofs_vec(std::vector< ::evart_bridge::Dof_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::evart_bridge::Dof_<ContainerAllocator> >::other > & vec) const { vec = this->dofs; }
00054 ROS_DEPRECATED void set_dofs_vec(const std::vector< ::evart_bridge::Dof_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::evart_bridge::Dof_<ContainerAllocator> >::other > & vec) { this->dofs = vec; }
00055 private:
00056 static const char* __s_getDataType_() { return "evart_bridge/Body"; }
00057 public:
00058 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00059
00060 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00061
00062 private:
00063 static const char* __s_getMD5Sum_() { return "cfccec9c0da074c0e3351fd3d7badc55"; }
00064 public:
00065 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00066
00067 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00068
00069 private:
00070 static const char* __s_getMessageDefinition_() { return "string name\n\
00071 Segment[] segments\n\
00072 Dof[] dofs\n\
00073 \n\
00074 ================================================================================\n\
00075 MSG: evart_bridge/Segment\n\
00076 string name\n\
00077 uint32 parent\n\
00078 \n\
00079 ================================================================================\n\
00080 MSG: evart_bridge/Dof\n\
00081 string name\n\
00082 \n\
00083 "; }
00084 public:
00085 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00086
00087 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00088
00089 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00090 {
00091 ros::serialization::OStream stream(write_ptr, 1000000000);
00092 ros::serialization::serialize(stream, name);
00093 ros::serialization::serialize(stream, segments);
00094 ros::serialization::serialize(stream, dofs);
00095 return stream.getData();
00096 }
00097
00098 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00099 {
00100 ros::serialization::IStream stream(read_ptr, 1000000000);
00101 ros::serialization::deserialize(stream, name);
00102 ros::serialization::deserialize(stream, segments);
00103 ros::serialization::deserialize(stream, dofs);
00104 return stream.getData();
00105 }
00106
00107 ROS_DEPRECATED virtual uint32_t serializationLength() const
00108 {
00109 uint32_t size = 0;
00110 size += ros::serialization::serializationLength(name);
00111 size += ros::serialization::serializationLength(segments);
00112 size += ros::serialization::serializationLength(dofs);
00113 return size;
00114 }
00115
00116 typedef boost::shared_ptr< ::evart_bridge::Body_<ContainerAllocator> > Ptr;
00117 typedef boost::shared_ptr< ::evart_bridge::Body_<ContainerAllocator> const> ConstPtr;
00118 };
00119 typedef ::evart_bridge::Body_<std::allocator<void> > Body;
00120
00121 typedef boost::shared_ptr< ::evart_bridge::Body> BodyPtr;
00122 typedef boost::shared_ptr< ::evart_bridge::Body const> BodyConstPtr;
00123
00124
00125 template<typename ContainerAllocator>
00126 std::ostream& operator<<(std::ostream& s, const ::evart_bridge::Body_<ContainerAllocator> & v)
00127 {
00128 ros::message_operations::Printer< ::evart_bridge::Body_<ContainerAllocator> >::stream(s, "", v);
00129 return s;}
00130
00131 }
00132
00133 namespace ros
00134 {
00135 namespace message_traits
00136 {
00137 template<class ContainerAllocator>
00138 struct MD5Sum< ::evart_bridge::Body_<ContainerAllocator> > {
00139 static const char* value()
00140 {
00141 return "cfccec9c0da074c0e3351fd3d7badc55";
00142 }
00143
00144 static const char* value(const ::evart_bridge::Body_<ContainerAllocator> &) { return value(); }
00145 static const uint64_t static_value1 = 0xcfccec9c0da074c0ULL;
00146 static const uint64_t static_value2 = 0xe3351fd3d7badc55ULL;
00147 };
00148
00149 template<class ContainerAllocator>
00150 struct DataType< ::evart_bridge::Body_<ContainerAllocator> > {
00151 static const char* value()
00152 {
00153 return "evart_bridge/Body";
00154 }
00155
00156 static const char* value(const ::evart_bridge::Body_<ContainerAllocator> &) { return value(); }
00157 };
00158
00159 template<class ContainerAllocator>
00160 struct Definition< ::evart_bridge::Body_<ContainerAllocator> > {
00161 static const char* value()
00162 {
00163 return "string name\n\
00164 Segment[] segments\n\
00165 Dof[] dofs\n\
00166 \n\
00167 ================================================================================\n\
00168 MSG: evart_bridge/Segment\n\
00169 string name\n\
00170 uint32 parent\n\
00171 \n\
00172 ================================================================================\n\
00173 MSG: evart_bridge/Dof\n\
00174 string name\n\
00175 \n\
00176 ";
00177 }
00178
00179 static const char* value(const ::evart_bridge::Body_<ContainerAllocator> &) { return value(); }
00180 };
00181
00182 }
00183 }
00184
00185 namespace ros
00186 {
00187 namespace serialization
00188 {
00189
00190 template<class ContainerAllocator> struct Serializer< ::evart_bridge::Body_<ContainerAllocator> >
00191 {
00192 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00193 {
00194 stream.next(m.name);
00195 stream.next(m.segments);
00196 stream.next(m.dofs);
00197 }
00198
00199 ROS_DECLARE_ALLINONE_SERIALIZER;
00200 };
00201 }
00202 }
00203
00204 namespace ros
00205 {
00206 namespace message_operations
00207 {
00208
00209 template<class ContainerAllocator>
00210 struct Printer< ::evart_bridge::Body_<ContainerAllocator> >
00211 {
00212 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::evart_bridge::Body_<ContainerAllocator> & v)
00213 {
00214 s << indent << "name: ";
00215 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.name);
00216 s << indent << "segments[]" << std::endl;
00217 for (size_t i = 0; i < v.segments.size(); ++i)
00218 {
00219 s << indent << " segments[" << i << "]: ";
00220 s << std::endl;
00221 s << indent;
00222 Printer< ::evart_bridge::Segment_<ContainerAllocator> >::stream(s, indent + " ", v.segments[i]);
00223 }
00224 s << indent << "dofs[]" << std::endl;
00225 for (size_t i = 0; i < v.dofs.size(); ++i)
00226 {
00227 s << indent << " dofs[" << i << "]: ";
00228 s << std::endl;
00229 s << indent;
00230 Printer< ::evart_bridge::Dof_<ContainerAllocator> >::stream(s, indent + " ", v.dofs[i]);
00231 }
00232 }
00233 };
00234
00235
00236 }
00237 }
00238
00239 #endif // EVART_BRIDGE_MESSAGE_BODY_H
00240