CARLA
 
载入中...
搜索中...
未找到
Header.h
浏览该文件的文档.
1// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima).
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15/*!
16 * @file Header.h
17 * This header file contains the declaration of the described types in the IDL file.
18 *
19 * This file was generated by the tool gen.
20 */
21
22#ifndef _FAST_DDS_GENERATED_STD_MSGS_MSG_HEADER_H_
23#define _FAST_DDS_GENERATED_STD_MSGS_MSG_HEADER_H_
24// 包含Time.h头文件,可能是用于处理时间相关的数据结构或操作,具体依赖于该头文件的定义内容
25#include "Time.h"
26// 包含fastrtps库中用于固定大小字符串的头文件,可能提供了一些特定的字符串处理功能,适用于特定场景下的内存管理等需求
27#include <fastrtps/utils/fixed_size_string.hpp>
28// 引入C++标准库中的一些常用头文件,用于支持不同的数据类型和容器操作
29#include <stdint.h>
30#include <array>
31#include <string>
32#include <vector>
33#include <map>
34#include <bitset>
35
36#if defined(_WIN32)
37#if defined(EPROSIMA_USER_DLL_EXPORT)
38#define eProsima_user_DllExport __declspec( dllexport )
39#else
40#define eProsima_user_DllExport
41#endif // EPROSIMA_USER_DLL_EXPORT
42#else
43#define eProsima_user_DllExport
44#endif // _WIN32
45
46#if defined(_WIN32)
47#if defined(EPROSIMA_USER_DLL_EXPORT)
48#if defined(Header_SOURCE)
49#define Header_DllAPI __declspec( dllexport )
50#else
51#define Header_DllAPI __declspec( dllimport )
52#endif // Header_SOURCE
53#else
54#define Header_DllAPI
55#endif // EPROSIMA_USER_DLL_EXPORT
56#else
57#define Header_DllAPI
58#endif // _WIN32
59
60namespace eprosima {
61namespace fastcdr {
62class Cdr;
63} // namespace fastcdr
64} // namespace eprosima
65// 定义在std_msgs命名空间下的msg命名空间中,用于组织相关的消息类型定义,避免命名冲突
66namespace std_msgs {
67namespace std_msgs {
68 namespace msg {
69 /*!
70 * @brief This class represents the structure Header defined by the user in the IDL file.
71 * @ingroup HEADER
72 */
73 class Header
74 {
75 public:
76
77 /*!
78 * @brief Default constructor.
79 */
81
82 /*!
83 * @brief Default destructor.
84 */
86
87 /*!
88 * @brief Copy constructor.
89 * @param x Reference to the object std_msgs::msg::Header that will be copied.
90 */
92 const Header& x);
93
94 /*!
95 * @brief Move constructor.
96 * @param x Reference to the object std_msgs::msg::Header that will be copied.
97 */
99 Header&& x) noexcept;
100
101 /*!
102 * @brief Copy assignment.
103 * @param x Reference to the object std_msgs::msg::Header that will be copied.
104 */
106 const Header& x);
107
108 /*!
109 * @brief Move assignment.
110 * @param x Reference to the object std_msgs::msg::Header that will be copied.
111 */
113 Header&& x) noexcept;
114
115 /*!
116 * @brief Comparison operator.
117 * @param x std_msgs::msg::Header object to compare.
118 */
119 eProsima_user_DllExport bool operator ==(
120 const Header& x) const;
121
122 /*!
123 * @brief Comparison operator.
124 * @param x std_msgs::msg::Header object to compare.
125 */
126 eProsima_user_DllExport bool operator !=(
127 const Header& x) const;
128
129 /*!
130 * @brief This function copies the value in member stamp
131 * @param _stamp New value to be copied in member stamp
132 */
133 eProsima_user_DllExport void stamp(
134 const builtin_interfaces::msg::Time& _stamp);
135
136 /*!
137 * @brief This function moves the value in member stamp
138 * @param _stamp New value to be moved in member stamp
139 */
140 eProsima_user_DllExport void stamp(
142
143 /*!
144 * @brief This function returns a constant reference to member stamp
145 * @return Constant reference to member stamp
146 */
148
149 /*!
150 * @brief This function returns a reference to member stamp
151 * @return Reference to member stamp
152 */
154 /*!
155 * @brief This function copies the value in member frame_id
156 * @param _frame_id New value to be copied in member frame_id
157 */
158 eProsima_user_DllExport void frame_id(
159 const std::string& _frame_id);
160
161 /*!
162 * @brief This function moves the value in member frame_id
163 * @param _frame_id New value to be moved in member frame_id
164 */
165 eProsima_user_DllExport void frame_id(
166 std::string&& _frame_id);
167
168 /*!
169 * @brief This function returns a constant reference to member frame_id
170 * @return Constant reference to member frame_id
171 */
172 eProsima_user_DllExport const std::string& frame_id() const;
173
174 /*!
175 * @brief This function returns a reference to member frame_id
176 * @return Reference to member frame_id
177 */
178 eProsima_user_DllExport std::string& frame_id();
179
180 /*!
181 * @brief This function returns the maximum serialized size of an object
182 * depending on the buffer alignment.
183 * @param current_alignment Buffer alignment.
184 * @return Maximum serialized size.
185 */
186 eProsima_user_DllExport static size_t getMaxCdrSerializedSize(
187 size_t current_alignment = 0);
188
189 /*!
190 * @brief This function returns the serialized size of a data depending on the buffer alignment.
191 * @param data Data which is calculated its serialized size.
192 * @param current_alignment Buffer alignment.
193 * @return Serialized size.
194 */
195 eProsima_user_DllExport static size_t getCdrSerializedSize(
196 const std_msgs::msg::Header& data,
197 size_t current_alignment = 0);
198
199 /*!
200 * @brief This function serializes an object using CDR serialization.
201 * @param cdr CDR serialization object.
202 */
203 eProsima_user_DllExport void serialize(
204 eprosima::fastcdr::Cdr& cdr) const;
205
206 /*!
207 * @brief This function deserializes an object using CDR serialization.
208 * @param cdr CDR serialization object.
209 */
210 eProsima_user_DllExport void deserialize(
211 eprosima::fastcdr::Cdr& cdr);
212
213 /*!
214 * @brief This function returns the maximum serialized size of the Key of an object
215 * depending on the buffer alignment.
216 * @param current_alignment Buffer alignment.
217 * @return Maximum serialized size.
218 */
219 eProsima_user_DllExport static size_t getKeyMaxCdrSerializedSize(
220 size_t current_alignment = 0);
221
222 /*!
223 * @brief This function tells you if the Key has been defined for this type
224 */
225 eProsima_user_DllExport static bool isKeyDefined();
226
227 /*!
228 * @brief This function serializes the key members of an object using CDR serialization.
229 * @param cdr CDR serialization object.
230 */
231 eProsima_user_DllExport void serializeKey(
232 eprosima::fastcdr::Cdr& cdr) const;
233
234 private: // 定义成员变量m_stamp,用于存储时间相关的信息,类型为builtin_interfaces::msg::Time,具体含义和用途依赖于该类型的定义
235 builtin_interfaces::msg::Time m_stamp; // 定义成员变量m_frame_id,用于存储一个字符串标识信息,例如可能表示消息所属的框架等相关标识,类型为std::string
236 std::string m_frame_id;
237 };
238 } // namespace msg
239} // namespace std_msgs
240
241#endif // _FAST_DDS_GENERATED_STD_MSGS_MSG_HEADER_H_
#define eProsima_user_DllExport
Definition CameraInfo.h:44
ConcurrentQueue & operator=(ConcurrentQueue const &) MOODYCAMEL_DELETE_FUNCTION
此类表示用户在IDL文件中定义的Time结构。