ad_rss
SituationSnapshot.hpp
Go to the documentation of this file.
1 /*
2  * ----------------- BEGIN LICENSE BLOCK ---------------------------------
3  *
4  * Copyright (C) 2018-2020 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 situation {
39 
46 {
50  typedef std::shared_ptr<SituationSnapshot> Ptr;
51 
55  typedef std::shared_ptr<SituationSnapshot const> ConstPtr;
56 
60  SituationSnapshot() = default;
61 
65  ~SituationSnapshot() = default;
66 
70  SituationSnapshot(const SituationSnapshot &other) = default;
71 
75  SituationSnapshot(SituationSnapshot &&other) = default;
76 
84  SituationSnapshot &operator=(const SituationSnapshot &other) = default;
85 
93  SituationSnapshot &operator=(SituationSnapshot &&other) = default;
94 
102  bool operator==(const SituationSnapshot &other) const
103  {
105  && (situations == other.situations);
106  }
107 
115  bool operator!=(const SituationSnapshot &other) const
116  {
117  return !operator==(other);
118  }
119 
125 
133 
138 };
139 
140 } // namespace situation
141 } // namespace rss
142 } // namespace ad
143 
147 #ifndef GEN_GUARD_AD_RSS_SITUATION_SITUATIONSNAPSHOT
148 #define GEN_GUARD_AD_RSS_SITUATION_SITUATIONSNAPSHOT
149 
152 namespace ad {
156 namespace rss {
160 namespace situation {
161 
171 inline std::ostream &operator<<(std::ostream &os, SituationSnapshot const &_value)
172 {
173  os << "SituationSnapshot(";
174  os << "timeIndex:";
175  os << _value.timeIndex;
176  os << ",";
177  os << "defaultEgoVehicleRssDynamics:";
178  os << _value.defaultEgoVehicleRssDynamics;
179  os << ",";
180  os << "situations:";
181  os << _value.situations;
182  os << ")";
183  return os;
184 }
185 
186 } // namespace situation
187 } // namespace rss
188 } // namespace ad
189 
190 namespace std {
194 inline std::string to_string(::ad::rss::situation::SituationSnapshot const &value)
195 {
196  stringstream sstream;
197  sstream << value;
198  return sstream.str();
199 }
200 } // namespace std
201 #endif // GEN_GUARD_AD_RSS_SITUATION_SITUATIONSNAPSHOT
ad
namespace ad
Definition: LateralRelativePosition.hpp:26
ad::rss::situation::SituationSnapshot::ConstPtr
std::shared_ptr< SituationSnapshot const > ConstPtr
Smart pointer on constant SituationSnapshot.
Definition: SituationSnapshot.hpp:55
ad::rss::world::TimeIndex
uint64_t TimeIndex
DataType TimeIndex.
Definition: TimeIndex.hpp:39
ad::rss::situation::SituationSnapshot::SituationSnapshot
SituationSnapshot()=default
standard constructor
ad::rss::situation::SituationSnapshot
DataType SituationSnapshot.
Definition: SituationSnapshot.hpp:45
std::to_string
std::string to_string(::ad::rss::situation::LateralRelativePosition const &value)
overload of the std::to_string for LateralRelativePosition
Definition: LateralRelativePosition.hpp:160
SituationVector.hpp
ad::rss::world::RssDynamics
DataType RssDynamics.
Definition: RssDynamics.hpp:50
ad::rss::situation::operator<<
std::ostream & operator<<(std::ostream &os, LateralRelativePosition const &value)
standard ostream operator
Definition: LateralRelativePosition.hpp:147
ad::rss::situation::SituationSnapshot::operator=
SituationSnapshot & operator=(const SituationSnapshot &other)=default
standard assignment operator
ad::rss::situation::SituationSnapshot::operator==
bool operator==(const SituationSnapshot &other) const
standard comparison operator
Definition: SituationSnapshot.hpp:102
ad::rss::situation::SituationSnapshot::Ptr
std::shared_ptr< SituationSnapshot > Ptr
Smart pointer on SituationSnapshot.
Definition: SituationSnapshot.hpp:50
ad::rss::situation::SituationSnapshot::timeIndex
::ad::rss::world::TimeIndex timeIndex
Definition: SituationSnapshot.hpp:124
ad::rss::situation::SituationSnapshot::operator!=
bool operator!=(const SituationSnapshot &other) const
standard comparison operator
Definition: SituationSnapshot.hpp:115
TimeIndex.hpp
ad::rss::situation::SituationVector
std::vector<::ad::rss::situation::Situation > SituationVector
DataType SituationVector.
Definition: SituationVector.hpp:42
ad::rss::situation::SituationSnapshot::situations
::ad::rss::situation::SituationVector situations
Definition: SituationSnapshot.hpp:137
ad::rss::situation::SituationSnapshot::defaultEgoVehicleRssDynamics
::ad::rss::world::RssDynamics defaultEgoVehicleRssDynamics
Definition: SituationSnapshot.hpp:132
RssDynamics.hpp
ad::rss::situation::SituationSnapshot::~SituationSnapshot
~SituationSnapshot()=default
standard destructor