CARLA
Point32.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 Point32.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_GEOMETRY_MSGS_MSG_POINT32_H_
23 #define _FAST_DDS_GENERATED_GEOMETRY_MSGS_MSG_POINT32_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(Point32_SOURCE)
47 #define Point32_DllAPI __declspec( dllexport )
48 #else
49 #define Point32_DllAPI __declspec( dllimport )
50 #endif // Point32_SOURCE
51 #else
52 #define Point32_DllAPI
53 #endif // EPROSIMA_USER_DLL_EXPORT
54 #else
55 #define Point32_DllAPI
56 #endif // _WIN32
57 
58 namespace eprosima {
59 namespace fastcdr {
60 class Cdr;
61 } // namespace fastcdr
62 } // namespace eprosima
63 
64 namespace geometry_msgs {
65  namespace msg {
66  /*!
67  * @brief This class represents the structure Point32 defined by the user in the IDL file.
68  * @ingroup POINT32
69  */
70  class Point32
71  {
72  public:
73 
74  /*!
75  * @brief Default constructor.
76  */
78 
79  /*!
80  * @brief Default destructor.
81  */
82  eProsima_user_DllExport ~Point32();
83 
84  /*!
85  * @brief Copy constructor.
86  * @param x Reference to the object geometry_msgs::msg::Point32 that will be copied.
87  */
89  const Point32& x);
90 
91  /*!
92  * @brief Move constructor.
93  * @param x Reference to the object geometry_msgs::msg::Point32 that will be copied.
94  */
96  Point32&& x) noexcept;
97 
98  /*!
99  * @brief Copy assignment.
100  * @param x Reference to the object geometry_msgs::msg::Point32 that will be copied.
101  */
102  eProsima_user_DllExport Point32& operator =(
103  const Point32& x);
104 
105  /*!
106  * @brief Move assignment.
107  * @param x Reference to the object geometry_msgs::msg::Point32 that will be copied.
108  */
109  eProsima_user_DllExport Point32& operator =(
110  Point32&& x) noexcept;
111 
112  /*!
113  * @brief Comparison operator.
114  * @param x geometry_msgs::msg::Point32 object to compare.
115  */
117  const Point32& x) const;
118 
119  /*!
120  * @brief Comparison operator.
121  * @param x geometry_msgs::msg::Point32 object to compare.
122  */
124  const Point32& x) const;
125 
126  /*!
127  * @brief This function sets a value in member x
128  * @param _x New value for member x
129  */
131  float _x);
132 
133  /*!
134  * @brief This function returns the value of member x
135  * @return Value of member x
136  */
137  eProsima_user_DllExport float x() const;
138 
139  /*!
140  * @brief This function returns a reference to member x
141  * @return Reference to member x
142  */
143  eProsima_user_DllExport float& x();
144 
145  /*!
146  * @brief This function sets a value in member y
147  * @param _y New value for member y
148  */
150  float _y);
151 
152  /*!
153  * @brief This function returns the value of member y
154  * @return Value of member y
155  */
156  eProsima_user_DllExport float y() const;
157 
158  /*!
159  * @brief This function returns a reference to member y
160  * @return Reference to member y
161  */
162  eProsima_user_DllExport float& y();
163 
164  /*!
165  * @brief This function sets a value in member z
166  * @param _z New value for member z
167  */
169  float _z);
170 
171  /*!
172  * @brief This function returns the value of member z
173  * @return Value of member z
174  */
175  eProsima_user_DllExport float z() const;
176 
177  /*!
178  * @brief This function returns a reference to member z
179  * @return Reference to member z
180  */
181  eProsima_user_DllExport float& z();
182 
183  /*!
184  * @brief This function returns the maximum serialized size of an object
185  * depending on the buffer alignment.
186  * @param current_alignment Buffer alignment.
187  * @return Maximum serialized size.
188  */
189  eProsima_user_DllExport static size_t getMaxCdrSerializedSize(
190  size_t current_alignment = 0);
191 
192  /*!
193  * @brief This function returns the serialized size of a data depending on the buffer alignment.
194  * @param data Data which is calculated its serialized size.
195  * @param current_alignment Buffer alignment.
196  * @return Serialized size.
197  */
198  eProsima_user_DllExport static size_t getCdrSerializedSize(
199  const geometry_msgs::msg::Point32& data,
200  size_t current_alignment = 0);
201 
202  /*!
203  * @brief This function serializes an object using CDR serialization.
204  * @param cdr CDR serialization object.
205  */
206  eProsima_user_DllExport void serialize(
207  eprosima::fastcdr::Cdr& cdr) const;
208 
209  /*!
210  * @brief This function deserializes an object using CDR serialization.
211  * @param cdr CDR serialization object.
212  */
213  eProsima_user_DllExport void deserialize(
214  eprosima::fastcdr::Cdr& cdr);
215 
216  /*!
217  * @brief This function returns the maximum serialized size of the Key of an object
218  * depending on the buffer alignment.
219  * @param current_alignment Buffer alignment.
220  * @return Maximum serialized size.
221  */
222  eProsima_user_DllExport static size_t getKeyMaxCdrSerializedSize(
223  size_t current_alignment = 0);
224 
225  /*!
226  * @brief This function tells you if the Key has been defined for this type
227  */
228  eProsima_user_DllExport static bool isKeyDefined();
229 
230  /*!
231  * @brief This function serializes the key members of an object using CDR serialization.
232  * @param cdr CDR serialization object.
233  */
234  eProsima_user_DllExport void serializeKey(
235  eprosima::fastcdr::Cdr& cdr) const;
236 
237  private:
238  float m_x;
239  float m_y;
240  float m_z;
241  };
242  } // namespace msg
243 } // namespace geometry_msgs
244 
245 #endif // _FAST_DDS_GENERATED_GEOMETRY_MSGS_MSG_POINT32_H_
bool operator==(const Waypoint &lhs, const Waypoint &rhs)
bool operator!=(const Waypoint &lhs, const Waypoint &rhs)
This class represents the structure Point32 defined by the user in the IDL file.
Definition: Point32.h:70
#define eProsima_user_DllExport
Definition: Point32.h:41