00001
00002 #ifndef GEOGRAPHIC_MSGS_MESSAGE_KEYVALUE_H
00003 #define GEOGRAPHIC_MSGS_MESSAGE_KEYVALUE_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 KeyValue_ {
00022 typedef KeyValue_<ContainerAllocator> Type;
00023
00024 KeyValue_()
00025 : key()
00026 , value()
00027 {
00028 }
00029
00030 KeyValue_(const ContainerAllocator& _alloc)
00031 : key(_alloc)
00032 , value(_alloc)
00033 {
00034 }
00035
00036 typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > _key_type;
00037 std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > key;
00038
00039 typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > _value_type;
00040 std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > value;
00041
00042
00043 private:
00044 static const char* __s_getDataType_() { return "geographic_msgs/KeyValue"; }
00045 public:
00046 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00047
00048 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00049
00050 private:
00051 static const char* __s_getMD5Sum_() { return "cf57fdc6617a881a88c16e768132149c"; }
00052 public:
00053 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00054
00055 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00056
00057 private:
00058 static const char* __s_getMessageDefinition_() { return "# Geographic map tag (key, value) pair\n\
00059 #\n\
00060 # This is equivalent to diagnostic_msgs/KeyValue, repeated here to\n\
00061 # avoid introducing a trivial stack dependency.\n\
00062 \n\
00063 string key # tag label\n\
00064 string value # corresponding value\n\
00065 \n\
00066 "; }
00067 public:
00068 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00069
00070 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00071
00072 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00073 {
00074 ros::serialization::OStream stream(write_ptr, 1000000000);
00075 ros::serialization::serialize(stream, key);
00076 ros::serialization::serialize(stream, value);
00077 return stream.getData();
00078 }
00079
00080 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00081 {
00082 ros::serialization::IStream stream(read_ptr, 1000000000);
00083 ros::serialization::deserialize(stream, key);
00084 ros::serialization::deserialize(stream, value);
00085 return stream.getData();
00086 }
00087
00088 ROS_DEPRECATED virtual uint32_t serializationLength() const
00089 {
00090 uint32_t size = 0;
00091 size += ros::serialization::serializationLength(key);
00092 size += ros::serialization::serializationLength(value);
00093 return size;
00094 }
00095
00096 typedef boost::shared_ptr< ::geographic_msgs::KeyValue_<ContainerAllocator> > Ptr;
00097 typedef boost::shared_ptr< ::geographic_msgs::KeyValue_<ContainerAllocator> const> ConstPtr;
00098 boost::shared_ptr<std::map<std::string, std::string> > __connection_header;
00099 };
00100 typedef ::geographic_msgs::KeyValue_<std::allocator<void> > KeyValue;
00101
00102 typedef boost::shared_ptr< ::geographic_msgs::KeyValue> KeyValuePtr;
00103 typedef boost::shared_ptr< ::geographic_msgs::KeyValue const> KeyValueConstPtr;
00104
00105
00106 template<typename ContainerAllocator>
00107 std::ostream& operator<<(std::ostream& s, const ::geographic_msgs::KeyValue_<ContainerAllocator> & v)
00108 {
00109 ros::message_operations::Printer< ::geographic_msgs::KeyValue_<ContainerAllocator> >::stream(s, "", v);
00110 return s;}
00111
00112 }
00113
00114 namespace ros
00115 {
00116 namespace message_traits
00117 {
00118 template<class ContainerAllocator> struct IsMessage< ::geographic_msgs::KeyValue_<ContainerAllocator> > : public TrueType {};
00119 template<class ContainerAllocator> struct IsMessage< ::geographic_msgs::KeyValue_<ContainerAllocator> const> : public TrueType {};
00120 template<class ContainerAllocator>
00121 struct MD5Sum< ::geographic_msgs::KeyValue_<ContainerAllocator> > {
00122 static const char* value()
00123 {
00124 return "cf57fdc6617a881a88c16e768132149c";
00125 }
00126
00127 static const char* value(const ::geographic_msgs::KeyValue_<ContainerAllocator> &) { return value(); }
00128 static const uint64_t static_value1 = 0xcf57fdc6617a881aULL;
00129 static const uint64_t static_value2 = 0x88c16e768132149cULL;
00130 };
00131
00132 template<class ContainerAllocator>
00133 struct DataType< ::geographic_msgs::KeyValue_<ContainerAllocator> > {
00134 static const char* value()
00135 {
00136 return "geographic_msgs/KeyValue";
00137 }
00138
00139 static const char* value(const ::geographic_msgs::KeyValue_<ContainerAllocator> &) { return value(); }
00140 };
00141
00142 template<class ContainerAllocator>
00143 struct Definition< ::geographic_msgs::KeyValue_<ContainerAllocator> > {
00144 static const char* value()
00145 {
00146 return "# Geographic map tag (key, value) pair\n\
00147 #\n\
00148 # This is equivalent to diagnostic_msgs/KeyValue, repeated here to\n\
00149 # avoid introducing a trivial stack dependency.\n\
00150 \n\
00151 string key # tag label\n\
00152 string value # corresponding value\n\
00153 \n\
00154 ";
00155 }
00156
00157 static const char* value(const ::geographic_msgs::KeyValue_<ContainerAllocator> &) { return value(); }
00158 };
00159
00160 }
00161 }
00162
00163 namespace ros
00164 {
00165 namespace serialization
00166 {
00167
00168 template<class ContainerAllocator> struct Serializer< ::geographic_msgs::KeyValue_<ContainerAllocator> >
00169 {
00170 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00171 {
00172 stream.next(m.key);
00173 stream.next(m.value);
00174 }
00175
00176 ROS_DECLARE_ALLINONE_SERIALIZER;
00177 };
00178 }
00179 }
00180
00181 namespace ros
00182 {
00183 namespace message_operations
00184 {
00185
00186 template<class ContainerAllocator>
00187 struct Printer< ::geographic_msgs::KeyValue_<ContainerAllocator> >
00188 {
00189 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::geographic_msgs::KeyValue_<ContainerAllocator> & v)
00190 {
00191 s << indent << "key: ";
00192 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.key);
00193 s << indent << "value: ";
00194 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.value);
00195 }
00196 };
00197
00198
00199 }
00200 }
00201
00202 #endif // GEOGRAPHIC_MSGS_MESSAGE_KEYVALUE_H
00203