CARLA
 
载入中...
搜索中...
未找到
Float32.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 Float32.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_FLOAT32_H_
23#define _FAST_DDS_GENERATED_STD_MSGS_MSG_FLOAT32_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
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
44#if defined(_WIN32)
45#if defined(EPROSIMA_USER_DLL_EXPORT)
46#if defined(Float32_SOURCE)
47#define Float32_DllAPI __declspec( dllexport )
48#else
49#define Float32_DllAPI __declspec( dllimport )
50#endif // Float32_SOURCE
51#else
52#define Float32_DllAPI
53#endif // EPROSIMA_USER_DLL_EXPORT
54#else
55#define Float32_DllAPI
56#endif // _WIN32
57
58namespace eprosima {
59namespace fastcdr {
60class Cdr;
61} // namespace fastcdr
62} // namespace eprosima
63
64namespace std_msgs {
65 namespace msg {
66 /*!
67 * @brief This class represents the structure Float32 defined by the user in the IDL file.
68 * @ingroup FLOAT32
69 */
70 class Float32
71 {
72 public:
73 /*!
74 * @brief Default constructor.
75 */
77
78 /*!
79 * @brief Default destructor.
80 */
82
83 /*!
84 * @brief Copy constructor.
85 * @param x Reference to the object std_msgs::msg::Float32 that will be copied.
86 */
88 const Float32& x);
89
90 /*!
91 * @brief Move constructor.
92 * @param x Reference to the object std_msgs::msg::Float32 that will be copied.
93 */
95 Float32&& x) noexcept;
96
97 /*!
98 * @brief Copy assignment.
99 * @param x Reference to the object std_msgs::msg::Float32 that will be copied.
100 */
102 const Float32& x);
103
104 /*!
105 * @brief Move assignment.
106 * @param x Reference to the object std_msgs::msg::Float32 that will be copied.
107 */
109 Float32&& x) noexcept;
110
111 /*!
112 * @brief Comparison operator.
113 * @param x std_msgs::msg::Float32 object to compare.
114 */
116 const Float32& x) const;
117
118 /*!
119 * @brief Comparison operator.
120 * @param x std_msgs::msg::Float32 object to compare.
121 */
123 const Float32& x) const;
124
125 /*!
126 * @brief This function sets a value in member data
127 * @param _data New value for member data
128 */
130 float _data);
131
132 /*!
133 * @brief This function returns the value of member data
134 * @return Value of member data
135 */
136 eProsima_user_DllExport float data() const;
137
138 /*!
139 * @brief This function returns a reference to member data
140 * @return Reference to member data
141 */
143
144 /*!
145 * @brief This function returns the maximum serialized size of an object
146 * depending on the buffer alignment.
147 * @param current_alignment Buffer alignment.
148 * @return Maximum serialized size.
149 */
151 size_t current_alignment = 0);
152
153 /*!
154 * @brief This function returns the serialized size of a data depending on the buffer alignment.
155 * @param data Data which is calculated its serialized size.
156 * @param current_alignment Buffer alignment.
157 * @return Serialized size.
158 */
161 size_t current_alignment = 0);
162
163 /*!
164 * @brief This function serializes an object using CDR serialization.
165 * @param cdr CDR serialization object.
166 */
168 eprosima::fastcdr::Cdr& cdr) const;
169
170 /*!
171 * @brief This function deserializes an object using CDR serialization.
172 * @param cdr CDR serialization object.
173 */
175 eprosima::fastcdr::Cdr& cdr);
176
177 /*!
178 * @brief This function returns the maximum serialized size of the Key of an object
179 * depending on the buffer alignment.
180 * @param current_alignment Buffer alignment.
181 * @return Maximum serialized size.
182 */
184 size_t current_alignment = 0);
185
186 /*!
187 * @brief This function tells you if the Key has been defined for this type
188 */
190
191 /*!
192 * @brief This function serializes the key members of an object using CDR serialization.
193 * @param cdr CDR serialization object.
194 */
196 eprosima::fastcdr::Cdr& cdr) const;
197
198 private:
199 float m_data;
200 };
201 } // namespace msg
202} // namespace std_msgs
203
204#endif // _FAST_DDS_GENERATED_STD_MSGS_MSG_FLOAT32_H_
#define eProsima_user_DllExport
Definition CameraInfo.h:44
This class represents the structure Float32 defined by the user in the IDL file.
Definition Float32.h:71
eProsima_user_DllExport ~Float32()
Default destructor.
Definition Float32.cpp:45
eProsima_user_DllExport void deserialize(eprosima::fastcdr::Cdr &cdr)
This function deserializes an object using CDR serialization.
Definition Float32.cpp:110
eProsima_user_DllExport Float32 & operator=(const Float32 &x)
Copy assignment.
Definition Float32.cpp:61
eProsima_user_DllExport bool operator==(const Float32 &x) const
Comparison operator.
Definition Float32.cpp:75
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 Float32.cpp:144
static eProsima_user_DllExport size_t getCdrSerializedSize(const std_msgs::msg::Float32 &data, size_t current_alignment=0)
This function returns the serialized size of a data depending on the buffer alignment.
Definition Float32.cpp:94
static eProsima_user_DllExport bool isKeyDefined()
This function tells you if the Key has been defined for this type
Definition Float32.cpp:151
eProsima_user_DllExport void serialize(eprosima::fastcdr::Cdr &cdr) const
This function serializes an object using CDR serialization.
Definition Float32.cpp:104
eProsima_user_DllExport bool operator!=(const Float32 &x) const
Comparison operator.
Definition Float32.cpp:81
eProsima_user_DllExport void serializeKey(eprosima::fastcdr::Cdr &cdr) const
This function serializes the key members of an object using CDR serialization.
Definition Float32.cpp:156
eProsima_user_DllExport Float32()
Default constructor.
Definition Float32.cpp:40
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 Float32.cpp:87
eProsima_user_DllExport float data() const
This function returns the value of member data
Definition Float32.cpp:130