ad_rss
RssStateSnapshot.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>
31 namespace ad {
35 namespace rss {
39 namespace state {
40 
47 {
51  typedef std::shared_ptr<RssStateSnapshot> Ptr;
52 
56  typedef std::shared_ptr<RssStateSnapshot const> ConstPtr;
57 
61  RssStateSnapshot() = default;
62 
66  ~RssStateSnapshot() = default;
67 
71  RssStateSnapshot(const RssStateSnapshot &other) = default;
72 
76  RssStateSnapshot(RssStateSnapshot &&other) = default;
77 
85  RssStateSnapshot &operator=(const RssStateSnapshot &other) = default;
86 
95 
103  bool operator==(const RssStateSnapshot &other) const
104  {
105  return (time_index == other.time_index)
109  }
110 
118  bool operator!=(const RssStateSnapshot &other) const
119  {
120  return !operator==(other);
121  }
122 
129 
137 
142 
147 };
148 
149 } // namespace state
150 } // namespace rss
151 } // namespace ad
152 
156 #ifndef GEN_GUARD_AD_RSS_STATE_RSSSTATESNAPSHOT
157 #define GEN_GUARD_AD_RSS_STATE_RSSSTATESNAPSHOT
161 namespace ad {
165 namespace rss {
169 namespace state {
170 
180 inline std::ostream &operator<<(std::ostream &os, RssStateSnapshot const &_value)
181 {
182  os << "RssStateSnapshot(";
183  os << "time_index:";
184  os << _value.time_index;
185  os << ",";
186  os << "default_ego_vehicle_rss_dynamics:";
188  os << ",";
189  os << "individual_responses:";
190  os << _value.individual_responses;
191  os << ",";
192  os << "unstructured_constellation_ego_information:";
194  os << ")";
195  return os;
196 }
197 
198 } // namespace state
199 } // namespace rss
200 } // namespace ad
201 
202 namespace std {
206 inline std::string to_string(::ad::rss::state::RssStateSnapshot const &value)
207 {
208  stringstream sstream;
209  sstream << value;
210  return sstream.str();
211 }
212 } // namespace std
213 
217 template <> struct fmt::formatter<::ad::rss::state::RssStateSnapshot> : formatter<string_view>
218 {
219  template <typename FormatContext> auto format(::ad::rss::state::RssStateSnapshot const &value, FormatContext &ctx)
220  {
221  return formatter<string_view>::format(std::to_string(value), ctx);
222  }
223 };
224 
225 #endif // GEN_GUARD_AD_RSS_STATE_RSSSTATESNAPSHOT
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::state::RssState > RssStateVector
DataType RssStateVector.
Definition: RssStateVector.hpp:42
std::ostream & operator<<(std::ostream &os, AccelerationRestriction const &_value)
standard ostream operator
Definition: AccelerationRestriction.hpp:164
uint64_t TimeIndex
DataType TimeIndex.
Definition: TimeIndex.hpp:39
namespace ad
Definition: LateralRelativePosition.hpp:28
DataType RssStateSnapshot.
Definition: RssStateSnapshot.hpp:47
RssStateSnapshot(RssStateSnapshot &&other)=default
standard move constructor
::ad::rss::state::UnstructuredConstellationStateInformation unstructured_constellation_ego_information
Definition: RssStateSnapshot.hpp:146
RssStateSnapshot & operator=(RssStateSnapshot &&other)=default
standard move operator
bool operator!=(const RssStateSnapshot &other) const
standard comparison operator
Definition: RssStateSnapshot.hpp:118
~RssStateSnapshot()=default
standard destructor
::ad::rss::world::TimeIndex time_index
Definition: RssStateSnapshot.hpp:128
RssStateSnapshot()=default
standard constructor
RssStateSnapshot(const RssStateSnapshot &other)=default
standard copy constructor
::ad::rss::state::RssStateVector individual_responses
Definition: RssStateSnapshot.hpp:141
std::shared_ptr< RssStateSnapshot const > ConstPtr
Smart pointer on constant RssStateSnapshot.
Definition: RssStateSnapshot.hpp:56
bool operator==(const RssStateSnapshot &other) const
standard comparison operator
Definition: RssStateSnapshot.hpp:103
std::shared_ptr< RssStateSnapshot > Ptr
Smart pointer on RssStateSnapshot.
Definition: RssStateSnapshot.hpp:51
::ad::rss::world::RssDynamics default_ego_vehicle_rss_dynamics
Definition: RssStateSnapshot.hpp:136
RssStateSnapshot & operator=(const RssStateSnapshot &other)=default
standard assignment operator
DataType UnstructuredConstellationStateInformation.
Definition: UnstructuredConstellationStateInformation.hpp:45
DataType RssDynamics.
Definition: RssDynamics.hpp:51