CARLA
 
载入中...
搜索中...
未找到
Clock.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 Clock.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_ROSGRAPH_MSG_CLOCK_H_
23#define _FAST_DDS_GENERATED_ROSGRAPH_MSG_CLOCK_H_
24// 条件编译预处理指令,用于防止头文件被重复包含。如果未定义_FAST_DDS_GENERATED_ROSGRAPH_MSG_CLOCK_H_这个宏,
25// 则下面的代码内容会被编译,直到遇到#endif,若已定义该宏,则这段代码会被跳过,避免重复定义导致的编译错误。
26#include "Time.h"
27// 包含名为“Time.h”的头文件,可能是引入和时间相关的数据结构、函数等定义,用于当前类的实现或与之相关的操作。
28#include <fastrtps/utils/fixed_size_string.hpp>
29// 引入FastRTPS库中用于处理固定大小字符串的工具头文件,也许在当前类中会使用到相关功能来处理字符串数据。
30#include <stdint.h>
31#include <array>
32#include <string>
33#include <vector>
34#include <map>
35#include <bitset>
36
37#if defined(_WIN32)
38#if defined(EPROSIMA_USER_DLL_EXPORT)
39#define eProsima_user_DllExport __declspec( dllexport )
40#else
41#define eProsima_user_DllExport
42#endif // EPROSIMA_USER_DLL_EXPORT
43#else
44#define eProsima_user_DllExport
45#endif // _WIN32
46
47#if defined(_WIN32)
48#if defined(EPROSIMA_USER_DLL_EXPORT)
49#if defined(CLOCK_SOURCE)
50#define CLOCK_DllAPI __declspec( dllexport )
51#else
52#define CLOCK_DllAPI __declspec( dllimport )
53#endif // CLOCK_SOURCE
54#else
55#define CLOCK_DllAPI
56#endif // EPROSIMA_USER_DLL_EXPORT
57#else
58#define CLOCK_DllAPI
59#endif // _WIN32
60
61namespace eprosima {
62namespace fastcdr {
63class Cdr;
64} // namespace fastcdr
65} // namespace eprosima
66
67namespace rosgraph {
68 namespace msg {
69 /*!
70 * @brief This class represents the structure Clock defined by the user in the IDL file.
71 * @ingroup Clock
72 */
73 class Clock
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 rosgraph::msg::Clock that will be copied.
90 */
92 const Clock& x);
93
94 /*!
95 * @brief Move constructor.
96 * @param x Reference to the object rosgraph::msg::Clock that will be copied.
97 */
99 Clock&& x) noexcept;
100
101 /*!
102 * @brief Copy assignment.
103 * @param x Reference to the object rosgraph::msg::Clock that will be copied.
104 */
106 const Clock& x);
107
108 /*!
109 * @brief Move assignment.
110 * @param x Reference to the object rosgraph::msg::Clock that will be copied.
111 */
113 Clock&& x) noexcept;
114
115 /*!
116 * @brief Comparison operator.
117 * @param x rosgraph::msg::Clock object to compare.
118 */
120 const Clock& x) const;
121
122 /*!
123 * @brief Comparison operator.
124 * @param x rosgraph::msg::Clock object to compare.
125 */
127 const Clock& x) const;
128
129 /*!
130 * @brief This function copies the value in member clock
131 * @param _clock New value to be copied in member clock
132 */
134 const builtin_interfaces::msg::Time& _clock);
135
136 /*!
137 * @brief This function moves the value in member clock
138 * @param _clock New value to be moved in member clock
139 */
142
143 /*!
144 * @brief This function returns a constant reference to member clock
145 * @return Constant reference to member clock
146 */
148
149 /*!
150 * @brief This function returns a reference to member clock
151 * @return Reference to member clock
152 */
154
155 /*!
156 * @brief This function returns the maximum serialized size of an object
157 * depending on the buffer alignment.
158 * @param current_alignment Buffer alignment.
159 * @return Maximum serialized size.
160 */
162 size_t current_alignment = 0);
163
164 /*!
165 * @brief This function returns the serialized size of a data depending on the buffer alignment.
166 * @param data Data which is calculated its serialized size.
167 * @param current_alignment Buffer alignment.
168 * @return Serialized size.
169 */
171 const rosgraph::msg::Clock& data,
172 size_t current_alignment = 0);
173
174 /*!
175 * @brief This function serializes an object using CDR serialization.
176 * @param cdr CDR serialization object.
177 */
179 eprosima::fastcdr::Cdr& cdr) const;
180
181 /*!
182 * @brief This function deserializes an object using CDR serialization.
183 * @param cdr CDR serialization object.
184 */
186 eprosima::fastcdr::Cdr& cdr);
187
188 /*!
189 * @brief This function returns the maximum serialized size of the Key of an object
190 * depending on the buffer alignment.
191 * @param current_alignment Buffer alignment.
192 * @return Maximum serialized size.
193 */
195 size_t current_alignment = 0);
196
197 /*!
198 * @brief This function tells you if the Key has been defined for this type
199 */
201
202 /*!
203 * @brief This function serializes the key members of an object using CDR serialization.
204 * @param cdr CDR serialization object.
205 */
207 eprosima::fastcdr::Cdr& cdr) const;
208
209 private:
211 };
212 } // namespace msg
213} // namespace rosgraph
214
215#endif // _FAST_DDS_GENERATED_ROSGRAPH_MSG_CLOCK_H_
#define eProsima_user_DllExport
Definition CameraInfo.h:44
此类表示用户在IDL文件中定义的Time结构。
This class represents the structure Clock defined by the user in the IDL file.
Definition Clock.h:74
eProsima_user_DllExport Clock & operator=(const Clock &x)
Copy assignment.
Definition Clock.cpp:68
eProsima_user_DllExport void serializeKey(eprosima::fastcdr::Cdr &cdr) const
This function serializes the key members of an object using CDR serialization.
Definition Clock.cpp:186
static eProsima_user_DllExport size_t getKeyMaxCdrSerializedSize(size_t current_alignment=0)
This function returns the maximum serialized size of the Key of an object depending on the buffer ali...
Definition Clock.cpp:172
static eProsima_user_DllExport size_t getMaxCdrSerializedSize(size_t current_alignment=0)
This function returns the maximum serialized size of an object depending on the buffer alignment.
Definition Clock.cpp:98
eProsima_user_DllExport void deserialize(eprosima::fastcdr::Cdr &cdr)
This function deserializes an object using CDR serialization.
Definition Clock.cpp:127
eProsima_user_DllExport const builtin_interfaces::msg::Time & clock() const
This function returns a constant reference to member clock
Definition Clock.cpp:157
eProsima_user_DllExport ~Clock()
Default destructor.
Definition Clock.cpp:49
builtin_interfaces::msg::Time m_clock
Definition Clock.h:210
eProsima_user_DllExport void serialize(eprosima::fastcdr::Cdr &cdr) const
This function serializes an object using CDR serialization.
Definition Clock.cpp:120
static eProsima_user_DllExport bool isKeyDefined()
This function tells you if the Key has been defined for this type
Definition Clock.cpp:180
eProsima_user_DllExport bool operator!=(const Clock &x) const
Comparison operator.
Definition Clock.cpp:91
eProsima_user_DllExport Clock()
Default constructor.
Definition Clock.cpp:44
static eProsima_user_DllExport size_t getCdrSerializedSize(const rosgraph::msg::Clock &data, size_t current_alignment=0)
This function returns the serialized size of a data depending on the buffer alignment.
Definition Clock.cpp:106
eProsima_user_DllExport bool operator==(const Clock &x) const
Comparison operator.
Definition Clock.cpp:84