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 
49  {
50  *this = rhs;
51  }
52 
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 
64  {
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:
106 
108 
109  virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
110  {
111  rs2rosinternal::serialization::OStream stream(write_ptr, 1000000000);
112  rs2rosinternal::serialization::serialize(stream, this->seq);
115  return stream.getData();
116  }
117 
118  virtual uint8_t *deserialize(uint8_t *read_ptr)
119  {
120  rs2rosinternal::serialization::IStream stream(read_ptr, 1000000000);
124  return stream.getData();
125  }
126 
128  {
129  uint32_t size = 0;
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 rs2rosinternal
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 rs2rosinternal
207 
208 namespace rs2rosinternal
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 rs2rosinternal
226 
227 namespace rs2rosinternal
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<rs2rosinternal::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 rs2rosinternal
249 
virtual uint8_t * deserialize(uint8_t *read_ptr)
void serialize(Stream &stream, const T &t)
Serialize an object. Stream here should normally be a rs2rosinternal::serialization::OStream.
GLdouble s
virtual uint32_t serializationLength() const
const GLfloat * m
Definition: glext.h:6814
Specialize to provide the md5sum for a message.
static void stream(Stream &s, const std::string &indent, const ::roslib::Header_< ContainerAllocator > &v)
static const char * __s_getMessageDefinition_()
static const char * __s_getMD5Sum_()
#define ROS_DEPRECATED
static const char * __s_getDataType_()
GLsizei const GLchar *const * string
Specialize to provide the datatype for a message.
GLuint GLuint stream
Definition: glext.h:1790
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:1960
unsigned char uint8_t
Definition: stdint.h:78
Definition: context.cpp:29
static const char * value(const ::roslib::Header_< ContainerAllocator > &)
static const std::string __s_getMD5Sum()
static const char * value(const ::roslib::Header_< ContainerAllocator > &)
Stream base-class, provides common functionality for IStream and OStream.
static const std::string __s_getMessageDefinition()
ROS_DEPRECATED Header_(const std_msgs::Header_< ContainerAllocator > &rhs)
void deserialize(Stream &stream, T &t)
Deserialize an object. Stream here should normally be a rs2rosinternal::serialization::IStream.
GLsizeiptr size
boost::shared_ptr< ::roslib::Header > HeaderPtr
unsigned int uint32_t
Definition: stdint.h:80
_seq_type seq
Definition: Header.h:41
#define ROS_DECLARE_ALLINONE_SERIALIZER
Declare your serializer to use an allInOne member instead of requiring 3 different serialization func...
Definition: Bool.h:19
unsigned __int64 uint64_t
Definition: stdint.h:90
const std::string __getMD5Sum() const
Specialize to provide the definition for a message.
static const char * value(const ::roslib::Header_< ContainerAllocator > &)
uint32_t serializationLength(const T &t)
Determine the serialized length of an object.
static const std::string __s_getDataType()
::roslib::Header_< std::allocator< void > > Header
const std::string __getMessageDefinition() const
boost::shared_ptr< ::roslib::Header const > HeaderConstPtr
ROS_DEPRECATED Header_(const ContainerAllocator &_alloc)
virtual uint8_t * serialize(uint8_t *write_ptr, uint32_t seq) const
ROS_DEPRECATED Header_()
_frame_id_type frame_id
Definition: Header.h:47
Header_< ContainerAllocator > Type
_stamp_type stamp
Definition: Header.h:44
const std::string __getDataType() const
Templated serialization class. Default implementation provides backwards compatibility with old messa...
boost::shared_ptr< ::roslib::Header_< ContainerAllocator > const > ConstPtr
ROS_DEPRECATED Type & operator=(const std_msgs::Header_< ContainerAllocator > &rhs)
boost::shared_ptr< ::roslib::Header_< ContainerAllocator > > Ptr
GLdouble v


librealsense2
Author(s): Sergey Dorodnicov , Doron Hirshberg , Mark Horn , Reagan Lopez , Itay Carpis
autogenerated on Mon May 3 2021 02:47:16