00001
00002 #ifndef WAREHOUSE_MESSAGE_CONDITION_H
00003 #define WAREHOUSE_MESSAGE_CONDITION_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
00014 namespace warehouse
00015 {
00016 template <class ContainerAllocator>
00017 struct Condition_ : public ros::Message
00018 {
00019 typedef Condition_<ContainerAllocator> Type;
00020
00021 Condition_()
00022 : field_name()
00023 , predicate(0)
00024 , args()
00025 {
00026 }
00027
00028 Condition_(const ContainerAllocator& _alloc)
00029 : field_name(_alloc)
00030 , predicate(0)
00031 , args(_alloc)
00032 {
00033 }
00034
00035 typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > _field_name_type;
00036 std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > field_name;
00037
00038 typedef uint8_t _predicate_type;
00039 uint8_t predicate;
00040
00041 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 > _args_type;
00042 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 > args;
00043
00044 enum { LESS_THAN = 0 };
00045 enum { GREATER_THAN = 1 };
00046 enum { EQUALS = 2 };
00047
00048 ROS_DEPRECATED uint32_t get_args_size() const { return (uint32_t)args.size(); }
00049 ROS_DEPRECATED void set_args_size(uint32_t size) { args.resize((size_t)size); }
00050 ROS_DEPRECATED void get_args_vec(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 > & vec) const { vec = this->args; }
00051 ROS_DEPRECATED void set_args_vec(const 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 > & vec) { this->args = vec; }
00052 private:
00053 static const char* __s_getDataType_() { return "warehouse/Condition"; }
00054 public:
00055 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00056
00057 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00058
00059 private:
00060 static const char* __s_getMD5Sum_() { return "44691f2aeb7a218e22c96feb085564c8"; }
00061 public:
00062 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00063
00064 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00065
00066 private:
00067 static const char* __s_getMessageDefinition_() { return "# Represents an individual condition on a field in a query\n\
00068 \n\
00069 # Field name, which can be nested. E.g., \"pose.position.x\"\n\
00070 string field_name\n\
00071 \n\
00072 # Predicate, which must be of one the types below\n\
00073 uint8 predicate\n\
00074 \n\
00075 # Predicate arguments, which are parsed from strings, in a predicate-dependent manner\n\
00076 string[] args\n\
00077 \n\
00078 \n\
00079 ## Predicate types\n\
00080 \n\
00081 # numerical field must be less than args[0]\n\
00082 uint8 LESS_THAN=0\n\
00083 \n\
00084 # numerical field must be greater than args[0]\n\
00085 uint8 GREATER_THAN=1\n\
00086 \n\
00087 # field must equal args[0]\n\
00088 uint8 EQUALS=2\n\
00089 "; }
00090 public:
00091 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00092
00093 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00094
00095 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00096 {
00097 ros::serialization::OStream stream(write_ptr, 1000000000);
00098 ros::serialization::serialize(stream, field_name);
00099 ros::serialization::serialize(stream, predicate);
00100 ros::serialization::serialize(stream, args);
00101 return stream.getData();
00102 }
00103
00104 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00105 {
00106 ros::serialization::IStream stream(read_ptr, 1000000000);
00107 ros::serialization::deserialize(stream, field_name);
00108 ros::serialization::deserialize(stream, predicate);
00109 ros::serialization::deserialize(stream, args);
00110 return stream.getData();
00111 }
00112
00113 ROS_DEPRECATED virtual uint32_t serializationLength() const
00114 {
00115 uint32_t size = 0;
00116 size += ros::serialization::serializationLength(field_name);
00117 size += ros::serialization::serializationLength(predicate);
00118 size += ros::serialization::serializationLength(args);
00119 return size;
00120 }
00121
00122 typedef boost::shared_ptr< ::warehouse::Condition_<ContainerAllocator> > Ptr;
00123 typedef boost::shared_ptr< ::warehouse::Condition_<ContainerAllocator> const> ConstPtr;
00124 };
00125 typedef ::warehouse::Condition_<std::allocator<void> > Condition;
00126
00127 typedef boost::shared_ptr< ::warehouse::Condition> ConditionPtr;
00128 typedef boost::shared_ptr< ::warehouse::Condition const> ConditionConstPtr;
00129
00130
00131 template<typename ContainerAllocator>
00132 std::ostream& operator<<(std::ostream& s, const ::warehouse::Condition_<ContainerAllocator> & v)
00133 {
00134 ros::message_operations::Printer< ::warehouse::Condition_<ContainerAllocator> >::stream(s, "", v);
00135 return s;}
00136
00137 }
00138
00139 namespace ros
00140 {
00141 namespace message_traits
00142 {
00143 template<class ContainerAllocator>
00144 struct MD5Sum< ::warehouse::Condition_<ContainerAllocator> > {
00145 static const char* value()
00146 {
00147 return "44691f2aeb7a218e22c96feb085564c8";
00148 }
00149
00150 static const char* value(const ::warehouse::Condition_<ContainerAllocator> &) { return value(); }
00151 static const uint64_t static_value1 = 0x44691f2aeb7a218eULL;
00152 static const uint64_t static_value2 = 0x22c96feb085564c8ULL;
00153 };
00154
00155 template<class ContainerAllocator>
00156 struct DataType< ::warehouse::Condition_<ContainerAllocator> > {
00157 static const char* value()
00158 {
00159 return "warehouse/Condition";
00160 }
00161
00162 static const char* value(const ::warehouse::Condition_<ContainerAllocator> &) { return value(); }
00163 };
00164
00165 template<class ContainerAllocator>
00166 struct Definition< ::warehouse::Condition_<ContainerAllocator> > {
00167 static const char* value()
00168 {
00169 return "# Represents an individual condition on a field in a query\n\
00170 \n\
00171 # Field name, which can be nested. E.g., \"pose.position.x\"\n\
00172 string field_name\n\
00173 \n\
00174 # Predicate, which must be of one the types below\n\
00175 uint8 predicate\n\
00176 \n\
00177 # Predicate arguments, which are parsed from strings, in a predicate-dependent manner\n\
00178 string[] args\n\
00179 \n\
00180 \n\
00181 ## Predicate types\n\
00182 \n\
00183 # numerical field must be less than args[0]\n\
00184 uint8 LESS_THAN=0\n\
00185 \n\
00186 # numerical field must be greater than args[0]\n\
00187 uint8 GREATER_THAN=1\n\
00188 \n\
00189 # field must equal args[0]\n\
00190 uint8 EQUALS=2\n\
00191 ";
00192 }
00193
00194 static const char* value(const ::warehouse::Condition_<ContainerAllocator> &) { return value(); }
00195 };
00196
00197 }
00198 }
00199
00200 namespace ros
00201 {
00202 namespace serialization
00203 {
00204
00205 template<class ContainerAllocator> struct Serializer< ::warehouse::Condition_<ContainerAllocator> >
00206 {
00207 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00208 {
00209 stream.next(m.field_name);
00210 stream.next(m.predicate);
00211 stream.next(m.args);
00212 }
00213
00214 ROS_DECLARE_ALLINONE_SERIALIZER;
00215 };
00216 }
00217 }
00218
00219 namespace ros
00220 {
00221 namespace message_operations
00222 {
00223
00224 template<class ContainerAllocator>
00225 struct Printer< ::warehouse::Condition_<ContainerAllocator> >
00226 {
00227 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::warehouse::Condition_<ContainerAllocator> & v)
00228 {
00229 s << indent << "field_name: ";
00230 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.field_name);
00231 s << indent << "predicate: ";
00232 Printer<uint8_t>::stream(s, indent + " ", v.predicate);
00233 s << indent << "args[]" << std::endl;
00234 for (size_t i = 0; i < v.args.size(); ++i)
00235 {
00236 s << indent << " args[" << i << "]: ";
00237 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.args[i]);
00238 }
00239 }
00240 };
00241
00242
00243 }
00244 }
00245
00246 #endif // WAREHOUSE_MESSAGE_CONDITION_H
00247