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