ad_rss
WorldModel.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 world {
39 
46 struct WorldModel
47 {
51  typedef std::shared_ptr<WorldModel> Ptr;
52 
56  typedef std::shared_ptr<WorldModel const> ConstPtr;
57 
61  WorldModel() = default;
62 
66  ~WorldModel() = default;
67 
71  WorldModel(const WorldModel &other) = default;
72 
76  WorldModel(WorldModel &&other) = default;
77 
85  WorldModel &operator=(const WorldModel &other) = default;
86 
94  WorldModel &operator=(WorldModel &&other) = default;
95 
103  bool operator==(const WorldModel &other) const
104  {
106  && (scenes == other.scenes);
107  }
108 
116  bool operator!=(const WorldModel &other) const
117  {
118  return !operator==(other);
119  }
120 
127 
135 
140 };
141 
142 } // namespace world
143 } // namespace rss
144 } // namespace ad
145 
149 #ifndef GEN_GUARD_AD_RSS_WORLD_WORLDMODEL
150 #define GEN_GUARD_AD_RSS_WORLD_WORLDMODEL
151 
154 namespace ad {
158 namespace rss {
162 namespace world {
163 
173 inline std::ostream &operator<<(std::ostream &os, WorldModel const &_value)
174 {
175  os << "WorldModel(";
176  os << "timeIndex:";
177  os << _value.timeIndex;
178  os << ",";
179  os << "defaultEgoVehicleRssDynamics:";
180  os << _value.defaultEgoVehicleRssDynamics;
181  os << ",";
182  os << "scenes:";
183  os << _value.scenes;
184  os << ")";
185  return os;
186 }
187 
188 } // namespace world
189 } // namespace rss
190 } // namespace ad
191 
192 namespace std {
196 inline std::string to_string(::ad::rss::world::WorldModel const &value)
197 {
198  stringstream sstream;
199  sstream << value;
200  return sstream.str();
201 }
202 } // namespace std
203 #endif // GEN_GUARD_AD_RSS_WORLD_WORLDMODEL
ad
namespace ad
Definition: LateralRelativePosition.hpp:26
ad::rss::world::TimeIndex
uint64_t TimeIndex
DataType TimeIndex.
Definition: TimeIndex.hpp:39
ad::rss::world::WorldModel::scenes
::ad::rss::world::SceneVector scenes
Definition: WorldModel.hpp:139
ad::rss::world::WorldModel::timeIndex
::ad::rss::world::TimeIndex timeIndex
Definition: WorldModel.hpp:126
ad::rss::world::WorldModel::~WorldModel
~WorldModel()=default
standard destructor
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
SceneVector.hpp
ad::rss::world::WorldModel::ConstPtr
std::shared_ptr< WorldModel const > ConstPtr
Smart pointer on constant WorldModel.
Definition: WorldModel.hpp:56
ad::rss::world::operator<<
std::ostream & operator<<(std::ostream &os, LaneDrivingDirection const &value)
standard ostream operator
Definition: LaneDrivingDirection.hpp:132
ad::rss::world::WorldModel::Ptr
std::shared_ptr< WorldModel > Ptr
Smart pointer on WorldModel.
Definition: WorldModel.hpp:51
ad::rss::world::RssDynamics
DataType RssDynamics.
Definition: RssDynamics.hpp:50
ad::rss::world::WorldModel::operator==
bool operator==(const WorldModel &other) const
standard comparison operator
Definition: WorldModel.hpp:103
ad::rss::world::WorldModel::defaultEgoVehicleRssDynamics
::ad::rss::world::RssDynamics defaultEgoVehicleRssDynamics
Definition: WorldModel.hpp:134
ad::rss::world::SceneVector
std::vector<::ad::rss::world::Scene > SceneVector
DataType SceneVector.
Definition: SceneVector.hpp:42
ad::rss::world::WorldModel::operator=
WorldModel & operator=(const WorldModel &other)=default
standard assignment operator
TimeIndex.hpp
ad::rss::world::WorldModel::operator!=
bool operator!=(const WorldModel &other) const
standard comparison operator
Definition: WorldModel.hpp:116
ad::rss::world::WorldModel::WorldModel
WorldModel()=default
standard constructor
RssDynamics.hpp
ad::rss::world::WorldModel
DataType WorldModel.
Definition: WorldModel.hpp:46