ad_rss
RssSituationSnapshot.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>
30 namespace ad {
34 namespace rss {
38 namespace core {
39 
46 {
50  typedef std::shared_ptr<RssSituationSnapshot> Ptr;
51 
55  typedef std::shared_ptr<RssSituationSnapshot const> ConstPtr;
56 
60  RssSituationSnapshot() = default;
61 
65  ~RssSituationSnapshot() = default;
66 
70  RssSituationSnapshot(const RssSituationSnapshot &other) = default;
71 
76 
85 
94 
102  bool operator==(const RssSituationSnapshot &other) const
103  {
104  return (time_index == other.time_index)
106  && (constellations == other.constellations);
107  }
108 
116  bool operator!=(const RssSituationSnapshot &other) const
117  {
118  return !operator==(other);
119  }
120 
126 
134 
139 };
140 
141 } // namespace core
142 } // namespace rss
143 } // namespace ad
144 
148 #ifndef GEN_GUARD_AD_RSS_CORE_RSSSITUATIONSNAPSHOT
149 #define GEN_GUARD_AD_RSS_CORE_RSSSITUATIONSNAPSHOT
153 namespace ad {
157 namespace rss {
161 namespace core {
162 
172 inline std::ostream &operator<<(std::ostream &os, RssSituationSnapshot const &_value)
173 {
174  os << "RssSituationSnapshot(";
175  os << "time_index:";
176  os << _value.time_index;
177  os << ",";
178  os << "default_ego_vehicle_rss_dynamics:";
180  os << ",";
181  os << "constellations:";
182  os << _value.constellations;
183  os << ")";
184  return os;
185 }
186 
187 } // namespace core
188 } // namespace rss
189 } // namespace ad
190 
191 namespace std {
195 inline std::string to_string(::ad::rss::core::RssSituationSnapshot const &value)
196 {
197  stringstream sstream;
198  sstream << value;
199  return sstream.str();
200 }
201 } // namespace std
202 
206 template <> struct fmt::formatter<::ad::rss::core::RssSituationSnapshot> : formatter<string_view>
207 {
208  template <typename FormatContext> auto format(::ad::rss::core::RssSituationSnapshot const &value, FormatContext &ctx)
209  {
210  return formatter<string_view>::format(std::to_string(value), ctx);
211  }
212 };
213 
214 #endif // GEN_GUARD_AD_RSS_CORE_RSSSITUATIONSNAPSHOT
std::string to_string(::ad::rss::core::LateralRelativePosition const &value)
overload of the std::to_string for LateralRelativePosition
Definition: LateralRelativePosition.hpp:162
std::vector<::ad::rss::core::RelativeConstellation > RelativeConstellationVector
DataType RelativeConstellationVector.
Definition: RelativeConstellationVector.hpp:42
std::ostream & operator<<(std::ostream &os, LateralRelativePosition const &value)
standard ostream operator
Definition: LateralRelativePosition.hpp:149
uint64_t TimeIndex
DataType TimeIndex.
Definition: TimeIndex.hpp:39
namespace ad
Definition: LateralRelativePosition.hpp:28
DataType RssSituationSnapshot.
Definition: RssSituationSnapshot.hpp:46
RssSituationSnapshot(RssSituationSnapshot &&other)=default
standard move constructor
std::shared_ptr< RssSituationSnapshot const > ConstPtr
Smart pointer on constant RssSituationSnapshot.
Definition: RssSituationSnapshot.hpp:55
~RssSituationSnapshot()=default
standard destructor
::ad::rss::world::RssDynamics default_ego_vehicle_rss_dynamics
Definition: RssSituationSnapshot.hpp:133
RssSituationSnapshot & operator=(RssSituationSnapshot &&other)=default
standard move operator
::ad::rss::core::RelativeConstellationVector constellations
Definition: RssSituationSnapshot.hpp:138
std::shared_ptr< RssSituationSnapshot > Ptr
Smart pointer on RssSituationSnapshot.
Definition: RssSituationSnapshot.hpp:50
RssSituationSnapshot()=default
standard constructor
RssSituationSnapshot & operator=(const RssSituationSnapshot &other)=default
standard assignment operator
bool operator==(const RssSituationSnapshot &other) const
standard comparison operator
Definition: RssSituationSnapshot.hpp:102
::ad::rss::world::TimeIndex time_index
Definition: RssSituationSnapshot.hpp:125
bool operator!=(const RssSituationSnapshot &other) const
standard comparison operator
Definition: RssSituationSnapshot.hpp:116
RssSituationSnapshot(const RssSituationSnapshot &other)=default
standard copy constructor
DataType RssDynamics.
Definition: RssDynamics.hpp:51