pjmsg_mcap_wrapper
Loading...
Searching...
No Matches
Header.hpp
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.hpp
17 * This header file contains the declaration of the described types in the IDL file.
18 *
19 * This file was generated by the tool fastddsgen.
20 */
21
22#ifndef FAST_DDS_GENERATED__STD_MSGS_MSG_HEADER_HPP
23#define FAST_DDS_GENERATED__STD_MSGS_MSG_HEADER_HPP
24
25#include <cstdint>
26#include <string>
27#include <utility>
28#include "Time.hpp"
29
30#if defined(_WIN32)
31#if defined(EPROSIMA_USER_DLL_EXPORT)
32#define eProsima_user_DllExport __declspec( dllexport )
33#else
34#define eProsima_user_DllExport
35#endif // EPROSIMA_USER_DLL_EXPORT
36#else
37#define eProsima_user_DllExport
38#endif // _WIN32
39
40#if defined(_WIN32)
41#if defined(EPROSIMA_USER_DLL_EXPORT)
42#if defined(HEADER_SOURCE)
43#define HEADER_DllAPI __declspec( dllexport )
44#else
45#define HEADER_DllAPI __declspec( dllimport )
46#endif // HEADER_SOURCE
47#else
48#define HEADER_DllAPI
49#endif // EPROSIMA_USER_DLL_EXPORT
50#else
51#define HEADER_DllAPI
52#endif // _WIN32
53
54namespace std_msgs {
55
56namespace msg {
57
58/*!
59 * @brief This class represents the structure Header defined by the user in the IDL file.
60 * @ingroup Header
61 */
62class Header
63{
64public:
65
66 /*!
67 * @brief Default constructor.
68 */
72
73 /*!
74 * @brief Default destructor.
75 */
79
80 /*!
81 * @brief Copy constructor.
82 * @param x Reference to the object Header that will be copied.
83 */
85 const Header& x)
86 {
87 m_stamp = x.m_stamp;
88
89 m_frame_id = x.m_frame_id;
90
91 }
92
93 /*!
94 * @brief Move constructor.
95 * @param x Reference to the object Header that will be copied.
96 */
98 Header&& x) noexcept
99 {
100 m_stamp = std::move(x.m_stamp);
101 m_frame_id = std::move(x.m_frame_id);
102 }
103
104 /*!
105 * @brief Copy assignment.
106 * @param x Reference to the object Header that will be copied.
107 */
109 const Header& x)
110 {
111
112 m_stamp = x.m_stamp;
113
114 m_frame_id = x.m_frame_id;
115
116 return *this;
117 }
118
119 /*!
120 * @brief Move assignment.
121 * @param x Reference to the object Header that will be copied.
122 */
124 Header&& x) noexcept
125 {
126
127 m_stamp = std::move(x.m_stamp);
128 m_frame_id = std::move(x.m_frame_id);
129 return *this;
130 }
131
132 /*!
133 * @brief Comparison operator.
134 * @param x Header object to compare.
135 */
137 const Header& x) const
138 {
139 return (m_stamp == x.m_stamp &&
140 m_frame_id == x.m_frame_id);
141 }
142
143 /*!
144 * @brief Comparison operator.
145 * @param x Header object to compare.
146 */
148 const Header& x) const
149 {
150 return !(*this == x);
151 }
152
153 /*!
154 * @brief This function copies the value in member stamp
155 * @param _stamp New value to be copied in member stamp
156 */
158 const builtin_interfaces::msg::Time& _stamp)
159 {
160 m_stamp = _stamp;
161 }
162
163 /*!
164 * @brief This function moves the value in member stamp
165 * @param _stamp New value to be moved in member stamp
166 */
169 {
170 m_stamp = std::move(_stamp);
171 }
172
173 /*!
174 * @brief This function returns a constant reference to member stamp
175 * @return Constant reference to member stamp
176 */
181
182 /*!
183 * @brief This function returns a reference to member stamp
184 * @return Reference to member stamp
185 */
190
191
192 /*!
193 * @brief This function copies the value in member frame_id
194 * @param _frame_id New value to be copied in member frame_id
195 */
197 const std::string& _frame_id)
198 {
199 m_frame_id = _frame_id;
200 }
201
202 /*!
203 * @brief This function moves the value in member frame_id
204 * @param _frame_id New value to be moved in member frame_id
205 */
207 std::string&& _frame_id)
208 {
209 m_frame_id = std::move(_frame_id);
210 }
211
212 /*!
213 * @brief This function returns a constant reference to member frame_id
214 * @return Constant reference to member frame_id
215 */
217 {
218 return m_frame_id;
219 }
220
221 /*!
222 * @brief This function returns a reference to member frame_id
223 * @return Reference to member frame_id
224 */
229
230
231
232private:
233
236
237};
238
239} // namespace msg
240
241} // namespace std_msgs
242
243#endif // _FAST_DDS_GENERATED_STD_MSGS_MSG_HEADER_HPP_
244
245
#define eProsima_user_DllExport
Definition Header.hpp:37
This class represents the structure Time defined by the user in the IDL file.
Definition Time.idl:3
This class represents the structure Header defined by the user in the IDL file.
Definition Header.idl:5
eProsima_user_DllExport const std::string & frame_id() const
This function returns a constant reference to member frame_id.
Definition Header.hpp:216
eProsima_user_DllExport Header()
Default constructor.
Definition Header.hpp:69
eProsima_user_DllExport Header(Header &&x) noexcept
Move constructor.
Definition Header.hpp:97
eProsima_user_DllExport bool operator==(const Header &x) const
Comparison operator.
Definition Header.hpp:136
eProsima_user_DllExport bool operator!=(const Header &x) const
Comparison operator.
Definition Header.hpp:147
std::string m_frame_id
Definition Header.hpp:235
eProsima_user_DllExport const builtin_interfaces::msg::Time & stamp() const
This function returns a constant reference to member stamp.
Definition Header.hpp:177
eProsima_user_DllExport builtin_interfaces::msg::Time & stamp()
This function returns a reference to member stamp.
Definition Header.hpp:186
eProsima_user_DllExport std::string & frame_id()
This function returns a reference to member frame_id.
Definition Header.hpp:225
eProsima_user_DllExport void stamp(const builtin_interfaces::msg::Time &_stamp)
This function copies the value in member stamp.
Definition Header.hpp:157
eProsima_user_DllExport void stamp(builtin_interfaces::msg::Time &&_stamp)
This function moves the value in member stamp.
Definition Header.hpp:167
eProsima_user_DllExport Header(const Header &x)
Copy constructor.
Definition Header.hpp:84
eProsima_user_DllExport void frame_id(std::string &&_frame_id)
This function moves the value in member frame_id.
Definition Header.hpp:206
eProsima_user_DllExport void frame_id(const std::string &_frame_id)
This function copies the value in member frame_id.
Definition Header.hpp:196
eProsima_user_DllExport Header & operator=(const Header &x)
Copy assignment.
Definition Header.hpp:108
eProsima_user_DllExport ~Header()
Default destructor.
Definition Header.hpp:76
builtin_interfaces::msg::Time m_stamp
Definition Header.hpp:234