CARLA
Float32.h
Go to the documentation of this file.
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 
58 namespace eprosima {
59 namespace fastcdr {
60 class Cdr;
61 } // namespace fastcdr
62 } // namespace eprosima
63 
64 namespace 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  */
81  eProsima_user_DllExport ~Float32();
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  */
101  eProsima_user_DllExport Float32& operator =(
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  */
108  eProsima_user_DllExport Float32& operator =(
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  */
129  eProsima_user_DllExport void data(
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  */
142  eProsima_user_DllExport float& data();
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  */
150  eProsima_user_DllExport static size_t getMaxCdrSerializedSize(
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  */
159  eProsima_user_DllExport static size_t getCdrSerializedSize(
160  const std_msgs::msg::Float32& data,
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  */
167  eProsima_user_DllExport void serialize(
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  */
174  eProsima_user_DllExport void deserialize(
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  */
183  eProsima_user_DllExport static size_t getKeyMaxCdrSerializedSize(
184  size_t current_alignment = 0);
185 
186  /*!
187  * @brief This function tells you if the Key has been defined for this type
188  */
189  eProsima_user_DllExport static bool isKeyDefined();
190 
191  /*!
192  * @brief This function serializes the key members of an object using CDR serialization.
193  * @param cdr CDR serialization object.
194  */
195  eProsima_user_DllExport void serializeKey(
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_
bool operator==(const Waypoint &lhs, const Waypoint &rhs)
This class represents the structure Float32 defined by the user in the IDL file.
Definition: Float32.h:70
bool operator!=(const Waypoint &lhs, const Waypoint &rhs)
#define eProsima_user_DllExport
Definition: Float32.h:41