ad_rss
HeadingRange.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>
24 #include "ad/physics/Angle.hpp"
28 namespace ad {
32 namespace rss {
36 namespace state {
37 
44 {
48  typedef std::shared_ptr<HeadingRange> Ptr;
49 
53  typedef std::shared_ptr<HeadingRange const> ConstPtr;
54 
58  HeadingRange() = default;
59 
63  ~HeadingRange() = default;
64 
68  HeadingRange(const HeadingRange &other) = default;
69 
73  HeadingRange(HeadingRange &&other) = default;
74 
82  HeadingRange &operator=(const HeadingRange &other) = default;
83 
91  HeadingRange &operator=(HeadingRange &&other) = default;
92 
100  bool operator==(const HeadingRange &other) const
101  {
102  return (begin == other.begin) && (end == other.end);
103  }
104 
112  bool operator!=(const HeadingRange &other) const
113  {
114  return !operator==(other);
115  }
116 
120  ::ad::physics::Angle begin;
121 
125  ::ad::physics::Angle end;
126 };
127 
128 } // namespace state
129 } // namespace rss
130 } // namespace ad
131 
135 #ifndef GEN_GUARD_AD_RSS_STATE_HEADINGRANGE
136 #define GEN_GUARD_AD_RSS_STATE_HEADINGRANGE
137 
140 namespace ad {
144 namespace rss {
148 namespace state {
149 
159 inline std::ostream &operator<<(std::ostream &os, HeadingRange const &_value)
160 {
161  os << "HeadingRange(";
162  os << "begin:";
163  os << _value.begin;
164  os << ",";
165  os << "end:";
166  os << _value.end;
167  os << ")";
168  return os;
169 }
170 
171 } // namespace state
172 } // namespace rss
173 } // namespace ad
174 
175 namespace std {
179 inline std::string to_string(::ad::rss::state::HeadingRange const &value)
180 {
181  stringstream sstream;
182  sstream << value;
183  return sstream.str();
184 }
185 } // namespace std
186 #endif // GEN_GUARD_AD_RSS_STATE_HEADINGRANGE
ad::rss::state::HeadingRange::operator==
bool operator==(const HeadingRange &other) const
standard comparison operator
Definition: HeadingRange.hpp:100
ad
namespace ad
Definition: LateralRelativePosition.hpp:26
ad::rss::state::HeadingRange::HeadingRange
HeadingRange()=default
standard constructor
ad::rss::state::HeadingRange::operator=
HeadingRange & operator=(const HeadingRange &other)=default
standard assignment operator
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::HeadingRange::~HeadingRange
~HeadingRange()=default
standard destructor
ad::rss::state::HeadingRange::operator!=
bool operator!=(const HeadingRange &other) const
standard comparison operator
Definition: HeadingRange.hpp:112
ad::rss::state::HeadingRange::end
::ad::physics::Angle end
Definition: HeadingRange.hpp:125
ad::rss::state::HeadingRange::ConstPtr
std::shared_ptr< HeadingRange const > ConstPtr
Smart pointer on constant HeadingRange.
Definition: HeadingRange.hpp:53
ad::rss::state::HeadingRange::Ptr
std::shared_ptr< HeadingRange > Ptr
Smart pointer on HeadingRange.
Definition: HeadingRange.hpp:48
ad::rss::state::operator<<
std::ostream & operator<<(std::ostream &os, AccelerationRestriction const &_value)
standard ostream operator
Definition: AccelerationRestriction.hpp:164
ad::rss::state::HeadingRange
DataType HeadingRange.
Definition: HeadingRange.hpp:43
ad::rss::state::HeadingRange::begin
::ad::physics::Angle begin
Definition: HeadingRange.hpp:120