CARLA
 
载入中...
搜索中...
未找到
Vector3.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 Vector3.h
17 * 此头文件包含在 IDL 文件中描述的类型的声明。
18 *
19 * 此文件是由工具 gen 生成的。
20 */
21
22#ifndef _FAST_DDS_GENERATED_GEOMETRY_MSGS_MSG_VECTOR3_H_
23#define _FAST_DDS_GENERATED_GEOMETRY_MSGS_MSG_VECTOR3_H_
24
25#include <fastrtps/utils/fixed_size_string.hpp>// 包含固定大小字符串的定义
26
27#include <stdint.h>// 包含整数类型定义
28#include <array>// 包含数组的定义
29#include <string>// 包含字符串的定义
30#include <vector>// 包含向量的定义
31#include <map>// 包含映射的定义
32#include <bitset>// 包含位集的定义
33// Windows 平台下的 DLL 导出宏定义
34#if defined(_WIN32)
35#if defined(EPROSIMA_USER_DLL_EXPORT)
36#define eProsima_user_DllExport __declspec( dllexport )// 导出符号
37#else
38#define eProsima_user_DllExport// 不导出符号
39#endif // EPROSIMA_USER_DLL_EXPORT
40#else
41#define eProsima_user_DllExport// 不导出符号
42#endif // _WIN32
43// Windows 平台下的 Vector3 DLL 导出宏定义
44#if defined(_WIN32)
45#if defined(EPROSIMA_USER_DLL_EXPORT)
46#if defined(Vector3_SOURCE)
47#define Vector3_DllAPI __declspec( dllexport )// 导出符号
48#else
49#define Vector3_DllAPI __declspec( dllimport )// 导入符号
50#endif // Vector3_SOURCE
51#else
52#define Vector3_DllAPI// 不导出符号
53#endif // EPROSIMA_USER_DLL_EXPORT
54#else
55#define Vector3_DllAPI// 不导出符号
56#endif // _WIN32
57
58namespace eprosima {
59namespace fastcdr {
60class Cdr;// 前向声明 Cdr 类
61} // namespace fastcdr
62} // namespace eprosima
63
64
65namespace geometry_msgs {
66 namespace msg {
67 /*!
68 * @brief 此类表示用户在 IDL 文件中定义的 Vector3 结构。
69 * @ingroup VECTOR3
70 */
71 class Vector3
72 {
73 public:
74
75 /*!
76 * @brief 默认构造函数。
77 */
78
79 /*!
80 * @brief 默认析构函数。
81 */
83
84 /*!
85 * @brief 复制构造函数。
86 * @param x 要复制的 geometry_msgs::msg::Vector3 对象的引用。
87 */
89 const Vector3& x);
90
91 /*!
92 * @brief 移动构造函数。
93 * @param x 要移动的 geometry_msgs::msg::Vector3 对象的引用。
94 */
96 Vector3&& x) noexcept;
97
98 /*!
99 * @brief 复制赋值运算符。
100 * @param x 要复制的 geometry_msgs::msg::Vector3 对象的引用。
101 */
103 const Vector3& x);
104
105 /*!
106 * @brief 移动赋值运算符。
107 * @param x 要移动的 geometry_msgs::msg::Vector3 对象的引用。
108 */
110 Vector3&& x) noexcept;
111
112 /*!
113 * @brief 比较运算符。
114 * @param x 要比较的 geometry_msgs::msg::Vector3 对象。
115 */
117 const Vector3& x) const;
118
119 /*!
120 * @brief 比较运算符。
121 * @param x 要比较的 geometry_msgs::msg::Vector3 对象。
122 */
124 const Vector3& x) const;
125
126 /*!
127 * @brief 设置成员 x 的值
128 * @param _x 成员 x 的新值
129 */
131 double _x);
132
133 /*!
134 * @brief 返回成员 x 的值
135 * @return 成员 x 的值
136 */
137 eProsima_user_DllExport double x() const;
138
139 /*!
140 * @brief 返回对成员 x 的引用
141 * @return 对成员 x 的引用
142 */
143 eProsima_user_DllExport double& x();
144
145 /*!
146 * @brief 设置成员 y 的值
147 * @param _y 成员 y 的新值
148 */
150 double _y);
151
152 /*!
153 * @brief 返回成员 y 的值
154 * @return 成员 y 的值
155 */
156 eProsima_user_DllExport double y() const;
157
158 /*!
159 * @brief 返回对成员 y 的引用
160 * @return 对成员 y 的引用
161 */
162 eProsima_user_DllExport double& y();
163
164 /*!
165 * @brief 设置成员 z 的值
166 * @param _z 成员 z 的新值
167 */
169 double _z);
170
171 /*!
172 * @brief 返回成员 z 的值
173 * @return 成员 z 的值
174 */
175 eProsima_user_DllExport double z() const;
176
177 /*!
178 * @brief 返回对成员 z 的引用
179 * @return 对成员 z 的引用
180 */
181 eProsima_user_DllExport double& z();
182
183 /*!
184 * @brief 此函数返回对象的最大序列化大小
185 * 取决于缓冲区对齐。
186 * @param current_alignment 缓冲区对齐。
187 * @return 最大序列化大小。
188 */
190 size_t current_alignment = 0);
191
192 /*!
193 * @brief 此函数返回数据的序列化大小
194 * 取决于缓冲区对齐。
195 * @param data 计算其序列化大小的数据。
196 * @param current_alignment 缓冲区对齐。
197 * @return 序列化大小。
198 */
200 const geometry_msgs::msg::Vector3& data,
201 size_t current_alignment = 0);
202
203 /*!
204 * @brief 此函数使用 CDR 序列化序列化对象。
205 * @param cdr CDR 序列化对象。
206 */
208 eprosima::fastcdr::Cdr& cdr) const;
209
210 /*!
211 * @brief 此函数使用 CDR 序列化反序列化对象。
212 * @param cdr CDR 序列化对象。
213 */
215 eprosima::fastcdr::Cdr& cdr);
216
217 /*!
218 * @brief 此函数返回对象键的最大序列化大小
219 * 取决于缓冲区对齐。
220 * @param current_alignment 缓冲区对齐。
221 * @return 最大序列化大小。
222 */
224 size_t current_alignment = 0);
225
226 /*!
227 * @brief 此函数告诉您此类型是否定义了键
228 */
230
231 /*!
232 * @brief 此函数使用 CDR 序列化序列化对象的键成员。
233 * @param cdr CDR 序列化对象。
234 */
236 eprosima::fastcdr::Cdr& cdr) const;
237
238 private:
239 double m_x;// 成员变量 x
240 double m_y;// 成员变量 y
241 double m_z;// 成员变量 z
242 };
243 } // namespace msg
244} // namespace geometry_msgs
245
246#endif // _FAST_DDS_GENERATED_GEOMETRY_MSGS_MSG_VECTOR3_H_
#define eProsima_user_DllExport
Definition CameraInfo.h:44
此类表示用户在 IDL 文件中定义的 Vector3 结构。 <>
Definition Vector3.h:72
eProsima_user_DllExport ~Vector3()
默认构造函数。
Definition Vector3.cpp:50
eProsima_user_DllExport void serializeKey(eprosima::fastcdr::Cdr &cdr) const
此函数使用 CDR 序列化序列化对象的键成员。
Definition Vector3.cpp:220
eProsima_user_DllExport bool operator==(const Vector3 &x) const
比较运算符。
Definition Vector3.cpp:91
eProsima_user_DllExport Vector3(const Vector3 &x)
复制构造函数。
Definition Vector3.cpp:54
static eProsima_user_DllExport size_t getCdrSerializedSize(const geometry_msgs::msg::Vector3 &data, size_t current_alignment=0)
此函数返回数据的序列化大小 取决于缓冲区对齐。
Definition Vector3.cpp:111
static eProsima_user_DllExport bool isKeyDefined()
此函数告诉您此类型是否定义了键
Definition Vector3.cpp:215
static eProsima_user_DllExport size_t getMaxCdrSerializedSize(size_t current_alignment=0)
此函数返回对象的最大序列化大小 取决于缓冲区对齐。
Definition Vector3.cpp:103
eProsima_user_DllExport double z() const
返回成员 z 的值
Definition Vector3.cpp:196
eProsima_user_DllExport double x() const
返回成员 x 的值
Definition Vector3.cpp:158
eProsima_user_DllExport void serialize(eprosima::fastcdr::Cdr &cdr) const
此函数使用 CDR 序列化序列化对象。
Definition Vector3.cpp:126
static eProsima_user_DllExport size_t getKeyMaxCdrSerializedSize(size_t current_alignment=0)
此函数返回对象键的最大序列化大小 取决于缓冲区对齐。
Definition Vector3.cpp:207
eProsima_user_DllExport void deserialize(eprosima::fastcdr::Cdr &cdr)
此函数使用 CDR 序列化反序列化对象。
Definition Vector3.cpp:137
eProsima_user_DllExport Vector3 & operator=(const Vector3 &x)
复制赋值运算符。
Definition Vector3.cpp:70
eProsima_user_DllExport double y() const
返回成员 y 的值
Definition Vector3.cpp:177
eProsima_user_DllExport bool operator!=(const Vector3 &x) const
比较运算符。
Definition Vector3.cpp:97