ad_rss
Scene.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 <memory>
22 #include <sstream>
24 #include "ad/rss/world/Object.hpp"
30 namespace ad {
34 namespace rss {
38 namespace world {
39 
48 struct Scene
49 {
53  typedef std::shared_ptr<Scene> Ptr;
54 
58  typedef std::shared_ptr<Scene const> ConstPtr;
59 
63  Scene() = default;
64 
68  ~Scene() = default;
69 
73  Scene(const Scene &other) = default;
74 
78  Scene(Scene &&other) = default;
79 
87  Scene &operator=(const Scene &other) = default;
88 
96  Scene &operator=(Scene &&other) = default;
97 
105  bool operator==(const Scene &other) const
106  {
107  return (situationType == other.situationType) && (egoVehicle == other.egoVehicle)
108  && (egoVehicleRssDynamics == other.egoVehicleRssDynamics) && (object == other.object)
110  && (egoVehicleRoad == other.egoVehicleRoad);
111  }
112 
120  bool operator!=(const Scene &other) const
121  {
122  return !operator==(other);
123  }
124 
128  ::ad::rss::situation::SituationType situationType{::ad::rss::situation::SituationType::SameDirection};
129 
134 
141 
146 
152 
159 
165 };
166 
167 } // namespace world
168 } // namespace rss
169 } // namespace ad
170 
174 #ifndef GEN_GUARD_AD_RSS_WORLD_SCENE
175 #define GEN_GUARD_AD_RSS_WORLD_SCENE
176 
179 namespace ad {
183 namespace rss {
187 namespace world {
188 
198 inline std::ostream &operator<<(std::ostream &os, Scene const &_value)
199 {
200  os << "Scene(";
201  os << "situationType:";
202  os << _value.situationType;
203  os << ",";
204  os << "egoVehicle:";
205  os << _value.egoVehicle;
206  os << ",";
207  os << "egoVehicleRssDynamics:";
208  os << _value.egoVehicleRssDynamics;
209  os << ",";
210  os << "object:";
211  os << _value.object;
212  os << ",";
213  os << "objectRssDynamics:";
214  os << _value.objectRssDynamics;
215  os << ",";
216  os << "intersectingRoad:";
217  os << _value.intersectingRoad;
218  os << ",";
219  os << "egoVehicleRoad:";
220  os << _value.egoVehicleRoad;
221  os << ")";
222  return os;
223 }
224 
225 } // namespace world
226 } // namespace rss
227 } // namespace ad
228 
229 namespace std {
233 inline std::string to_string(::ad::rss::world::Scene const &value)
234 {
235  stringstream sstream;
236  sstream << value;
237  return sstream.str();
238 }
239 } // namespace std
240 #endif // GEN_GUARD_AD_RSS_WORLD_SCENE
ad::rss::world::RoadArea
std::vector<::ad::rss::world::RoadSegment > RoadArea
DataType RoadArea.
Definition: RoadArea.hpp:43
ad
namespace ad
Definition: LateralRelativePosition.hpp:26
Object.hpp
ad::rss::world::Scene::egoVehicleRoad
::ad::rss::world::RoadArea egoVehicleRoad
Definition: Scene.hpp:164
ad::rss::world::Scene::objectRssDynamics
::ad::rss::world::RssDynamics objectRssDynamics
Definition: Scene.hpp:151
RoadArea.hpp
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
ad::rss::world::Scene::egoVehicleRssDynamics
::ad::rss::world::RssDynamics egoVehicleRssDynamics
Definition: Scene.hpp:140
ad::rss::world::Scene
DataType Scene.
Definition: Scene.hpp:48
ad::rss::world::Scene::egoVehicle
::ad::rss::world::Object egoVehicle
Definition: Scene.hpp:133
ad::rss::world::Scene::operator=
Scene & operator=(const Scene &other)=default
standard assignment operator
ad::rss::world::operator<<
std::ostream & operator<<(std::ostream &os, LaneDrivingDirection const &value)
standard ostream operator
Definition: LaneDrivingDirection.hpp:132
ad::rss::world::Object
DataType Object.
Definition: Object.hpp:48
ad::rss::world::RssDynamics
DataType RssDynamics.
Definition: RssDynamics.hpp:50
ad::rss::world::Scene::intersectingRoad
::ad::rss::world::RoadArea intersectingRoad
Definition: Scene.hpp:158
ad::rss::world::Scene::object
::ad::rss::world::Object object
Definition: Scene.hpp:145
ad::rss::world::Scene::operator==
bool operator==(const Scene &other) const
standard comparison operator
Definition: Scene.hpp:105
ad::rss::world::Scene::operator!=
bool operator!=(const Scene &other) const
standard comparison operator
Definition: Scene.hpp:120
ad::rss::world::Scene::Ptr
std::shared_ptr< Scene > Ptr
Smart pointer on Scene.
Definition: Scene.hpp:53
SituationType.hpp
ad::rss::situation::SituationType
SituationType
DataType SituationType.
Definition: SituationType.hpp:41
ad::rss::world::Scene::~Scene
~Scene()=default
standard destructor
ad::rss::world::Scene::ConstPtr
std::shared_ptr< Scene const > ConstPtr
Smart pointer on constant Scene.
Definition: Scene.hpp:58
RssDynamics.hpp
ad::rss::world::Scene::situationType
::ad::rss::situation::SituationType situationType
Definition: Scene.hpp:128
ad::rss::world::Scene::Scene
Scene()=default
standard constructor