header_deprecated_def.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2009, Willow Garage, Inc.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions are met:
6  * * Redistributions of source code must retain the above copyright notice,
7  * this list of conditions and the following disclaimer.
8  * * Redistributions in binary form must reproduce the above copyright
9  * notice, this list of conditions and the following disclaimer in the
10  * documentation and/or other materials provided with the distribution.
11  * * Neither the names of Willow Garage, Inc. nor the names of its
12  * contributors may be used to endorse or promote products derived from
13  * this software without specific prior written permission.
14  *
15  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
16  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
19  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
20  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
21  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
23  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
24  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
25  * POSSIBILITY OF SUCH DAMAGE.
26  */
27 
28 #ifndef STD_MSGS_INCLUDING_HEADER_DEPRECATED_DEF
29 #error("Do not include this file directly. Instead, include std_msgs/Header.h")
30 #endif
31 
32 namespace roslib
33 {
34 template <class ContainerAllocator>
35 struct Header_ : public std_msgs::Header_<ContainerAllocator>
36 {
38 
40  {
41  }
42 
43  ROS_DEPRECATED Header_(const ContainerAllocator& _alloc)
44  : std_msgs::Header_<ContainerAllocator>(_alloc)
45  {
46  }
47 
48  ROS_DEPRECATED Header_(const std_msgs::Header_<ContainerAllocator>& rhs)
49  {
50  *this = rhs;
51  }
52 
53  ROS_DEPRECATED Type& operator=(const std_msgs::Header_<ContainerAllocator>& rhs)
54  {
55  if (this == &rhs)
56  return *this;
57  this->seq = rhs.seq;
58  this->stamp = rhs.stamp;
59  this->frame_id = rhs.frame_id;
60  return *this;
61  }
62 
63  ROS_DEPRECATED operator std_msgs::Header_<ContainerAllocator>()
64  {
65  std_msgs::Header_<ContainerAllocator> h;
66  h.seq = this->seq;
67  h.stamp = this->stamp;
68  h.frame_id = this->frame_id;
69  return h;
70  }
71 
72 private:
73  static const char* __s_getDataType_() { return "roslib/Header"; }
74 public:
75  static const std::string __s_getDataType() { return __s_getDataType_(); }
76 
77  const std::string __getDataType() const { return __s_getDataType_(); }
78 
79 private:
80  static const char* __s_getMD5Sum_() { return "2176decaecbce78abc3b96ef049fabed"; }
81 public:
82  static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
83 
84  const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
85 
86 private:
87  static const char* __s_getMessageDefinition_() { return "# Standard metadata for higher-level stamped data types.\n\
88 # This is generally used to communicate timestamped data \n\
89 # in a particular coordinate frame.\n\
90 # \n\
91 # sequence ID: consecutively increasing ID \n\
92 uint32 seq\n\
93 #Two-integer timestamp that is expressed as:\n\
94 # * stamp.secs: seconds (stamp_secs) since epoch\n\
95 # * stamp.nsecs: nanoseconds since stamp_secs\n\
96 # time-handling sugar is provided by the client library\n\
97 time stamp\n\
98 #Frame this data is associated with\n\
99 # 0: no frame\n\
100 # 1: global frame\n\
101 string frame_id\n\
102 \n\
103 "; }
104 public:
105  static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
106 
107  const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
108 
109  virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
110  {
111  ros::serialization::OStream stream(write_ptr, 1000000000);
112  ros::serialization::serialize(stream, this->seq);
113  ros::serialization::serialize(stream, this->stamp);
114  ros::serialization::serialize(stream, this->frame_id);
115  return stream.getData();
116  }
117 
118  virtual uint8_t *deserialize(uint8_t *read_ptr)
119  {
120  ros::serialization::IStream stream(read_ptr, 1000000000);
121  ros::serialization::deserialize(stream, this->seq);
122  ros::serialization::deserialize(stream, this->stamp);
123  ros::serialization::deserialize(stream, this->frame_id);
124  return stream.getData();
125  }
126 
127  virtual uint32_t serializationLength() const
128  {
129  uint32_t size = 0;
130  size += ros::serialization::serializationLength(this->seq);
131  size += ros::serialization::serializationLength(this->stamp);
132  size += ros::serialization::serializationLength(this->frame_id);
133  return size;
134  }
135 
138 }; // struct Header
139 typedef ::roslib::Header_<std::allocator<void> > Header;
140 
143 
144 
145 template<typename ContainerAllocator>
146 std::ostream& operator<<(std::ostream& s, const ::roslib::Header_<ContainerAllocator> & v)
147 {
149  return s;}
150 
151 } // namespace roslib
152 
153 namespace ros
154 {
155 namespace message_traits
156 {
157 template<class ContainerAllocator>
158 struct MD5Sum< ::roslib::Header_<ContainerAllocator> > {
159  static const char* value()
160  {
161  return "2176decaecbce78abc3b96ef049fabed";
162  }
163 
164  static const char* value(const ::roslib::Header_<ContainerAllocator> &) { return value(); }
165  static const uint64_t static_value1 = 0x2176decaecbce78aULL;
166  static const uint64_t static_value2 = 0xbc3b96ef049fabedULL;
167 };
168 
169 template<class ContainerAllocator>
170 struct DataType< ::roslib::Header_<ContainerAllocator> > {
171  static const char* value()
172  {
173  return "roslib/Header";
174  }
175 
176  static const char* value(const ::roslib::Header_<ContainerAllocator> &) { return value(); }
177 };
178 
179 template<class ContainerAllocator>
180 struct Definition< ::roslib::Header_<ContainerAllocator> > {
181  static const char* value()
182  {
183  return "# Standard metadata for higher-level stamped data types.\n\
184 # This is generally used to communicate timestamped data \n\
185 # in a particular coordinate frame.\n\
186 # \n\
187 # sequence ID: consecutively increasing ID \n\
188 uint32 seq\n\
189 #Two-integer timestamp that is expressed as:\n\
190 # * stamp.secs: seconds (stamp_secs) since epoch\n\
191 # * stamp.nsecs: nanoseconds since stamp_secs\n\
192 # time-handling sugar is provided by the client library\n\
193 time stamp\n\
194 #Frame this data is associated with\n\
195 # 0: no frame\n\
196 # 1: global frame\n\
197 string frame_id\n\
198 \n\
199 ";
200  }
201 
202  static const char* value(const ::roslib::Header_<ContainerAllocator> &) { return value(); }
203 };
204 
205 } // namespace message_traits
206 } // namespace ros
207 
208 namespace ros
209 {
210 namespace serialization
211 {
212 
213 template<class ContainerAllocator> struct Serializer< ::roslib::Header_<ContainerAllocator> >
214 {
215  template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
216  {
217  stream.next(m.seq);
218  stream.next(m.stamp);
219  stream.next(m.frame_id);
220  }
221 
223 }; // struct Header_
224 } // namespace serialization
225 } // namespace ros
226 
227 namespace ros
228 {
229 namespace message_operations
230 {
231 
232 template<class ContainerAllocator>
233 struct Printer< ::roslib::Header_<ContainerAllocator> >
234 {
235  template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::roslib::Header_<ContainerAllocator> & v)
236  {
237  s << indent << "seq: ";
238  Printer<uint32_t>::stream(s, indent + " ", v.seq);
239  s << indent << "stamp: ";
240  Printer<ros::Time>::stream(s, indent + " ", v.stamp);
241  s << indent << "frame_id: ";
242  Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.frame_id);
243  }
244 };
245 
246 
247 } // namespace message_operations
248 } // namespace ros
249 
virtual uint8_t * deserialize(uint8_t *read_ptr)
virtual uint32_t serializationLength() const
static const char * __s_getMessageDefinition_()
static const char * __s_getMD5Sum_()
static const char * value(const ::roslib::Header_< ContainerAllocator > &)
static const char * value(const ::roslib::Header_< ContainerAllocator > &)
static const char * __s_getDataType_()
static const std::string __s_getMD5Sum()
static const std::string __s_getMessageDefinition()
ROS_DEPRECATED Header_(const std_msgs::Header_< ContainerAllocator > &rhs)
boost::shared_ptr< ::roslib::Header > HeaderPtr
void serialize(Stream &stream, const T &t)
const std::string __getMD5Sum() const
static const std::string __s_getDataType()
::roslib::Header_< std::allocator< void > > Header
const std::string __getMessageDefinition() const
#define ROS_DEPRECATED
boost::shared_ptr< ::roslib::Header const > HeaderConstPtr
ROS_DEPRECATED Header_(const ContainerAllocator &_alloc)
static void stream(Stream &s, const std::string &indent, const ::roslib::Header_< ContainerAllocator > &v)
virtual uint8_t * serialize(uint8_t *write_ptr, uint32_t seq) const
uint32_t serializationLength(const T &t)
ROS_DEPRECATED Header_()
Header_< ContainerAllocator > Type
const std::string __getDataType() const
boost::shared_ptr< ::roslib::Header_< ContainerAllocator > const > ConstPtr
ROS_DEPRECATED Type & operator=(const std_msgs::Header_< ContainerAllocator > &rhs)
void deserialize(Stream &stream, T &t)
boost::shared_ptr< ::roslib::Header_< ContainerAllocator > > Ptr
static const char * value(const ::roslib::Header_< ContainerAllocator > &)


std_msgs
Author(s): Morgan Quigley , Ken Conley , Jeremy Leibs , Tully Foote
autogenerated on Wed Oct 28 2020 03:43:30