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 <memory> 22 : : #include <sstream> 23 : : #include "ad/rss/map/RouteAccelerations.hpp" 24 : : #include "ad/rss/map/RssVehicleAccelerationRestrictions.hpp" 25 : : /*! 26 : : * @brief namespace ad 27 : : */ 28 : : namespace ad { 29 : : /*! 30 : : * @brief namespace rss 31 : : */ 32 : : namespace rss { 33 : : /*! 34 : : * @brief namespace map 35 : : */ 36 : : namespace map { 37 : : 38 : : /*! 39 : : * \brief DataType RssVehicleRestrictions 40 : : * 41 : : * The RSS restrictions transformed back from lane based coordinate frame into vehicle frame. 42 : : */ 43 : : struct RssVehicleRestrictions 44 : : { 45 : : /*! 46 : : * \brief Smart pointer on RssVehicleRestrictions 47 : : */ 48 : : typedef std::shared_ptr<RssVehicleRestrictions> Ptr; 49 : : 50 : : /*! 51 : : * \brief Smart pointer on constant RssVehicleRestrictions 52 : : */ 53 : : typedef std::shared_ptr<RssVehicleRestrictions const> ConstPtr; 54 : : 55 : : /*! 56 : : * \brief standard constructor 57 : : */ 58 : 23 : RssVehicleRestrictions() = default; 59 : : 60 : : /*! 61 : : * \brief standard destructor 62 : : */ 63 : : ~RssVehicleRestrictions() = default; 64 : : 65 : : /*! 66 : : * \brief standard copy constructor 67 : : */ 68 : : RssVehicleRestrictions(const RssVehicleRestrictions &other) = default; 69 : : 70 : : /*! 71 : : * \brief standard move constructor 72 : : */ 73 : : RssVehicleRestrictions(RssVehicleRestrictions &&other) = default; 74 : : 75 : : /** 76 : : * \brief standard assignment operator 77 : : * 78 : : * \param[in] other Other RssVehicleRestrictions 79 : : * 80 : : * \returns Reference to this RssVehicleRestrictions. 81 : : */ 82 : : RssVehicleRestrictions &operator=(const RssVehicleRestrictions &other) = default; 83 : : 84 : : /** 85 : : * \brief standard move operator 86 : : * 87 : : * \param[in] other Other RssVehicleRestrictions 88 : : * 89 : : * \returns Reference to this RssVehicleRestrictions. 90 : : */ 91 : : RssVehicleRestrictions &operator=(RssVehicleRestrictions &&other) = default; 92 : : 93 : : /** 94 : : * \brief standard comparison operator 95 : : * 96 : : * \param[in] other Other RssVehicleRestrictions 97 : : * 98 : : * \returns \c true if both RssVehicleRestrictions are equal 99 : : */ 100 : 10 : bool operator==(const RssVehicleRestrictions &other) const 101 : : { 102 : 10 : return (route_accelerations == other.route_accelerations) 103 [ + + + + ]: 10 : && (vehicle_acceleration_restrictions == other.vehicle_acceleration_restrictions); 104 : : } 105 : : 106 : : /** 107 : : * \brief standard comparison operator 108 : : * 109 : : * \param[in] other Other RssVehicleRestrictions. 110 : : * 111 : : * \returns \c true if both RssVehicleRestrictions are different 112 : : */ 113 : 3 : bool operator!=(const RssVehicleRestrictions &other) const 114 : : { 115 : 3 : return !operator==(other); 116 : : } 117 : : 118 : : /*! 119 : : * Accelerations introduced by the route to be considered by the vehicle. 120 : : */ 121 : : ::ad::rss::map::RouteAccelerations route_accelerations; 122 : : 123 : : /*! 124 : : * The vehicle acceleration restriction with lateral combined range. 125 : : */ 126 : : ::ad::rss::map::RssVehicleAccelerationRestrictions vehicle_acceleration_restrictions; 127 : : }; 128 : : 129 : : } // namespace map 130 : : } // namespace rss 131 : : } // namespace ad 132 : : 133 : : /*! 134 : : * \brief protect the definition of functions from duplicates by typedef usage within other data types 135 : : */ 136 : : #ifndef GEN_GUARD_AD_RSS_MAP_RSSVEHICLERESTRICTIONS 137 : : #define GEN_GUARD_AD_RSS_MAP_RSSVEHICLERESTRICTIONS 138 : : /*! 139 : : * @brief namespace ad 140 : : */ 141 : : namespace ad { 142 : : /*! 143 : : * @brief namespace rss 144 : : */ 145 : : namespace rss { 146 : : /*! 147 : : * @brief namespace map 148 : : */ 149 : : namespace map { 150 : : 151 : : /** 152 : : * \brief standard ostream operator 153 : : * 154 : : * \param[in] os The output stream to write to 155 : : * \param[in] _value RssVehicleRestrictions value 156 : : * 157 : : * \returns The stream object. 158 : : * 159 : : */ 160 : 6 : inline std::ostream &operator<<(std::ostream &os, RssVehicleRestrictions const &_value) 161 : : { 162 : 6 : os << "RssVehicleRestrictions("; 163 : 6 : os << "route_accelerations:"; 164 : 6 : os << _value.route_accelerations; 165 : 6 : os << ","; 166 : 6 : os << "vehicle_acceleration_restrictions:"; 167 : 6 : os << _value.vehicle_acceleration_restrictions; 168 : 6 : os << ")"; 169 : 6 : return os; 170 : : } 171 : : 172 : : } // namespace map 173 : : } // namespace rss 174 : : } // namespace ad 175 : : 176 : : namespace std { 177 : : /*! 178 : : * \brief overload of the std::to_string for RssVehicleRestrictions 179 : : */ 180 : 5 : inline std::string to_string(::ad::rss::map::RssVehicleRestrictions const &value) 181 : : { 182 [ + - ]: 5 : stringstream sstream; 183 [ + - ]: 5 : sstream << value; 184 [ + - ]: 10 : return sstream.str(); 185 : 5 : } 186 : : } // namespace std 187 : : 188 : : /*! 189 : : * \brief overload of fmt::formatter calling std::to_string 190 : : */ 191 : : template <> struct fmt::formatter<::ad::rss::map::RssVehicleRestrictions> : formatter<string_view> 192 : : { 193 : 4 : template <typename FormatContext> auto format(::ad::rss::map::RssVehicleRestrictions const &value, FormatContext &ctx) 194 : : { 195 : 8 : return formatter<string_view>::format(std::to_string(value), ctx); 196 : : } 197 : : }; 198 : : 199 : : #endif // GEN_GUARD_AD_RSS_MAP_RSSVEHICLERESTRICTIONS