ad_rss
AccelerationRestriction.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>
23 #include "ad/physics/AccelerationRange.hpp"
27 namespace ad {
31 namespace rss {
35 namespace state {
36 
43 {
47  typedef std::shared_ptr<AccelerationRestriction> Ptr;
48 
52  typedef std::shared_ptr<AccelerationRestriction const> ConstPtr;
53 
57  AccelerationRestriction() = default;
58 
62  ~AccelerationRestriction() = default;
63 
67  AccelerationRestriction(const AccelerationRestriction &other) = default;
68 
73 
82 
91 
99  bool operator==(const AccelerationRestriction &other) const
100  {
102  && (lateralRightRange == other.lateralRightRange);
103  }
104 
112  bool operator!=(const AccelerationRestriction &other) const
113  {
114  return !operator==(other);
115  }
116 
120  ::ad::physics::AccelerationRange lateralLeftRange;
121 
125  ::ad::physics::AccelerationRange longitudinalRange;
126 
130  ::ad::physics::AccelerationRange lateralRightRange;
131 };
132 
133 } // namespace state
134 } // namespace rss
135 } // namespace ad
136 
140 #ifndef GEN_GUARD_AD_RSS_STATE_ACCELERATIONRESTRICTION
141 #define GEN_GUARD_AD_RSS_STATE_ACCELERATIONRESTRICTION
142 
145 namespace ad {
149 namespace rss {
153 namespace state {
154 
164 inline std::ostream &operator<<(std::ostream &os, AccelerationRestriction const &_value)
165 {
166  os << "AccelerationRestriction(";
167  os << "lateralLeftRange:";
168  os << _value.lateralLeftRange;
169  os << ",";
170  os << "longitudinalRange:";
171  os << _value.longitudinalRange;
172  os << ",";
173  os << "lateralRightRange:";
174  os << _value.lateralRightRange;
175  os << ")";
176  return os;
177 }
178 
179 } // namespace state
180 } // namespace rss
181 } // namespace ad
182 
183 namespace std {
187 inline std::string to_string(::ad::rss::state::AccelerationRestriction const &value)
188 {
189  stringstream sstream;
190  sstream << value;
191  return sstream.str();
192 }
193 } // namespace std
194 #endif // GEN_GUARD_AD_RSS_STATE_ACCELERATIONRESTRICTION
ad
namespace ad
Definition: LateralRelativePosition.hpp:26
ad::rss::state::AccelerationRestriction::AccelerationRestriction
AccelerationRestriction()=default
standard constructor
ad::rss::state::AccelerationRestriction::lateralRightRange
::ad::physics::AccelerationRange lateralRightRange
Definition: AccelerationRestriction.hpp:130
ad::rss::state::AccelerationRestriction::ConstPtr
std::shared_ptr< AccelerationRestriction const > ConstPtr
Smart pointer on constant AccelerationRestriction.
Definition: AccelerationRestriction.hpp:52
ad::rss::state::AccelerationRestriction::operator==
bool operator==(const AccelerationRestriction &other) const
standard comparison operator
Definition: AccelerationRestriction.hpp:99
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::state::AccelerationRestriction::lateralLeftRange
::ad::physics::AccelerationRange lateralLeftRange
Definition: AccelerationRestriction.hpp:120
ad::rss::state::AccelerationRestriction
DataType AccelerationRestriction.
Definition: AccelerationRestriction.hpp:42
ad::rss::state::AccelerationRestriction::operator=
AccelerationRestriction & operator=(const AccelerationRestriction &other)=default
standard assignment operator
ad::rss::state::AccelerationRestriction::operator!=
bool operator!=(const AccelerationRestriction &other) const
standard comparison operator
Definition: AccelerationRestriction.hpp:112
ad::rss::state::AccelerationRestriction::~AccelerationRestriction
~AccelerationRestriction()=default
standard destructor
ad::rss::state::operator<<
std::ostream & operator<<(std::ostream &os, AccelerationRestriction const &_value)
standard ostream operator
Definition: AccelerationRestriction.hpp:164
ad::rss::state::AccelerationRestriction::Ptr
std::shared_ptr< AccelerationRestriction > Ptr
Smart pointer on AccelerationRestriction.
Definition: AccelerationRestriction.hpp:47
ad::rss::state::AccelerationRestriction::longitudinalRange
::ad::physics::AccelerationRange longitudinalRange
Definition: AccelerationRestriction.hpp:125