CARLA
PointField.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 PointField.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_SENSOR_MSGS_MSG_POINTFIELD_H_
23 #define _FAST_DDS_GENERATED_SENSOR_MSGS_MSG_POINTFIELD_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(PointField_SOURCE)
47 #define PointField_DllAPI __declspec( dllexport )
48 #else
49 #define PointField_DllAPI __declspec( dllimport )
50 #endif // PointField_SOURCE
51 #else
52 #define PointField_DllAPI
53 #endif // EPROSIMA_USER_DLL_EXPORT
54 #else
55 #define PointField_DllAPI
56 #endif // _WIN32
57 
58 namespace eprosima {
59 namespace fastcdr {
60 class Cdr;
61 } // namespace fastcdr
62 } // namespace eprosima
63 
64 namespace sensor_msgs {
65  namespace msg {
66  const uint8_t PointField__INT8 = 1;
67  const uint8_t PointField__UINT8 = 2;
68  const uint8_t PointField__INT16 = 3;
69  const uint8_t PointField__UINT16 = 4;
70  const uint8_t PointField__INT32 = 5;
71  const uint8_t PointField__UINT32 = 6;
72  const uint8_t PointField__FLOAT32 = 7;
73  const uint8_t PointField__FLOAT64 = 8;
74 
75  /*!
76  * @brief This class represents the structure PointField defined by the user in the IDL file.
77  * @ingroup POINTFIELD
78  */
79  class PointField
80  {
81  public:
82 
83  /*!
84  * @brief Default constructor.
85  */
87 
88  /*!
89  * @brief Default destructor.
90  */
91  eProsima_user_DllExport ~PointField();
92 
93  /*!
94  * @brief Copy constructor.
95  * @param x Reference to the object sensor_msgs::msg::PointField that will be copied.
96  */
97  eProsima_user_DllExport PointField(
98  const PointField& x);
99 
100  /*!
101  * @brief Move constructor.
102  * @param x Reference to the object sensor_msgs::msg::PointField that will be copied.
103  */
104  eProsima_user_DllExport PointField(
105  PointField&& x) noexcept;
106 
107  /*!
108  * @brief Copy assignment.
109  * @param x Reference to the object sensor_msgs::msg::PointField that will be copied.
110  */
111  eProsima_user_DllExport PointField& operator =(
112  const PointField& x);
113 
114  /*!
115  * @brief Move assignment.
116  * @param x Reference to the object sensor_msgs::msg::PointField that will be copied.
117  */
118  eProsima_user_DllExport PointField& operator =(
119  PointField&& x) noexcept;
120 
121  /*!
122  * @brief Comparison operator.
123  * @param x sensor_msgs::msg::PointField object to compare.
124  */
126  const PointField& x) const;
127 
128  /*!
129  * @brief Comparison operator.
130  * @param x sensor_msgs::msg::PointField object to compare.
131  */
133  const PointField& x) const;
134 
135  /*!
136  * @brief This function copies the value in member name
137  * @param _name New value to be copied in member name
138  */
139  eProsima_user_DllExport void name(
140  const std::string& _name);
141 
142  /*!
143  * @brief This function moves the value in member name
144  * @param _name New value to be moved in member name
145  */
146  eProsima_user_DllExport void name(
147  std::string&& _name);
148 
149  /*!
150  * @brief This function returns a constant reference to member name
151  * @return Constant reference to member name
152  */
153  eProsima_user_DllExport const std::string& name() const;
154 
155  /*!
156  * @brief This function returns a reference to member name
157  * @return Reference to member name
158  */
159  eProsima_user_DllExport std::string& name();
160  /*!
161  * @brief This function sets a value in member offset
162  * @param _offset New value for member offset
163  */
164  eProsima_user_DllExport void offset(
165  uint32_t _offset);
166 
167  /*!
168  * @brief This function returns the value of member offset
169  * @return Value of member offset
170  */
171  eProsima_user_DllExport uint32_t offset() const;
172 
173  /*!
174  * @brief This function returns a reference to member offset
175  * @return Reference to member offset
176  */
177  eProsima_user_DllExport uint32_t& offset();
178 
179  /*!
180  * @brief This function sets a value in member datatype
181  * @param _datatype New value for member datatype
182  */
183  eProsima_user_DllExport void datatype(
184  uint8_t _datatype);
185 
186  /*!
187  * @brief This function returns the value of member datatype
188  * @return Value of member datatype
189  */
190  eProsima_user_DllExport uint8_t datatype() const;
191 
192  /*!
193  * @brief This function returns a reference to member datatype
194  * @return Reference to member datatype
195  */
196  eProsima_user_DllExport uint8_t& datatype();
197 
198  /*!
199  * @brief This function sets a value in member count
200  * @param _count New value for member count
201  */
202  eProsima_user_DllExport void count(
203  uint32_t _count);
204 
205  /*!
206  * @brief This function returns the value of member count
207  * @return Value of member count
208  */
209  eProsima_user_DllExport uint32_t count() const;
210 
211  /*!
212  * @brief This function returns a reference to member count
213  * @return Reference to member count
214  */
215  eProsima_user_DllExport uint32_t& count();
216 
217  /*!
218  * @brief This function returns the maximum serialized size 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 getMaxCdrSerializedSize(
224  size_t current_alignment = 0);
225 
226  /*!
227  * @brief This function returns the serialized size of a data depending on the buffer alignment.
228  * @param data Data which is calculated its serialized size.
229  * @param current_alignment Buffer alignment.
230  * @return Serialized size.
231  */
232  eProsima_user_DllExport static size_t getCdrSerializedSize(
233  const sensor_msgs::msg::PointField& data,
234  size_t current_alignment = 0);
235 
236  /*!
237  * @brief This function serializes an object using CDR serialization.
238  * @param cdr CDR serialization object.
239  */
240  eProsima_user_DllExport void serialize(
241  eprosima::fastcdr::Cdr& cdr) const;
242 
243  /*!
244  * @brief This function deserializes an object using CDR serialization.
245  * @param cdr CDR serialization object.
246  */
247  eProsima_user_DllExport void deserialize(
248  eprosima::fastcdr::Cdr& cdr);
249 
250  /*!
251  * @brief This function returns the maximum serialized size of the Key of an object
252  * depending on the buffer alignment.
253  * @param current_alignment Buffer alignment.
254  * @return Maximum serialized size.
255  */
256  eProsima_user_DllExport static size_t getKeyMaxCdrSerializedSize(
257  size_t current_alignment = 0);
258 
259  /*!
260  * @brief This function tells you if the Key has been defined for this type
261  */
262  eProsima_user_DllExport static bool isKeyDefined();
263 
264  /*!
265  * @brief This function serializes the key members of an object using CDR serialization.
266  * @param cdr CDR serialization object.
267  */
268  eProsima_user_DllExport void serializeKey(
269  eprosima::fastcdr::Cdr& cdr) const;
270 
271  private:
272  std::string m_name;
273  uint32_t m_offset;
274  uint8_t m_datatype;
275  uint32_t m_count;
276 
277  };
278  } // namespace msg
279 } // namespace sensor_msgs
280 
281 #endif // _FAST_DDS_GENERATED_SENSOR_MSGS_MSG_POINTFIELD_H_
This class represents the structure PointField defined by the user in the IDL file.
Definition: PointField.h:79
const uint8_t PointField__FLOAT32
Definition: PointField.h:72
bool operator==(const Waypoint &lhs, const Waypoint &rhs)
const uint8_t PointField__UINT32
Definition: PointField.h:71
const uint8_t PointField__UINT16
Definition: PointField.h:69
bool operator!=(const Waypoint &lhs, const Waypoint &rhs)
const uint8_t PointField__INT16
Definition: PointField.h:68
const uint8_t PointField__FLOAT64
Definition: PointField.h:73
const uint8_t PointField__INT8
Definition: PointField.h:66
#define eProsima_user_DllExport
Definition: PointField.h:41
const uint8_t PointField__INT32
Definition: PointField.h:70
const uint8_t PointField__UINT8
Definition: PointField.h:67