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