ad_rss
ProperResponse.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>
34 namespace ad {
38 namespace rss {
42 namespace state {
43 
51 {
55  typedef std::shared_ptr<ProperResponse> Ptr;
56 
60  typedef std::shared_ptr<ProperResponse const> ConstPtr;
61 
65  ProperResponse() = default;
66 
70  ~ProperResponse() = default;
71 
75  ProperResponse(const ProperResponse &other) = default;
76 
80  ProperResponse(ProperResponse &&other) = default;
81 
89  ProperResponse &operator=(const ProperResponse &other) = default;
90 
98  ProperResponse &operator=(ProperResponse &&other) = default;
99 
107  bool operator==(const ProperResponse &other) const
108  {
109  return (timeIndex == other.timeIndex) && (isSafe == other.isSafe) && (dangerousObjects == other.dangerousObjects)
114  }
115 
123  bool operator!=(const ProperResponse &other) const
124  {
125  return !operator==(other);
126  }
127 
134 
138  bool isSafe{false};
139 
144 
149 
154 
159 
165 
170 
175 };
176 
177 } // namespace state
178 } // namespace rss
179 } // namespace ad
180 
184 #ifndef GEN_GUARD_AD_RSS_STATE_PROPERRESPONSE
185 #define GEN_GUARD_AD_RSS_STATE_PROPERRESPONSE
186 
189 namespace ad {
193 namespace rss {
197 namespace state {
198 
208 inline std::ostream &operator<<(std::ostream &os, ProperResponse const &_value)
209 {
210  os << "ProperResponse(";
211  os << "timeIndex:";
212  os << _value.timeIndex;
213  os << ",";
214  os << "isSafe:";
215  os << _value.isSafe;
216  os << ",";
217  os << "dangerousObjects:";
218  os << _value.dangerousObjects;
219  os << ",";
220  os << "longitudinalResponse:";
221  os << _value.longitudinalResponse;
222  os << ",";
223  os << "lateralResponseRight:";
224  os << _value.lateralResponseRight;
225  os << ",";
226  os << "lateralResponseLeft:";
227  os << _value.lateralResponseLeft;
228  os << ",";
229  os << "headingRanges:";
230  os << _value.headingRanges;
231  os << ",";
232  os << "accelerationRestrictions:";
233  os << _value.accelerationRestrictions;
234  os << ",";
235  os << "unstructuredSceneResponse:";
236  os << _value.unstructuredSceneResponse;
237  os << ")";
238  return os;
239 }
240 
241 } // namespace state
242 } // namespace rss
243 } // namespace ad
244 
245 namespace std {
249 inline std::string to_string(::ad::rss::state::ProperResponse const &value)
250 {
251  stringstream sstream;
252  sstream << value;
253  return sstream.str();
254 }
255 } // namespace std
256 #endif // GEN_GUARD_AD_RSS_STATE_PROPERRESPONSE
LateralResponse.hpp
ad
namespace ad
Definition: LateralRelativePosition.hpp:26
ad::rss::state::ProperResponse::operator=
ProperResponse & operator=(const ProperResponse &other)=default
standard assignment operator
ad::rss::state::ProperResponse::ProperResponse
ProperResponse()=default
standard constructor
ad::rss::state::ProperResponse::isSafe
bool isSafe
Definition: ProperResponse.hpp:138
ad::rss::world::TimeIndex
uint64_t TimeIndex
DataType TimeIndex.
Definition: TimeIndex.hpp:39
ad::rss::state::HeadingRangeVector
std::vector<::ad::rss::state::HeadingRange > HeadingRangeVector
DataType HeadingRangeVector.
Definition: HeadingRangeVector.hpp:42
ad::rss::state::ProperResponse::lateralResponseLeft
::ad::rss::state::LateralResponse lateralResponseLeft
Definition: ProperResponse.hpp:158
ad::rss::state::ProperResponse::headingRanges
::ad::rss::state::HeadingRangeVector headingRanges
Definition: ProperResponse.hpp:164
ad::rss::state::LateralResponse
LateralResponse
DataType LateralResponse.
Definition: LateralResponse.hpp:43
ad::rss::state::ProperResponse::lateralResponseRight
::ad::rss::state::LateralResponse lateralResponseRight
Definition: ProperResponse.hpp:153
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
LongitudinalResponse.hpp
ad::rss::world::ObjectIdVector
std::vector<::ad::rss::world::ObjectId > ObjectIdVector
DataType ObjectIdVector.
Definition: ObjectIdVector.hpp:42
ad::rss::state::ProperResponse::Ptr
std::shared_ptr< ProperResponse > Ptr
Smart pointer on ProperResponse.
Definition: ProperResponse.hpp:55
ad::rss::state::AccelerationRestriction
DataType AccelerationRestriction.
Definition: AccelerationRestriction.hpp:42
ad::rss::state::ProperResponse::timeIndex
::ad::rss::world::TimeIndex timeIndex
Definition: ProperResponse.hpp:133
ad::rss::state::ProperResponse::operator!=
bool operator!=(const ProperResponse &other) const
standard comparison operator
Definition: ProperResponse.hpp:123
ad::rss::state::ProperResponse::longitudinalResponse
::ad::rss::state::LongitudinalResponse longitudinalResponse
Definition: ProperResponse.hpp:148
ad::rss::state::UnstructuredSceneResponse
UnstructuredSceneResponse
DataType UnstructuredSceneResponse.
Definition: UnstructuredSceneResponse.hpp:39
AccelerationRestriction.hpp
ObjectIdVector.hpp
ad::rss::state::ProperResponse::~ProperResponse
~ProperResponse()=default
standard destructor
TimeIndex.hpp
ad::rss::state::operator<<
std::ostream & operator<<(std::ostream &os, AccelerationRestriction const &_value)
standard ostream operator
Definition: AccelerationRestriction.hpp:164
ad::rss::state::ProperResponse::unstructuredSceneResponse
::ad::rss::state::UnstructuredSceneResponse unstructuredSceneResponse
Definition: ProperResponse.hpp:174
ad::rss::state::ProperResponse::accelerationRestrictions
::ad::rss::state::AccelerationRestriction accelerationRestrictions
Definition: ProperResponse.hpp:169
ad::rss::state::ProperResponse::operator==
bool operator==(const ProperResponse &other) const
standard comparison operator
Definition: ProperResponse.hpp:107
ad::rss::state::ProperResponse::ConstPtr
std::shared_ptr< ProperResponse const > ConstPtr
Smart pointer on constant ProperResponse.
Definition: ProperResponse.hpp:60
ad::rss::state::ProperResponse
DataType ProperResponse.
Definition: ProperResponse.hpp:50
ad::rss::state::LongitudinalResponse
LongitudinalResponse
DataType LongitudinalResponse.
Definition: LongitudinalResponse.hpp:43
ad::rss::state::ProperResponse::dangerousObjects
::ad::rss::world::ObjectIdVector dangerousObjects
Definition: ProperResponse.hpp:143
UnstructuredSceneResponse.hpp
HeadingRangeVector.hpp