Branch data Line data Source code
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 : : 11 : : /** 12 : : * Generated file 13 : : * @file 14 : : * 15 : : * Generator Version : 11.0.0-2046 16 : : */ 17 : : 18 : : #pragma once 19 : : 20 : : #include <iostream> 21 : : #include <limits> 22 : : #include <memory> 23 : : #include <sstream> 24 : : #include "ad/map/point/ENUHeading.hpp" 25 : : #include "ad/physics/Acceleration.hpp" 26 : : #include "ad/physics/Angle.hpp" 27 : : #include "ad/physics/Distance.hpp" 28 : : #include "ad/physics/Speed.hpp" 29 : : #include "ad/rss/map/RssRouteId.hpp" 30 : : /*! 31 : : * @brief namespace ad 32 : : */ 33 : : namespace ad { 34 : : /*! 35 : : * @brief namespace rss 36 : : */ 37 : : namespace rss { 38 : : /*! 39 : : * @brief namespace map 40 : : */ 41 : : namespace map { 42 : : 43 : : /*! 44 : : * \brief DataType RouteAccelerations 45 : : * 46 : : * Additional accelerations to be considered by the vehicle in respect to the current route. 47 : : */ 48 : : struct RouteAccelerations 49 : : { 50 : : /*! 51 : : * \brief Smart pointer on RouteAccelerations 52 : : */ 53 : : typedef std::shared_ptr<RouteAccelerations> Ptr; 54 : : 55 : : /*! 56 : : * \brief Smart pointer on constant RouteAccelerations 57 : : */ 58 : : typedef std::shared_ptr<RouteAccelerations const> ConstPtr; 59 : : 60 : : /*! 61 : : * \brief standard constructor 62 : : */ 63 : 86 : RouteAccelerations() = default; 64 : : 65 : : /*! 66 : : * \brief standard destructor 67 : : */ 68 : : ~RouteAccelerations() = default; 69 : : 70 : : /*! 71 : : * \brief standard copy constructor 72 : : */ 73 : : RouteAccelerations(const RouteAccelerations &other) = default; 74 : : 75 : : /*! 76 : : * \brief standard move constructor 77 : : */ 78 : : RouteAccelerations(RouteAccelerations &&other) = default; 79 : : 80 : : /** 81 : : * \brief standard assignment operator 82 : : * 83 : : * \param[in] other Other RouteAccelerations 84 : : * 85 : : * \returns Reference to this RouteAccelerations. 86 : : */ 87 : : RouteAccelerations &operator=(const RouteAccelerations &other) = default; 88 : : 89 : : /** 90 : : * \brief standard move operator 91 : : * 92 : : * \param[in] other Other RouteAccelerations 93 : : * 94 : : * \returns Reference to this RouteAccelerations. 95 : : */ 96 : : RouteAccelerations &operator=(RouteAccelerations &&other) = default; 97 : : 98 : : /** 99 : : * \brief standard comparison operator 100 : : * 101 : : * \param[in] other Other RouteAccelerations 102 : : * 103 : : * \returns \c true if both RouteAccelerations are equal 104 : : */ 105 : 30 : bool operator==(const RouteAccelerations &other) const 106 : : { 107 [ + + ]: 26 : return (route_id == other.route_id) && (route_heading == other.route_heading) 108 [ + + + + ]: 24 : && (route_radius == other.route_radius) && (route_speed_lon == other.route_speed_lon) 109 [ + + + + ]: 20 : && (route_speed_lat == other.route_speed_lat) && (route_heading_delta == other.route_heading_delta) 110 [ + + + + ]: 56 : && (route_centripetal_acceleration == other.route_centripetal_acceleration); 111 : : } 112 : : 113 : : /** 114 : : * \brief standard comparison operator 115 : : * 116 : : * \param[in] other Other RouteAccelerations. 117 : : * 118 : : * \returns \c true if both RouteAccelerations are different 119 : : */ 120 : 8 : bool operator!=(const RouteAccelerations &other) const 121 : : { 122 : 8 : return !operator==(other); 123 : : } 124 : : 125 : : /*! 126 : : * The route id the vehicle restrictions are based on. 127 : : */ 128 : : ::ad::rss::map::RssRouteId route_id; 129 : : 130 : : /*! 131 : : * the considered heading of the route 132 : : */ 133 : : ::ad::map::point::ENUHeading route_heading{6.28318530718}; 134 : : 135 : : /*! 136 : : * The considered radius of the route. 137 : : */ 138 : : ::ad::physics::Distance route_radius; 139 : : 140 : : /*! 141 : : * The signed speed component in longitudinal route direction. 142 : : * The speed component is negative if the object moves in counter direction of the 143 : : * route. 144 : : */ 145 : : ::ad::physics::Speed route_speed_lon; 146 : : 147 : : /*! 148 : : * The signed speed component in lateral route direction. 149 : : */ 150 : : ::ad::physics::Speed route_speed_lat; 151 : : 152 : : /*! 153 : : * the considered heading delta of the object in respect to the route 154 : : */ 155 : : ::ad::physics::Angle route_heading_delta{0.0}; 156 : : 157 : : /*! 158 : : * The centripetal acceleration of the vehicle when following the current route curvature. 159 : : */ 160 : : ::ad::physics::Acceleration route_centripetal_acceleration; 161 : : }; 162 : : 163 : : } // namespace map 164 : : } // namespace rss 165 : : } // namespace ad 166 : : 167 : : /*! 168 : : * \brief protect the definition of functions from duplicates by typedef usage within other data types 169 : : */ 170 : : #ifndef GEN_GUARD_AD_RSS_MAP_ROUTEACCELERATIONS 171 : : #define GEN_GUARD_AD_RSS_MAP_ROUTEACCELERATIONS 172 : : /*! 173 : : * @brief namespace ad 174 : : */ 175 : : namespace ad { 176 : : /*! 177 : : * @brief namespace rss 178 : : */ 179 : : namespace rss { 180 : : /*! 181 : : * @brief namespace map 182 : : */ 183 : : namespace map { 184 : : 185 : : /** 186 : : * \brief standard ostream operator 187 : : * 188 : : * \param[in] os The output stream to write to 189 : : * \param[in] _value RouteAccelerations value 190 : : * 191 : : * \returns The stream object. 192 : : * 193 : : */ 194 : 28 : inline std::ostream &operator<<(std::ostream &os, RouteAccelerations const &_value) 195 : : { 196 : 28 : os << "RouteAccelerations("; 197 : 28 : os << "route_id:"; 198 : 28 : os << _value.route_id; 199 : 28 : os << ","; 200 : 28 : os << "route_heading:"; 201 : 28 : os << _value.route_heading; 202 : 28 : os << ","; 203 : 28 : os << "route_radius:"; 204 : 28 : os << _value.route_radius; 205 : 28 : os << ","; 206 : 28 : os << "route_speed_lon:"; 207 : 28 : os << _value.route_speed_lon; 208 : 28 : os << ","; 209 : 28 : os << "route_speed_lat:"; 210 : 28 : os << _value.route_speed_lat; 211 : 28 : os << ","; 212 : 28 : os << "route_heading_delta:"; 213 : 28 : os << _value.route_heading_delta; 214 : 28 : os << ","; 215 : 28 : os << "route_centripetal_acceleration:"; 216 : 28 : os << _value.route_centripetal_acceleration; 217 : 28 : os << ")"; 218 : 28 : return os; 219 : : } 220 : : 221 : : } // namespace map 222 : : } // namespace rss 223 : : } // namespace ad 224 : : 225 : : namespace std { 226 : : /*! 227 : : * \brief overload of the std::to_string for RouteAccelerations 228 : : */ 229 : 21 : inline std::string to_string(::ad::rss::map::RouteAccelerations const &value) 230 : : { 231 [ + - ]: 21 : stringstream sstream; 232 [ + - ]: 21 : sstream << value; 233 [ + - ]: 42 : return sstream.str(); 234 : 21 : } 235 : : } // namespace std 236 : : 237 : : /*! 238 : : * \brief overload of fmt::formatter calling std::to_string 239 : : */ 240 : : template <> struct fmt::formatter<::ad::rss::map::RouteAccelerations> : formatter<string_view> 241 : : { 242 : 20 : template <typename FormatContext> auto format(::ad::rss::map::RouteAccelerations const &value, FormatContext &ctx) 243 : : { 244 : 40 : return formatter<string_view>::format(std::to_string(value), ctx); 245 : : } 246 : : }; 247 : : 248 : : #endif // GEN_GUARD_AD_RSS_MAP_ROUTEACCELERATIONS