CARLA
Header.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 Header.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_HEADER_H_
23 #define _FAST_DDS_GENERATED_STD_MSGS_MSG_HEADER_H_
24 
25 #include "Time.h"
26 
27 #include <fastrtps/utils/fixed_size_string.hpp>
28 
29 #include <stdint.h>
30 #include <array>
31 #include <string>
32 #include <vector>
33 #include <map>
34 #include <bitset>
35 
36 #if defined(_WIN32)
37 #if defined(EPROSIMA_USER_DLL_EXPORT)
38 #define eProsima_user_DllExport __declspec( dllexport )
39 #else
40 #define eProsima_user_DllExport
41 #endif // EPROSIMA_USER_DLL_EXPORT
42 #else
43 #define eProsima_user_DllExport
44 #endif // _WIN32
45 
46 #if defined(_WIN32)
47 #if defined(EPROSIMA_USER_DLL_EXPORT)
48 #if defined(Header_SOURCE)
49 #define Header_DllAPI __declspec( dllexport )
50 #else
51 #define Header_DllAPI __declspec( dllimport )
52 #endif // Header_SOURCE
53 #else
54 #define Header_DllAPI
55 #endif // EPROSIMA_USER_DLL_EXPORT
56 #else
57 #define Header_DllAPI
58 #endif // _WIN32
59 
60 namespace eprosima {
61 namespace fastcdr {
62 class Cdr;
63 } // namespace fastcdr
64 } // namespace eprosima
65 
66 namespace std_msgs {
67  namespace msg {
68  /*!
69  * @brief This class represents the structure Header defined by the user in the IDL file.
70  * @ingroup HEADER
71  */
72  class Header
73  {
74  public:
75 
76  /*!
77  * @brief Default constructor.
78  */
80 
81  /*!
82  * @brief Default destructor.
83  */
84  eProsima_user_DllExport ~Header();
85 
86  /*!
87  * @brief Copy constructor.
88  * @param x Reference to the object std_msgs::msg::Header that will be copied.
89  */
91  const Header& x);
92 
93  /*!
94  * @brief Move constructor.
95  * @param x Reference to the object std_msgs::msg::Header that will be copied.
96  */
98  Header&& x) noexcept;
99 
100  /*!
101  * @brief Copy assignment.
102  * @param x Reference to the object std_msgs::msg::Header that will be copied.
103  */
104  eProsima_user_DllExport Header& operator =(
105  const Header& x);
106 
107  /*!
108  * @brief Move assignment.
109  * @param x Reference to the object std_msgs::msg::Header that will be copied.
110  */
111  eProsima_user_DllExport Header& operator =(
112  Header&& x) noexcept;
113 
114  /*!
115  * @brief Comparison operator.
116  * @param x std_msgs::msg::Header object to compare.
117  */
119  const Header& x) const;
120 
121  /*!
122  * @brief Comparison operator.
123  * @param x std_msgs::msg::Header object to compare.
124  */
126  const Header& x) const;
127 
128  /*!
129  * @brief This function copies the value in member stamp
130  * @param _stamp New value to be copied in member stamp
131  */
132  eProsima_user_DllExport void stamp(
133  const builtin_interfaces::msg::Time& _stamp);
134 
135  /*!
136  * @brief This function moves the value in member stamp
137  * @param _stamp New value to be moved in member stamp
138  */
139  eProsima_user_DllExport void stamp(
141 
142  /*!
143  * @brief This function returns a constant reference to member stamp
144  * @return Constant reference to member stamp
145  */
147 
148  /*!
149  * @brief This function returns a reference to member stamp
150  * @return Reference to member stamp
151  */
153  /*!
154  * @brief This function copies the value in member frame_id
155  * @param _frame_id New value to be copied in member frame_id
156  */
157  eProsima_user_DllExport void frame_id(
158  const std::string& _frame_id);
159 
160  /*!
161  * @brief This function moves the value in member frame_id
162  * @param _frame_id New value to be moved in member frame_id
163  */
164  eProsima_user_DllExport void frame_id(
165  std::string&& _frame_id);
166 
167  /*!
168  * @brief This function returns a constant reference to member frame_id
169  * @return Constant reference to member frame_id
170  */
171  eProsima_user_DllExport const std::string& frame_id() const;
172 
173  /*!
174  * @brief This function returns a reference to member frame_id
175  * @return Reference to member frame_id
176  */
177  eProsima_user_DllExport std::string& frame_id();
178 
179  /*!
180  * @brief This function returns the maximum serialized size of an object
181  * depending on the buffer alignment.
182  * @param current_alignment Buffer alignment.
183  * @return Maximum serialized size.
184  */
185  eProsima_user_DllExport static size_t getMaxCdrSerializedSize(
186  size_t current_alignment = 0);
187 
188  /*!
189  * @brief This function returns the serialized size of a data depending on the buffer alignment.
190  * @param data Data which is calculated its serialized size.
191  * @param current_alignment Buffer alignment.
192  * @return Serialized size.
193  */
194  eProsima_user_DllExport static size_t getCdrSerializedSize(
195  const std_msgs::msg::Header& data,
196  size_t current_alignment = 0);
197 
198  /*!
199  * @brief This function serializes an object using CDR serialization.
200  * @param cdr CDR serialization object.
201  */
202  eProsima_user_DllExport void serialize(
203  eprosima::fastcdr::Cdr& cdr) const;
204 
205  /*!
206  * @brief This function deserializes an object using CDR serialization.
207  * @param cdr CDR serialization object.
208  */
209  eProsima_user_DllExport void deserialize(
210  eprosima::fastcdr::Cdr& cdr);
211 
212  /*!
213  * @brief This function returns the maximum serialized size of the Key of an object
214  * depending on the buffer alignment.
215  * @param current_alignment Buffer alignment.
216  * @return Maximum serialized size.
217  */
218  eProsima_user_DllExport static size_t getKeyMaxCdrSerializedSize(
219  size_t current_alignment = 0);
220 
221  /*!
222  * @brief This function tells you if the Key has been defined for this type
223  */
224  eProsima_user_DllExport static bool isKeyDefined();
225 
226  /*!
227  * @brief This function serializes the key members of an object using CDR serialization.
228  * @param cdr CDR serialization object.
229  */
230  eProsima_user_DllExport void serializeKey(
231  eprosima::fastcdr::Cdr& cdr) const;
232 
233  private:
235  std::string m_frame_id;
236  };
237  } // namespace msg
238 } // namespace std_msgs
239 
240 #endif // _FAST_DDS_GENERATED_STD_MSGS_MSG_HEADER_H_
std::string m_frame_id
Definition: Header.h:235
bool operator==(const Waypoint &lhs, const Waypoint &rhs)
This class represents the structure Header defined by the user in the IDL file.
Definition: Header.h:72
bool operator!=(const Waypoint &lhs, const Waypoint &rhs)
builtin_interfaces::msg::Time m_stamp
Definition: Header.h:234
This class represents the structure Time defined by the user in the IDL file.
#define eProsima_user_DllExport
Definition: Header.h:43