00001
00002 #ifndef GEOGRAPHIC_MSGS_MESSAGE_UNIQUEID_H
00003 #define GEOGRAPHIC_MSGS_MESSAGE_UNIQUEID_H
00004 #include <string>
00005 #include <vector>
00006 #include <map>
00007 #include <ostream>
00008 #include "ros/serialization.h"
00009 #include "ros/builtin_message_traits.h"
00010 #include "ros/message_operations.h"
00011 #include "ros/time.h"
00012
00013 #include "ros/macros.h"
00014
00015 #include "ros/assert.h"
00016
00017
00018 namespace geographic_msgs
00019 {
00020 template <class ContainerAllocator>
00021 struct UniqueID_ {
00022 typedef UniqueID_<ContainerAllocator> Type;
00023
00024 UniqueID_()
00025 : uuid()
00026 {
00027 }
00028
00029 UniqueID_(const ContainerAllocator& _alloc)
00030 : uuid(_alloc)
00031 {
00032 }
00033
00034 typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > _uuid_type;
00035 std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > uuid;
00036
00037
00038 private:
00039 static const char* __s_getDataType_() { return "geographic_msgs/UniqueID"; }
00040 public:
00041 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00042
00043 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00044
00045 private:
00046 static const char* __s_getMD5Sum_() { return "18ad0215778d252d8f14959901273e8d"; }
00047 public:
00048 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00049
00050 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00051
00052 private:
00053 static const char* __s_getMessageDefinition_() { return "# A universally unique identifier (UUID) for a geographic feature.\n\
00054 #\n\
00055 # http://en.wikipedia.org/wiki/Universally_unique_identifier\n\
00056 # http://tools.ietf.org/html/rfc4122.html\n\
00057 #\n\
00058 # For simplicity and human readability, the UUID is represented as a\n\
00059 # string of hex digits and dashes.\n\
00060 #\n\
00061 # UUID generation is up to the programmer, but the intent is for\n\
00062 # matching features within a domain such as Open Street Map to yield\n\
00063 # the same UUID. The recommended method is RFC 4122 variant 5,\n\
00064 # computing the SHA-1 hash of a URL encoded using the map source. For\n\
00065 # example:\n\
00066 #\n\
00067 # http://openstreetmap.org/node/NUMBER\n\
00068 # http://openstreetmap.org/way/NUMBER\n\
00069 # http://openstreetmap.org/relation/NUMBER\n\
00070 #\n\
00071 # Here NUMBER is the decimal representation of the OSM node, way, or\n\
00072 # relation ID without leading zeros.\n\
00073 #\n\
00074 # Other map sources should use similar conventions.\n\
00075 \n\
00076 string uuid # format: 01234567-89ab-cdef-0123-456789abcdef\n\
00077 \n\
00078 "; }
00079 public:
00080 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00081
00082 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00083
00084 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00085 {
00086 ros::serialization::OStream stream(write_ptr, 1000000000);
00087 ros::serialization::serialize(stream, uuid);
00088 return stream.getData();
00089 }
00090
00091 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00092 {
00093 ros::serialization::IStream stream(read_ptr, 1000000000);
00094 ros::serialization::deserialize(stream, uuid);
00095 return stream.getData();
00096 }
00097
00098 ROS_DEPRECATED virtual uint32_t serializationLength() const
00099 {
00100 uint32_t size = 0;
00101 size += ros::serialization::serializationLength(uuid);
00102 return size;
00103 }
00104
00105 typedef boost::shared_ptr< ::geographic_msgs::UniqueID_<ContainerAllocator> > Ptr;
00106 typedef boost::shared_ptr< ::geographic_msgs::UniqueID_<ContainerAllocator> const> ConstPtr;
00107 boost::shared_ptr<std::map<std::string, std::string> > __connection_header;
00108 };
00109 typedef ::geographic_msgs::UniqueID_<std::allocator<void> > UniqueID;
00110
00111 typedef boost::shared_ptr< ::geographic_msgs::UniqueID> UniqueIDPtr;
00112 typedef boost::shared_ptr< ::geographic_msgs::UniqueID const> UniqueIDConstPtr;
00113
00114
00115 template<typename ContainerAllocator>
00116 std::ostream& operator<<(std::ostream& s, const ::geographic_msgs::UniqueID_<ContainerAllocator> & v)
00117 {
00118 ros::message_operations::Printer< ::geographic_msgs::UniqueID_<ContainerAllocator> >::stream(s, "", v);
00119 return s;}
00120
00121 }
00122
00123 namespace ros
00124 {
00125 namespace message_traits
00126 {
00127 template<class ContainerAllocator> struct IsMessage< ::geographic_msgs::UniqueID_<ContainerAllocator> > : public TrueType {};
00128 template<class ContainerAllocator> struct IsMessage< ::geographic_msgs::UniqueID_<ContainerAllocator> const> : public TrueType {};
00129 template<class ContainerAllocator>
00130 struct MD5Sum< ::geographic_msgs::UniqueID_<ContainerAllocator> > {
00131 static const char* value()
00132 {
00133 return "18ad0215778d252d8f14959901273e8d";
00134 }
00135
00136 static const char* value(const ::geographic_msgs::UniqueID_<ContainerAllocator> &) { return value(); }
00137 static const uint64_t static_value1 = 0x18ad0215778d252dULL;
00138 static const uint64_t static_value2 = 0x8f14959901273e8dULL;
00139 };
00140
00141 template<class ContainerAllocator>
00142 struct DataType< ::geographic_msgs::UniqueID_<ContainerAllocator> > {
00143 static const char* value()
00144 {
00145 return "geographic_msgs/UniqueID";
00146 }
00147
00148 static const char* value(const ::geographic_msgs::UniqueID_<ContainerAllocator> &) { return value(); }
00149 };
00150
00151 template<class ContainerAllocator>
00152 struct Definition< ::geographic_msgs::UniqueID_<ContainerAllocator> > {
00153 static const char* value()
00154 {
00155 return "# A universally unique identifier (UUID) for a geographic feature.\n\
00156 #\n\
00157 # http://en.wikipedia.org/wiki/Universally_unique_identifier\n\
00158 # http://tools.ietf.org/html/rfc4122.html\n\
00159 #\n\
00160 # For simplicity and human readability, the UUID is represented as a\n\
00161 # string of hex digits and dashes.\n\
00162 #\n\
00163 # UUID generation is up to the programmer, but the intent is for\n\
00164 # matching features within a domain such as Open Street Map to yield\n\
00165 # the same UUID. The recommended method is RFC 4122 variant 5,\n\
00166 # computing the SHA-1 hash of a URL encoded using the map source. For\n\
00167 # example:\n\
00168 #\n\
00169 # http://openstreetmap.org/node/NUMBER\n\
00170 # http://openstreetmap.org/way/NUMBER\n\
00171 # http://openstreetmap.org/relation/NUMBER\n\
00172 #\n\
00173 # Here NUMBER is the decimal representation of the OSM node, way, or\n\
00174 # relation ID without leading zeros.\n\
00175 #\n\
00176 # Other map sources should use similar conventions.\n\
00177 \n\
00178 string uuid # format: 01234567-89ab-cdef-0123-456789abcdef\n\
00179 \n\
00180 ";
00181 }
00182
00183 static const char* value(const ::geographic_msgs::UniqueID_<ContainerAllocator> &) { return value(); }
00184 };
00185
00186 }
00187 }
00188
00189 namespace ros
00190 {
00191 namespace serialization
00192 {
00193
00194 template<class ContainerAllocator> struct Serializer< ::geographic_msgs::UniqueID_<ContainerAllocator> >
00195 {
00196 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00197 {
00198 stream.next(m.uuid);
00199 }
00200
00201 ROS_DECLARE_ALLINONE_SERIALIZER;
00202 };
00203 }
00204 }
00205
00206 namespace ros
00207 {
00208 namespace message_operations
00209 {
00210
00211 template<class ContainerAllocator>
00212 struct Printer< ::geographic_msgs::UniqueID_<ContainerAllocator> >
00213 {
00214 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::geographic_msgs::UniqueID_<ContainerAllocator> & v)
00215 {
00216 s << indent << "uuid: ";
00217 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.uuid);
00218 }
00219 };
00220
00221
00222 }
00223 }
00224
00225 #endif // GEOGRAPHIC_MSGS_MESSAGE_UNIQUEID_H
00226