00001
00002 #ifndef APP_MANAGER_MESSAGE_ICON_H
00003 #define APP_MANAGER_MESSAGE_ICON_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 app_manager
00015 {
00016 template <class ContainerAllocator>
00017 struct Icon_ : public ros::Message
00018 {
00019 typedef Icon_<ContainerAllocator> Type;
00020
00021 Icon_()
00022 : format()
00023 , data()
00024 {
00025 }
00026
00027 Icon_(const ContainerAllocator& _alloc)
00028 : format(_alloc)
00029 , data(_alloc)
00030 {
00031 }
00032
00033 typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > _format_type;
00034 std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > format;
00035
00036 typedef std::vector<uint8_t, typename ContainerAllocator::template rebind<uint8_t>::other > _data_type;
00037 std::vector<uint8_t, typename ContainerAllocator::template rebind<uint8_t>::other > data;
00038
00039
00040 ROS_DEPRECATED uint32_t get_data_size() const { return (uint32_t)data.size(); }
00041 ROS_DEPRECATED void set_data_size(uint32_t size) { data.resize((size_t)size); }
00042 ROS_DEPRECATED void get_data_vec(std::vector<uint8_t, typename ContainerAllocator::template rebind<uint8_t>::other > & vec) const { vec = this->data; }
00043 ROS_DEPRECATED void set_data_vec(const std::vector<uint8_t, typename ContainerAllocator::template rebind<uint8_t>::other > & vec) { this->data = vec; }
00044 private:
00045 static const char* __s_getDataType_() { return "app_manager/Icon"; }
00046 public:
00047 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00048
00049 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00050
00051 private:
00052 static const char* __s_getMD5Sum_() { return "e378a502c24c5aa2af7065d57c580d12"; }
00053 public:
00054 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00055
00056 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00057
00058 private:
00059 static const char* __s_getMessageDefinition_() { return "# Image data format. \"jpeg\" or \"png\"\n\
00060 string format\n\
00061 \n\
00062 # Image data.\n\
00063 uint8[] data\n\
00064 \n\
00065 "; }
00066 public:
00067 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00068
00069 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00070
00071 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00072 {
00073 ros::serialization::OStream stream(write_ptr, 1000000000);
00074 ros::serialization::serialize(stream, format);
00075 ros::serialization::serialize(stream, data);
00076 return stream.getData();
00077 }
00078
00079 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00080 {
00081 ros::serialization::IStream stream(read_ptr, 1000000000);
00082 ros::serialization::deserialize(stream, format);
00083 ros::serialization::deserialize(stream, data);
00084 return stream.getData();
00085 }
00086
00087 ROS_DEPRECATED virtual uint32_t serializationLength() const
00088 {
00089 uint32_t size = 0;
00090 size += ros::serialization::serializationLength(format);
00091 size += ros::serialization::serializationLength(data);
00092 return size;
00093 }
00094
00095 typedef boost::shared_ptr< ::app_manager::Icon_<ContainerAllocator> > Ptr;
00096 typedef boost::shared_ptr< ::app_manager::Icon_<ContainerAllocator> const> ConstPtr;
00097 };
00098 typedef ::app_manager::Icon_<std::allocator<void> > Icon;
00099
00100 typedef boost::shared_ptr< ::app_manager::Icon> IconPtr;
00101 typedef boost::shared_ptr< ::app_manager::Icon const> IconConstPtr;
00102
00103
00104 template<typename ContainerAllocator>
00105 std::ostream& operator<<(std::ostream& s, const ::app_manager::Icon_<ContainerAllocator> & v)
00106 {
00107 ros::message_operations::Printer< ::app_manager::Icon_<ContainerAllocator> >::stream(s, "", v);
00108 return s;}
00109
00110 }
00111
00112 namespace ros
00113 {
00114 namespace message_traits
00115 {
00116 template<class ContainerAllocator>
00117 struct MD5Sum< ::app_manager::Icon_<ContainerAllocator> > {
00118 static const char* value()
00119 {
00120 return "e378a502c24c5aa2af7065d57c580d12";
00121 }
00122
00123 static const char* value(const ::app_manager::Icon_<ContainerAllocator> &) { return value(); }
00124 static const uint64_t static_value1 = 0xe378a502c24c5aa2ULL;
00125 static const uint64_t static_value2 = 0xaf7065d57c580d12ULL;
00126 };
00127
00128 template<class ContainerAllocator>
00129 struct DataType< ::app_manager::Icon_<ContainerAllocator> > {
00130 static const char* value()
00131 {
00132 return "app_manager/Icon";
00133 }
00134
00135 static const char* value(const ::app_manager::Icon_<ContainerAllocator> &) { return value(); }
00136 };
00137
00138 template<class ContainerAllocator>
00139 struct Definition< ::app_manager::Icon_<ContainerAllocator> > {
00140 static const char* value()
00141 {
00142 return "# Image data format. \"jpeg\" or \"png\"\n\
00143 string format\n\
00144 \n\
00145 # Image data.\n\
00146 uint8[] data\n\
00147 \n\
00148 ";
00149 }
00150
00151 static const char* value(const ::app_manager::Icon_<ContainerAllocator> &) { return value(); }
00152 };
00153
00154 }
00155 }
00156
00157 namespace ros
00158 {
00159 namespace serialization
00160 {
00161
00162 template<class ContainerAllocator> struct Serializer< ::app_manager::Icon_<ContainerAllocator> >
00163 {
00164 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00165 {
00166 stream.next(m.format);
00167 stream.next(m.data);
00168 }
00169
00170 ROS_DECLARE_ALLINONE_SERIALIZER;
00171 };
00172 }
00173 }
00174
00175 namespace ros
00176 {
00177 namespace message_operations
00178 {
00179
00180 template<class ContainerAllocator>
00181 struct Printer< ::app_manager::Icon_<ContainerAllocator> >
00182 {
00183 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::app_manager::Icon_<ContainerAllocator> & v)
00184 {
00185 s << indent << "format: ";
00186 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.format);
00187 s << indent << "data[]" << std::endl;
00188 for (size_t i = 0; i < v.data.size(); ++i)
00189 {
00190 s << indent << " data[" << i << "]: ";
00191 Printer<uint8_t>::stream(s, indent + " ", v.data[i]);
00192 }
00193 }
00194 };
00195
00196
00197 }
00198 }
00199
00200 #endif // APP_MANAGER_MESSAGE_ICON_H
00201