ad_rss
LateralRssAccelerationValues.hpp
Go to the documentation of this file.
1 /*
2  * ----------------- BEGIN LICENSE BLOCK ---------------------------------
3  *
4  * Copyright (C) 2018-2022 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/Acceleration.hpp"
28 namespace ad {
32 namespace rss {
36 namespace world {
37 
44 {
48  typedef std::shared_ptr<LateralRssAccelerationValues> Ptr;
49 
53  typedef std::shared_ptr<LateralRssAccelerationValues const> ConstPtr;
54 
59 
64 
69 
74 
83 
92 
100  bool operator==(const LateralRssAccelerationValues &other) const
101  {
102  return (accel_max == other.accel_max) && (brake_min == other.brake_min);
103  }
104 
112  bool operator!=(const LateralRssAccelerationValues &other) const
113  {
114  return !operator==(other);
115  }
116 
120  ::ad::physics::Acceleration accel_max{0.0};
121 
125  ::ad::physics::Acceleration brake_min{0.0};
126 };
127 
128 } // namespace world
129 } // namespace rss
130 } // namespace ad
131 
135 #ifndef GEN_GUARD_AD_RSS_WORLD_LATERALRSSACCELERATIONVALUES
136 #define GEN_GUARD_AD_RSS_WORLD_LATERALRSSACCELERATIONVALUES
140 namespace ad {
144 namespace rss {
148 namespace world {
149 
159 inline std::ostream &operator<<(std::ostream &os, LateralRssAccelerationValues const &_value)
160 {
161  os << "LateralRssAccelerationValues(";
162  os << "accel_max:";
163  os << _value.accel_max;
164  os << ",";
165  os << "brake_min:";
166  os << _value.brake_min;
167  os << ")";
168  return os;
169 }
170 
171 } // namespace world
172 } // namespace rss
173 } // namespace ad
174 
175 namespace std {
179 inline std::string to_string(::ad::rss::world::LateralRssAccelerationValues const &value)
180 {
181  stringstream sstream;
182  sstream << value;
183  return sstream.str();
184 }
185 } // namespace std
186 
190 template <> struct fmt::formatter<::ad::rss::world::LateralRssAccelerationValues> : formatter<string_view>
191 {
192  template <typename FormatContext>
193  auto format(::ad::rss::world::LateralRssAccelerationValues const &value, FormatContext &ctx)
194  {
195  return formatter<string_view>::format(std::to_string(value), ctx);
196  }
197 };
198 
199 #endif // GEN_GUARD_AD_RSS_WORLD_LATERALRSSACCELERATIONVALUES
std::string to_string(::ad::rss::core::LateralRelativePosition const &value)
overload of the std::to_string for LateralRelativePosition
Definition: LateralRelativePosition.hpp:162
std::ostream & operator<<(std::ostream &os, Constellation const &_value)
standard ostream operator
Definition: Constellation.hpp:198
namespace ad
Definition: LateralRelativePosition.hpp:28
DataType LateralRssAccelerationValues.
Definition: LateralRssAccelerationValues.hpp:44
LateralRssAccelerationValues & operator=(LateralRssAccelerationValues &&other)=default
standard move operator
LateralRssAccelerationValues(const LateralRssAccelerationValues &other)=default
standard copy constructor
::ad::physics::Acceleration accel_max
Definition: LateralRssAccelerationValues.hpp:120
bool operator!=(const LateralRssAccelerationValues &other) const
standard comparison operator
Definition: LateralRssAccelerationValues.hpp:112
LateralRssAccelerationValues()=default
standard constructor
std::shared_ptr< LateralRssAccelerationValues > Ptr
Smart pointer on LateralRssAccelerationValues.
Definition: LateralRssAccelerationValues.hpp:48
LateralRssAccelerationValues(LateralRssAccelerationValues &&other)=default
standard move constructor
std::shared_ptr< LateralRssAccelerationValues const > ConstPtr
Smart pointer on constant LateralRssAccelerationValues.
Definition: LateralRssAccelerationValues.hpp:53
::ad::physics::Acceleration brake_min
Definition: LateralRssAccelerationValues.hpp:125
LateralRssAccelerationValues & operator=(const LateralRssAccelerationValues &other)=default
standard assignment operator
~LateralRssAccelerationValues()=default
standard destructor
bool operator==(const LateralRssAccelerationValues &other) const
standard comparison operator
Definition: LateralRssAccelerationValues.hpp:100