00001
00002 #ifndef NASA_R2_COMMON_MSGS_MESSAGE_VARIANTMAP_H
00003 #define NASA_R2_COMMON_MSGS_MESSAGE_VARIANTMAP_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 #include "nasa_r2_common_msgs/ValueType.h"
00018
00019 namespace nasa_r2_common_msgs
00020 {
00021 template <class ContainerAllocator>
00022 struct VariantMap_ {
00023 typedef VariantMap_<ContainerAllocator> Type;
00024
00025 VariantMap_()
00026 : name()
00027 , message()
00028 , value()
00029 , stringMap()
00030 , uint16Map()
00031 , int16Map()
00032 , uint32Map()
00033 , int32Map()
00034 , float32Map()
00035 , boolMap()
00036 {
00037 }
00038
00039 VariantMap_(const ContainerAllocator& _alloc)
00040 : name(_alloc)
00041 , message(_alloc)
00042 , value(_alloc)
00043 , stringMap(_alloc)
00044 , uint16Map(_alloc)
00045 , int16Map(_alloc)
00046 , uint32Map(_alloc)
00047 , int32Map(_alloc)
00048 , float32Map(_alloc)
00049 , boolMap(_alloc)
00050 {
00051 }
00052
00053 typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > _name_type;
00054 std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > name;
00055
00056 typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > _message_type;
00057 std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > message;
00058
00059 typedef std::vector< ::nasa_r2_common_msgs::ValueType_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::nasa_r2_common_msgs::ValueType_<ContainerAllocator> >::other > _value_type;
00060 std::vector< ::nasa_r2_common_msgs::ValueType_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::nasa_r2_common_msgs::ValueType_<ContainerAllocator> >::other > value;
00061
00062 typedef std::vector<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > , typename ContainerAllocator::template rebind<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::other > _stringMap_type;
00063 std::vector<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > , typename ContainerAllocator::template rebind<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::other > stringMap;
00064
00065 typedef std::vector<uint16_t, typename ContainerAllocator::template rebind<uint16_t>::other > _uint16Map_type;
00066 std::vector<uint16_t, typename ContainerAllocator::template rebind<uint16_t>::other > uint16Map;
00067
00068 typedef std::vector<int16_t, typename ContainerAllocator::template rebind<int16_t>::other > _int16Map_type;
00069 std::vector<int16_t, typename ContainerAllocator::template rebind<int16_t>::other > int16Map;
00070
00071 typedef std::vector<uint32_t, typename ContainerAllocator::template rebind<uint32_t>::other > _uint32Map_type;
00072 std::vector<uint32_t, typename ContainerAllocator::template rebind<uint32_t>::other > uint32Map;
00073
00074 typedef std::vector<int32_t, typename ContainerAllocator::template rebind<int32_t>::other > _int32Map_type;
00075 std::vector<int32_t, typename ContainerAllocator::template rebind<int32_t>::other > int32Map;
00076
00077 typedef std::vector<float, typename ContainerAllocator::template rebind<float>::other > _float32Map_type;
00078 std::vector<float, typename ContainerAllocator::template rebind<float>::other > float32Map;
00079
00080 typedef std::vector<uint8_t, typename ContainerAllocator::template rebind<uint8_t>::other > _boolMap_type;
00081 std::vector<uint8_t, typename ContainerAllocator::template rebind<uint8_t>::other > boolMap;
00082
00083
00084 typedef boost::shared_ptr< ::nasa_r2_common_msgs::VariantMap_<ContainerAllocator> > Ptr;
00085 typedef boost::shared_ptr< ::nasa_r2_common_msgs::VariantMap_<ContainerAllocator> const> ConstPtr;
00086 boost::shared_ptr<std::map<std::string, std::string> > __connection_header;
00087 };
00088 typedef ::nasa_r2_common_msgs::VariantMap_<std::allocator<void> > VariantMap;
00089
00090 typedef boost::shared_ptr< ::nasa_r2_common_msgs::VariantMap> VariantMapPtr;
00091 typedef boost::shared_ptr< ::nasa_r2_common_msgs::VariantMap const> VariantMapConstPtr;
00092
00093
00094 template<typename ContainerAllocator>
00095 std::ostream& operator<<(std::ostream& s, const ::nasa_r2_common_msgs::VariantMap_<ContainerAllocator> & v)
00096 {
00097 ros::message_operations::Printer< ::nasa_r2_common_msgs::VariantMap_<ContainerAllocator> >::stream(s, "", v);
00098 return s;}
00099
00100 }
00101
00102 namespace ros
00103 {
00104 namespace message_traits
00105 {
00106 template<class ContainerAllocator> struct IsMessage< ::nasa_r2_common_msgs::VariantMap_<ContainerAllocator> > : public TrueType {};
00107 template<class ContainerAllocator> struct IsMessage< ::nasa_r2_common_msgs::VariantMap_<ContainerAllocator> const> : public TrueType {};
00108 template<class ContainerAllocator>
00109 struct MD5Sum< ::nasa_r2_common_msgs::VariantMap_<ContainerAllocator> > {
00110 static const char* value()
00111 {
00112 return "8356d002313ee472651f88ac3bf992a9";
00113 }
00114
00115 static const char* value(const ::nasa_r2_common_msgs::VariantMap_<ContainerAllocator> &) { return value(); }
00116 static const uint64_t static_value1 = 0x8356d002313ee472ULL;
00117 static const uint64_t static_value2 = 0x651f88ac3bf992a9ULL;
00118 };
00119
00120 template<class ContainerAllocator>
00121 struct DataType< ::nasa_r2_common_msgs::VariantMap_<ContainerAllocator> > {
00122 static const char* value()
00123 {
00124 return "nasa_r2_common_msgs/VariantMap";
00125 }
00126
00127 static const char* value(const ::nasa_r2_common_msgs::VariantMap_<ContainerAllocator> &) { return value(); }
00128 };
00129
00130 template<class ContainerAllocator>
00131 struct Definition< ::nasa_r2_common_msgs::VariantMap_<ContainerAllocator> > {
00132 static const char* value()
00133 {
00134 return "string name\n\
00135 string message\n\
00136 ValueType[] value\n\
00137 string[] stringMap\n\
00138 uint16[] uint16Map\n\
00139 int16[] int16Map\n\
00140 uint32[] uint32Map\n\
00141 int32[] int32Map\n\
00142 float32[] float32Map\n\
00143 bool[] boolMap\n\
00144 \n\
00145 ================================================================================\n\
00146 MSG: nasa_r2_common_msgs/ValueType\n\
00147 string key\n\
00148 MappedType type\n\
00149 uint32 index\n\
00150 \n\
00151 ================================================================================\n\
00152 MSG: nasa_r2_common_msgs/MappedType\n\
00153 uint8 STRING = 0\n\
00154 uint8 UINT16 = 1\n\
00155 uint8 INT16 = 2\n\
00156 uint8 UINT32 = 3\n\
00157 uint8 INT32 = 4\n\
00158 uint8 FLOAT32 = 5\n\
00159 uint8 BOOL = 6\n\
00160 \n\
00161 uint8 type\n\
00162 \n\
00163 ";
00164 }
00165
00166 static const char* value(const ::nasa_r2_common_msgs::VariantMap_<ContainerAllocator> &) { return value(); }
00167 };
00168
00169 }
00170 }
00171
00172 namespace ros
00173 {
00174 namespace serialization
00175 {
00176
00177 template<class ContainerAllocator> struct Serializer< ::nasa_r2_common_msgs::VariantMap_<ContainerAllocator> >
00178 {
00179 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00180 {
00181 stream.next(m.name);
00182 stream.next(m.message);
00183 stream.next(m.value);
00184 stream.next(m.stringMap);
00185 stream.next(m.uint16Map);
00186 stream.next(m.int16Map);
00187 stream.next(m.uint32Map);
00188 stream.next(m.int32Map);
00189 stream.next(m.float32Map);
00190 stream.next(m.boolMap);
00191 }
00192
00193 ROS_DECLARE_ALLINONE_SERIALIZER;
00194 };
00195 }
00196 }
00197
00198 namespace ros
00199 {
00200 namespace message_operations
00201 {
00202
00203 template<class ContainerAllocator>
00204 struct Printer< ::nasa_r2_common_msgs::VariantMap_<ContainerAllocator> >
00205 {
00206 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::nasa_r2_common_msgs::VariantMap_<ContainerAllocator> & v)
00207 {
00208 s << indent << "name: ";
00209 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.name);
00210 s << indent << "message: ";
00211 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.message);
00212 s << indent << "value[]" << std::endl;
00213 for (size_t i = 0; i < v.value.size(); ++i)
00214 {
00215 s << indent << " value[" << i << "]: ";
00216 s << std::endl;
00217 s << indent;
00218 Printer< ::nasa_r2_common_msgs::ValueType_<ContainerAllocator> >::stream(s, indent + " ", v.value[i]);
00219 }
00220 s << indent << "stringMap[]" << std::endl;
00221 for (size_t i = 0; i < v.stringMap.size(); ++i)
00222 {
00223 s << indent << " stringMap[" << i << "]: ";
00224 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.stringMap[i]);
00225 }
00226 s << indent << "uint16Map[]" << std::endl;
00227 for (size_t i = 0; i < v.uint16Map.size(); ++i)
00228 {
00229 s << indent << " uint16Map[" << i << "]: ";
00230 Printer<uint16_t>::stream(s, indent + " ", v.uint16Map[i]);
00231 }
00232 s << indent << "int16Map[]" << std::endl;
00233 for (size_t i = 0; i < v.int16Map.size(); ++i)
00234 {
00235 s << indent << " int16Map[" << i << "]: ";
00236 Printer<int16_t>::stream(s, indent + " ", v.int16Map[i]);
00237 }
00238 s << indent << "uint32Map[]" << std::endl;
00239 for (size_t i = 0; i < v.uint32Map.size(); ++i)
00240 {
00241 s << indent << " uint32Map[" << i << "]: ";
00242 Printer<uint32_t>::stream(s, indent + " ", v.uint32Map[i]);
00243 }
00244 s << indent << "int32Map[]" << std::endl;
00245 for (size_t i = 0; i < v.int32Map.size(); ++i)
00246 {
00247 s << indent << " int32Map[" << i << "]: ";
00248 Printer<int32_t>::stream(s, indent + " ", v.int32Map[i]);
00249 }
00250 s << indent << "float32Map[]" << std::endl;
00251 for (size_t i = 0; i < v.float32Map.size(); ++i)
00252 {
00253 s << indent << " float32Map[" << i << "]: ";
00254 Printer<float>::stream(s, indent + " ", v.float32Map[i]);
00255 }
00256 s << indent << "boolMap[]" << std::endl;
00257 for (size_t i = 0; i < v.boolMap.size(); ++i)
00258 {
00259 s << indent << " boolMap[" << i << "]: ";
00260 Printer<uint8_t>::stream(s, indent + " ", v.boolMap[i]);
00261 }
00262 }
00263 };
00264
00265
00266 }
00267 }
00268
00269 #endif // NASA_R2_COMMON_MSGS_MESSAGE_VARIANTMAP_H
00270