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