CARLA
载入中...
搜索中...
未找到
LibCarla
source
carla
ros2
types
Header.cpp
浏览该文件的文档.
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.cpp
17
* This source file contains the definition of the described types in the IDL file.
18
*
19
* This file was generated by the tool gen.
20
*/
21
22
#ifdef _WIN32
23
// Remove linker warning LNK4221 on Visual Studio
24
namespace
{
25
char
dummy;
26
}
// namespace
27
#endif
// _WIN32
28
29
#include "
Header.h
"
30
#include <fastcdr/Cdr.h>
31
32
#include <fastcdr/exceptions/BadParamException.h>
33
using namespace
eprosima::fastcdr::exception;
34
35
#include <utility>
36
37
#define builtin_interfaces_msg_Time_max_cdr_typesize 8ULL;
38
#define std_msgs_msg_Header_max_cdr_typesize 268ULL;
39
#define builtin_interfaces_msg_Time_max_key_cdr_typesize 0ULL;
40
#define std_msgs_msg_Header_max_key_cdr_typesize 0ULL;
41
42
std_msgs::msg::Header::Header
()
43
{
44
m_frame_id
=
""
;
45
}
46
47
std_msgs::msg::Header::~Header
()
48
{
49
}
50
51
std_msgs::msg::Header::Header
(
52
const
Header
& x)
53
{
54
m_stamp = x.
m_stamp
;
55
m_frame_id = x.
m_frame_id
;
56
}
57
58
std_msgs::msg::Header::Header
(
59
Header
&& x)
noexcept
60
{
61
m_stamp = std::move(x.m_stamp);
62
m_frame_id = std::move(x.m_frame_id);
63
}
64
65
std_msgs::msg::Header
&
std_msgs::msg::Header::operator =
(
66
const
Header
& x)
67
{
68
m_stamp = x.
m_stamp
;
69
m_frame_id = x.
m_frame_id
;
70
71
return
*
this
;
72
}
73
74
std_msgs::msg::Header
&
std_msgs::msg::Header::operator =
(
75
Header
&& x)
noexcept
76
{
77
m_stamp = std::move(x.m_stamp);
78
m_frame_id = std::move(x.m_frame_id);
79
80
return
*
this
;
81
}
82
83
bool
std_msgs::msg::Header::operator ==
(
84
const
Header
& x)
const
85
{
86
return
(m_stamp == x.
m_stamp
&& m_frame_id == x.
m_frame_id
);
87
}
88
89
bool
std_msgs::msg::Header::operator !=
(
90
const
Header
& x)
const
91
{
92
return
!(*
this
== x);
93
}
94
95
size_t
std_msgs::msg::Header::getMaxCdrSerializedSize
(
96
size_t
current_alignment)
97
{
98
static_cast<
void
>
(current_alignment);
99
return
std_msgs_msg_Header_max_cdr_typesize
;
100
}
101
102
size_t
std_msgs::msg::Header::getCdrSerializedSize
(
103
const
std_msgs::msg::Header
& data,
104
size_t
current_alignment)
105
{
106
size_t
initial_alignment = current_alignment;
107
current_alignment +=
builtin_interfaces::msg::Time::getCdrSerializedSize
(data.
stamp
(), current_alignment);
108
current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4) + data.
frame_id
().size() + 1;
109
110
return
current_alignment - initial_alignment;
111
}
112
113
void
std_msgs::msg::Header::serialize
(
114
eprosima::fastcdr::Cdr& scdr)
const
115
{
116
scdr << m_stamp;
117
scdr << m_frame_id.c_str();
118
}
119
120
void
std_msgs::msg::Header::deserialize
(
121
eprosima::fastcdr::Cdr& dcdr)
122
{
123
dcdr >> m_stamp;
124
dcdr >> m_frame_id;
125
}
126
127
/*!
128
* @brief This function copies the value in member stamp
129
* @param _stamp New value to be copied in member stamp
130
*/
131
void
std_msgs::msg::Header::stamp
(
132
const
builtin_interfaces::msg::Time
& _stamp)
133
{
134
m_stamp = _stamp;
135
}
136
137
/*!
138
* @brief This function moves the value in member stamp
139
* @param _stamp New value to be moved in member stamp
140
*/
141
void
std_msgs::msg::Header::stamp
(
142
builtin_interfaces::msg::Time
&& _stamp)
143
{
144
m_stamp = std::move(_stamp);
145
}
146
147
/*!
148
* @brief This function returns a constant reference to member stamp
149
* @return Constant reference to member stamp
150
*/
151
const
builtin_interfaces::msg::Time
&
std_msgs::msg::Header::stamp
()
const
152
{
153
return
m_stamp;
154
}
155
156
/*!
157
* @brief This function returns a reference to member stamp
158
* @return Reference to member stamp
159
*/
160
builtin_interfaces::msg::Time
&
std_msgs::msg::Header::stamp
()
161
{
162
return
m_stamp;
163
}
164
/*!
165
* @brief This function copies the value in member frame_id
166
* @param _frame_id New value to be copied in member frame_id
167
*/
168
void
std_msgs::msg::Header::frame_id
(
169
const
std::string& _frame_id)
170
{
171
m_frame_id = _frame_id;
172
}
173
174
/*!
175
* @brief This function moves the value in member frame_id
176
* @param _frame_id New value to be moved in member frame_id
177
*/
178
void
std_msgs::msg::Header::frame_id
(
179
std::string&& _frame_id)
180
{
181
m_frame_id = std::move(_frame_id);
182
}
183
184
/*!
185
* @brief This function returns a constant reference to member frame_id
186
* @return Constant reference to member frame_id
187
*/
188
const
std::string&
std_msgs::msg::Header::frame_id
()
const
189
{
190
return
m_frame_id;
191
}
192
193
/*!
194
* @brief This function returns a reference to member frame_id
195
* @return Reference to member frame_id
196
*/
197
std::string&
std_msgs::msg::Header::frame_id
()
198
{
199
return
m_frame_id;
200
}
201
202
203
size_t
std_msgs::msg::Header::getKeyMaxCdrSerializedSize
(
204
size_t
current_alignment)
205
{
206
static_cast<
void
>
(current_alignment);
207
return
std_msgs_msg_Header_max_key_cdr_typesize
;
208
}
209
210
bool
std_msgs::msg::Header::isKeyDefined
()
211
{
212
return
false
;
213
}
214
215
void
std_msgs::msg::Header::serializeKey
(
216
eprosima::fastcdr::Cdr& scdr)
const
217
{
218
(void) scdr;
219
}
std_msgs_msg_Header_max_key_cdr_typesize
#define std_msgs_msg_Header_max_key_cdr_typesize
Definition
CameraInfo.cpp:45
std_msgs_msg_Header_max_cdr_typesize
#define std_msgs_msg_Header_max_cdr_typesize
Definition
CameraInfo.cpp:41
Header.h
builtin_interfaces::msg::Time
This class represents the structure Time defined by the user in the IDL file.
Definition
ros2/types/Time.h:72
builtin_interfaces::msg::Time::getCdrSerializedSize
static eProsima_user_DllExport size_t getCdrSerializedSize(const builtin_interfaces::msg::Time &data, size_t current_alignment=0)
This function returns the serialized size of a data depending on the buffer alignment.
Definition
Time.cpp:103
std_msgs::msg::Header
This class represents the structure Header defined by the user in the IDL file.
Definition
Header.h:73
std_msgs::msg::Header::isKeyDefined
static eProsima_user_DllExport bool isKeyDefined()
This function tells you if the Key has been defined for this type
Definition
Header.cpp:210
std_msgs::msg::Header::m_frame_id
std::string m_frame_id
Definition
Header.h:235
std_msgs::msg::Header::operator!=
eProsima_user_DllExport bool operator!=(const Header &x) const
Comparison operator.
Definition
Header.cpp:89
std_msgs::msg::Header::getMaxCdrSerializedSize
static eProsima_user_DllExport size_t getMaxCdrSerializedSize(size_t current_alignment=0)
This function returns the maximum serialized size of an object depending on the buffer alignment.
Definition
Header.cpp:95
std_msgs::msg::Header::stamp
eProsima_user_DllExport void stamp(const builtin_interfaces::msg::Time &_stamp)
This function copies the value in member stamp
Definition
Header.cpp:131
std_msgs::msg::Header::deserialize
eProsima_user_DllExport void deserialize(eprosima::fastcdr::Cdr &cdr)
This function deserializes an object using CDR serialization.
Definition
Header.cpp:120
std_msgs::msg::Header::operator==
eProsima_user_DllExport bool operator==(const Header &x) const
Comparison operator.
Definition
Header.cpp:83
std_msgs::msg::Header::serialize
eProsima_user_DllExport void serialize(eprosima::fastcdr::Cdr &cdr) const
This function serializes an object using CDR serialization.
Definition
Header.cpp:113
std_msgs::msg::Header::~Header
eProsima_user_DllExport ~Header()
Default destructor.
Definition
Header.cpp:47
std_msgs::msg::Header::serializeKey
eProsima_user_DllExport void serializeKey(eprosima::fastcdr::Cdr &cdr) const
This function serializes the key members of an object using CDR serialization.
Definition
Header.cpp:215
std_msgs::msg::Header::frame_id
eProsima_user_DllExport void frame_id(const std::string &_frame_id)
This function copies the value in member frame_id
Definition
Header.cpp:168
std_msgs::msg::Header::frame_id
eProsima_user_DllExport const std::string & frame_id() const
This function returns a constant reference to member frame_id
Definition
Header.cpp:188
std_msgs::msg::Header::Header
eProsima_user_DllExport Header()
Default constructor.
Definition
Header.cpp:42
std_msgs::msg::Header::getKeyMaxCdrSerializedSize
static eProsima_user_DllExport size_t getKeyMaxCdrSerializedSize(size_t current_alignment=0)
This function returns the maximum serialized size of the Key of an object depending on the buffer ali...
Definition
Header.cpp:203
std_msgs::msg::Header::m_stamp
builtin_interfaces::msg::Time m_stamp
Definition
Header.h:234
std_msgs::msg::Header::operator=
eProsima_user_DllExport Header & operator=(const Header &x)
Copy assignment.
Definition
Header.cpp:65
std_msgs::msg::Header::getCdrSerializedSize
static eProsima_user_DllExport size_t getCdrSerializedSize(const std_msgs::msg::Header &data, size_t current_alignment=0)
This function returns the serialized size of a data depending on the buffer alignment.
Definition
Header.cpp:102
std_msgs::msg::Header::stamp
eProsima_user_DllExport const builtin_interfaces::msg::Time & stamp() const
This function returns a constant reference to member stamp
Definition
Header.cpp:151
制作者
1.10.0