ad_rss
generated
include
ad
rss
state
RssState.hpp
Go to the documentation of this file.
1
/*
2
* ----------------- BEGIN LICENSE BLOCK ---------------------------------
3
*
4
* Copyright (C) 2018-2022 Intel Corporation
5
*
6
* SPDX-License-Identifier: LGPL-2.1-only
7
*
8
* ----------------- END LICENSE BLOCK -----------------------------------
9
*/
10
18
#pragma once
19
20
#include <iostream>
21
#include <limits>
22
#include <memory>
23
#include <sstream>
24
#include "
ad/rss/core/RelativeConstellationId.hpp
"
25
#include "
ad/rss/state/LateralRssState.hpp
"
26
#include "
ad/rss/state/LongitudinalRssState.hpp
"
27
#include "
ad/rss/state/UnstructuredConstellationRssState.hpp
"
28
#include "
ad/rss/world/ConstellationType.hpp
"
29
#include "
ad/rss/world/ObjectId.hpp
"
33
namespace
ad
{
37
namespace
rss {
41
namespace
state {
42
48
struct
RssState
49
{
53
typedef
std::shared_ptr<RssState>
Ptr
;
54
58
typedef
std::shared_ptr<RssState const>
ConstPtr
;
59
63
RssState
() =
default
;
64
68
~RssState
() =
default
;
69
73
RssState
(
const
RssState
&other) =
default
;
74
78
RssState
(
RssState
&&other) =
default
;
79
87
RssState
&
operator=
(
const
RssState
&other) =
default
;
88
96
RssState
&
operator=
(
RssState
&&other) =
default
;
97
105
bool
operator==
(
const
RssState
&other)
const
106
{
107
return
(
ego_id
== other.
ego_id
) && (
object_id
== other.
object_id
) && (
constellation_id
== other.
constellation_id
)
108
&& (
longitudinal_state
== other.
longitudinal_state
) && (
lateral_state_right
== other.
lateral_state_right
)
109
&& (
lateral_state_left
== other.
lateral_state_left
)
110
&& (
unstructured_constellation_state
== other.
unstructured_constellation_state
)
111
&& (
constellation_type
== other.
constellation_type
);
112
}
113
121
bool
operator!=
(
const
RssState
&other)
const
122
{
123
return
!
operator==
(other);
124
}
125
129
::ad::rss::world::ObjectId
ego_id
{0};
130
134
::ad::rss::world::ObjectId
object_id
;
135
143
::ad::rss::core::RelativeConstellationId
constellation_id
{0u};
144
148
::ad::rss::state::LongitudinalRssState
longitudinal_state
;
149
153
::ad::rss::state::LateralRssState
lateral_state_right
;
154
158
::ad::rss::state::LateralRssState
lateral_state_left
;
159
163
::ad::rss::state::UnstructuredConstellationRssState
unstructured_constellation_state
;
164
168
::ad::rss::world::ConstellationType
constellation_type
;
169
};
170
171
}
// namespace state
172
}
// namespace rss
173
}
// namespace ad
174
178
#ifndef GEN_GUARD_AD_RSS_STATE_RSSSTATE
179
#define GEN_GUARD_AD_RSS_STATE_RSSSTATE
183
namespace
ad
{
187
namespace
rss {
191
namespace
state {
192
202
inline
std::ostream &
operator<<
(std::ostream &os,
RssState
const
&_value)
203
{
204
os <<
"RssState("
;
205
os <<
"ego_id:"
;
206
os << _value.
ego_id
;
207
os <<
","
;
208
os <<
"object_id:"
;
209
os << _value.
object_id
;
210
os <<
","
;
211
os <<
"constellation_id:"
;
212
os << _value.
constellation_id
;
213
os <<
","
;
214
os <<
"longitudinal_state:"
;
215
os << _value.
longitudinal_state
;
216
os <<
","
;
217
os <<
"lateral_state_right:"
;
218
os << _value.
lateral_state_right
;
219
os <<
","
;
220
os <<
"lateral_state_left:"
;
221
os << _value.
lateral_state_left
;
222
os <<
","
;
223
os <<
"unstructured_constellation_state:"
;
224
os << _value.
unstructured_constellation_state
;
225
os <<
","
;
226
os <<
"constellation_type:"
;
227
os << _value.
constellation_type
;
228
os <<
")"
;
229
return
os;
230
}
231
232
}
// namespace state
233
}
// namespace rss
234
}
// namespace ad
235
236
namespace
std {
240
inline
std::string
to_string
(::
ad::rss::state::RssState
const
&value)
241
{
242
stringstream sstream;
243
sstream << value;
244
return
sstream.str();
245
}
246
}
// namespace std
247
251
template
<>
struct
fmt::formatter<::
ad::rss::state::RssState
> : formatter<string_view>
252
{
253
template
<
typename
FormatContext>
auto
format(::
ad::rss::state::RssState
const
&value, FormatContext &ctx)
254
{
255
return
formatter<string_view>::format(std::to_string(value), ctx);
256
}
257
};
258
259
#endif
// GEN_GUARD_AD_RSS_STATE_RSSSTATE
ConstellationType.hpp
std::to_string
std::string to_string(::ad::rss::core::LateralRelativePosition const &value)
overload of the std::to_string for LateralRelativePosition
Definition:
LateralRelativePosition.hpp:162
LateralRssState.hpp
LongitudinalRssState.hpp
ObjectId.hpp
RelativeConstellationId.hpp
UnstructuredConstellationRssState.hpp
ad::rss::core::RelativeConstellationId
uint64_t RelativeConstellationId
DataType RelativeConstellationId.
Definition:
RelativeConstellationId.hpp:39
ad::rss::state::operator<<
std::ostream & operator<<(std::ostream &os, AccelerationRestriction const &_value)
standard ostream operator
Definition:
AccelerationRestriction.hpp:164
ad::rss::world::ConstellationType
ConstellationType
DataType ConstellationType.
Definition:
ConstellationType.hpp:44
ad::rss::world::ObjectId
uint64_t ObjectId
DataType ObjectId.
Definition:
ObjectId.hpp:39
ad
namespace ad
Definition:
LateralRelativePosition.hpp:28
ad::rss::state::LateralRssState
DataType LateralRssState.
Definition:
LateralRssState.hpp:45
ad::rss::state::LongitudinalRssState
DataType LongitudinalRssState.
Definition:
LongitudinalRssState.hpp:45
ad::rss::state::RssState
DataType RssState.
Definition:
RssState.hpp:49
ad::rss::state::RssState::RssState
RssState(const RssState &other)=default
standard copy constructor
ad::rss::state::RssState::ConstPtr
std::shared_ptr< RssState const > ConstPtr
Smart pointer on constant RssState.
Definition:
RssState.hpp:58
ad::rss::state::RssState::lateral_state_left
::ad::rss::state::LateralRssState lateral_state_left
Definition:
RssState.hpp:158
ad::rss::state::RssState::unstructured_constellation_state
::ad::rss::state::UnstructuredConstellationRssState unstructured_constellation_state
Definition:
RssState.hpp:163
ad::rss::state::RssState::lateral_state_right
::ad::rss::state::LateralRssState lateral_state_right
Definition:
RssState.hpp:153
ad::rss::state::RssState::operator=
RssState & operator=(RssState &&other)=default
standard move operator
ad::rss::state::RssState::constellation_type
::ad::rss::world::ConstellationType constellation_type
Definition:
RssState.hpp:168
ad::rss::state::RssState::object_id
::ad::rss::world::ObjectId object_id
Definition:
RssState.hpp:134
ad::rss::state::RssState::longitudinal_state
::ad::rss::state::LongitudinalRssState longitudinal_state
Definition:
RssState.hpp:148
ad::rss::state::RssState::RssState
RssState(RssState &&other)=default
standard move constructor
ad::rss::state::RssState::operator=
RssState & operator=(const RssState &other)=default
standard assignment operator
ad::rss::state::RssState::ego_id
::ad::rss::world::ObjectId ego_id
Definition:
RssState.hpp:129
ad::rss::state::RssState::~RssState
~RssState()=default
standard destructor
ad::rss::state::RssState::operator!=
bool operator!=(const RssState &other) const
standard comparison operator
Definition:
RssState.hpp:121
ad::rss::state::RssState::operator==
bool operator==(const RssState &other) const
standard comparison operator
Definition:
RssState.hpp:105
ad::rss::state::RssState::Ptr
std::shared_ptr< RssState > Ptr
Smart pointer on RssState.
Definition:
RssState.hpp:53
ad::rss::state::RssState::RssState
RssState()=default
standard constructor
ad::rss::state::RssState::constellation_id
::ad::rss::core::RelativeConstellationId constellation_id
Definition:
RssState.hpp:143
ad::rss::state::UnstructuredConstellationRssState
DataType UnstructuredConstellationRssState.
Definition:
UnstructuredConstellationRssState.hpp:46
Generated by
1.9.1