ad_rss
generated
include
ad
rss
core
RelativeConstellation.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/core/RelativeObjectState.hpp
"
26
#include "
ad/rss/core/RelativePosition.hpp
"
27
#include "
ad/rss/world/ConstellationType.hpp
"
28
#include "
ad/rss/world/ObjectId.hpp
"
29
#include "
ad/rss/world/WorldModelIndexVector.hpp
"
33
namespace
ad
{
37
namespace
rss {
41
namespace
core {
42
55
struct
RelativeConstellation
56
{
60
typedef
std::shared_ptr<RelativeConstellation>
Ptr
;
61
65
typedef
std::shared_ptr<RelativeConstellation const>
ConstPtr
;
66
70
RelativeConstellation
() =
default
;
71
75
~RelativeConstellation
() =
default
;
76
80
RelativeConstellation
(
const
RelativeConstellation
&other) =
default
;
81
85
RelativeConstellation
(
RelativeConstellation
&&other) =
default
;
86
94
RelativeConstellation
&
operator=
(
const
RelativeConstellation
&other) =
default
;
95
103
RelativeConstellation
&
operator=
(
RelativeConstellation
&&other) =
default
;
104
112
bool
operator==
(
const
RelativeConstellation
&other)
const
113
{
114
return
(
ego_id
== other.
ego_id
) && (
object_id
== other.
object_id
) && (
constellation_id
== other.
constellation_id
)
115
&& (
constellation_type
== other.
constellation_type
) && (
ego_state
== other.
ego_state
)
116
&& (
other_state
== other.
other_state
) && (
relative_position
== other.
relative_position
)
117
&& (
world_model_indices
== other.
world_model_indices
);
118
}
119
127
bool
operator!=
(
const
RelativeConstellation
&other)
const
128
{
129
return
!
operator==
(other);
130
}
131
135
::ad::rss::world::ObjectId
ego_id
{0};
136
140
::ad::rss::world::ObjectId
object_id
{0};
141
147
::ad::rss::core::RelativeConstellationId
constellation_id
{0};
148
152
::ad::rss::world::ConstellationType
constellation_type
{::ad::rss::world::ConstellationType::NotRelevant};
153
157
::ad::rss::core::RelativeObjectState
ego_state
;
158
162
::ad::rss::core::RelativeObjectState
other_state
;
163
168
::ad::rss::core::RelativePosition
relative_position
;
169
174
::ad::rss::world::WorldModelIndexVector
world_model_indices
;
175
};
176
177
}
// namespace core
178
}
// namespace rss
179
}
// namespace ad
180
184
#ifndef GEN_GUARD_AD_RSS_CORE_RELATIVECONSTELLATION
185
#define GEN_GUARD_AD_RSS_CORE_RELATIVECONSTELLATION
189
namespace
ad
{
193
namespace
rss {
197
namespace
core {
198
208
inline
std::ostream &
operator<<
(std::ostream &os,
RelativeConstellation
const
&_value)
209
{
210
os <<
"RelativeConstellation("
;
211
os <<
"ego_id:"
;
212
os << _value.
ego_id
;
213
os <<
","
;
214
os <<
"object_id:"
;
215
os << _value.
object_id
;
216
os <<
","
;
217
os <<
"constellation_id:"
;
218
os << _value.
constellation_id
;
219
os <<
","
;
220
os <<
"constellation_type:"
;
221
os << _value.
constellation_type
;
222
os <<
","
;
223
os <<
"ego_state:"
;
224
os << _value.
ego_state
;
225
os <<
","
;
226
os <<
"other_state:"
;
227
os << _value.
other_state
;
228
os <<
","
;
229
os <<
"relative_position:"
;
230
os << _value.
relative_position
;
231
os <<
","
;
232
os <<
"world_model_indices:"
;
233
os << _value.
world_model_indices
;
234
os <<
")"
;
235
return
os;
236
}
237
238
}
// namespace core
239
}
// namespace rss
240
}
// namespace ad
241
242
namespace
std {
246
inline
std::string
to_string
(::
ad::rss::core::RelativeConstellation
const
&value)
247
{
248
stringstream sstream;
249
sstream << value;
250
return
sstream.str();
251
}
252
}
// namespace std
253
257
template
<>
struct
fmt::formatter<::
ad::rss::core::RelativeConstellation
> : formatter<string_view>
258
{
259
template
<
typename
FormatContext>
auto
format(::
ad::rss::core::RelativeConstellation
const
&value, FormatContext &ctx)
260
{
261
return
formatter<string_view>::format(std::to_string(value), ctx);
262
}
263
};
264
265
#endif
// GEN_GUARD_AD_RSS_CORE_RELATIVECONSTELLATION
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
ObjectId.hpp
RelativeConstellationId.hpp
RelativeObjectState.hpp
RelativePosition.hpp
WorldModelIndexVector.hpp
ad::rss::core::RelativeConstellationId
uint64_t RelativeConstellationId
DataType RelativeConstellationId.
Definition:
RelativeConstellationId.hpp:39
ad::rss::core::operator<<
std::ostream & operator<<(std::ostream &os, LateralRelativePosition const &value)
standard ostream operator
Definition:
LateralRelativePosition.hpp:149
ad::rss::world::WorldModelIndexVector
std::vector<::ad::rss::world::WorldModelIndex > WorldModelIndexVector
DataType WorldModelIndexVector.
Definition:
WorldModelIndexVector.hpp:44
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::core::RelativeConstellation
DataType RelativeConstellation.
Definition:
RelativeConstellation.hpp:56
ad::rss::core::RelativeConstellation::operator=
RelativeConstellation & operator=(RelativeConstellation &&other)=default
standard move operator
ad::rss::core::RelativeConstellation::other_state
::ad::rss::core::RelativeObjectState other_state
Definition:
RelativeConstellation.hpp:162
ad::rss::core::RelativeConstellation::ConstPtr
std::shared_ptr< RelativeConstellation const > ConstPtr
Smart pointer on constant RelativeConstellation.
Definition:
RelativeConstellation.hpp:65
ad::rss::core::RelativeConstellation::operator==
bool operator==(const RelativeConstellation &other) const
standard comparison operator
Definition:
RelativeConstellation.hpp:112
ad::rss::core::RelativeConstellation::ego_id
::ad::rss::world::ObjectId ego_id
Definition:
RelativeConstellation.hpp:135
ad::rss::core::RelativeConstellation::RelativeConstellation
RelativeConstellation(RelativeConstellation &&other)=default
standard move constructor
ad::rss::core::RelativeConstellation::~RelativeConstellation
~RelativeConstellation()=default
standard destructor
ad::rss::core::RelativeConstellation::world_model_indices
::ad::rss::world::WorldModelIndexVector world_model_indices
Definition:
RelativeConstellation.hpp:174
ad::rss::core::RelativeConstellation::constellation_type
::ad::rss::world::ConstellationType constellation_type
Definition:
RelativeConstellation.hpp:152
ad::rss::core::RelativeConstellation::ego_state
::ad::rss::core::RelativeObjectState ego_state
Definition:
RelativeConstellation.hpp:157
ad::rss::core::RelativeConstellation::constellation_id
::ad::rss::core::RelativeConstellationId constellation_id
Definition:
RelativeConstellation.hpp:147
ad::rss::core::RelativeConstellation::operator=
RelativeConstellation & operator=(const RelativeConstellation &other)=default
standard assignment operator
ad::rss::core::RelativeConstellation::RelativeConstellation
RelativeConstellation()=default
standard constructor
ad::rss::core::RelativeConstellation::Ptr
std::shared_ptr< RelativeConstellation > Ptr
Smart pointer on RelativeConstellation.
Definition:
RelativeConstellation.hpp:60
ad::rss::core::RelativeConstellation::RelativeConstellation
RelativeConstellation(const RelativeConstellation &other)=default
standard copy constructor
ad::rss::core::RelativeConstellation::object_id
::ad::rss::world::ObjectId object_id
Definition:
RelativeConstellation.hpp:140
ad::rss::core::RelativeConstellation::operator!=
bool operator!=(const RelativeConstellation &other) const
standard comparison operator
Definition:
RelativeConstellation.hpp:127
ad::rss::core::RelativeConstellation::relative_position
::ad::rss::core::RelativePosition relative_position
Definition:
RelativeConstellation.hpp:168
ad::rss::core::RelativeObjectState
DataType RelativeObjectState.
Definition:
RelativeObjectState.hpp:48
ad::rss::core::RelativePosition
DataType RelativePosition.
Definition:
RelativePosition.hpp:46
Generated by
1.9.1