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/physics/Angle.hpp" 25 : : #include "ad/rss/state/UnstructuredTrajectorySet.hpp" 26 : : /*! 27 : : * @brief namespace ad 28 : : */ 29 : : namespace ad { 30 : : /*! 31 : : * @brief namespace rss 32 : : */ 33 : : namespace rss { 34 : : /*! 35 : : * @brief namespace state 36 : : */ 37 : : namespace state { 38 : : 39 : : /*! 40 : : * \brief DataType UnstructuredConstellationStateInformation 41 : : * 42 : : * Structure holding additional information on the reason for the unstructured constellation response. 43 : : */ 44 : : struct UnstructuredConstellationStateInformation 45 : : { 46 : : /*! 47 : : * \brief Smart pointer on UnstructuredConstellationStateInformation 48 : : */ 49 : : typedef std::shared_ptr<UnstructuredConstellationStateInformation> Ptr; 50 : : 51 : : /*! 52 : : * \brief Smart pointer on constant UnstructuredConstellationStateInformation 53 : : */ 54 : : typedef std::shared_ptr<UnstructuredConstellationStateInformation const> ConstPtr; 55 : : 56 : : /*! 57 : : * \brief standard constructor 58 : : */ 59 : 72000 : UnstructuredConstellationStateInformation() = default; 60 : : 61 : : /*! 62 : : * \brief standard destructor 63 : : */ 64 : 198652 : ~UnstructuredConstellationStateInformation() = default; 65 : : 66 : : /*! 67 : : * \brief standard copy constructor 68 : : */ 69 [ + - ]: 58173 : UnstructuredConstellationStateInformation(const UnstructuredConstellationStateInformation &other) = default; 70 : : 71 : : /*! 72 : : * \brief standard move constructor 73 : : */ 74 : 68479 : UnstructuredConstellationStateInformation(UnstructuredConstellationStateInformation &&other) = default; 75 : : 76 : : /** 77 : : * \brief standard assignment operator 78 : : * 79 : : * \param[in] other Other UnstructuredConstellationStateInformation 80 : : * 81 : : * \returns Reference to this UnstructuredConstellationStateInformation. 82 : : */ 83 : 182 : UnstructuredConstellationStateInformation &operator=(const UnstructuredConstellationStateInformation &other) 84 : : = default; 85 : : 86 : : /** 87 : : * \brief standard move operator 88 : : * 89 : : * \param[in] other Other UnstructuredConstellationStateInformation 90 : : * 91 : : * \returns Reference to this UnstructuredConstellationStateInformation. 92 : : */ 93 : 145 : UnstructuredConstellationStateInformation &operator=(UnstructuredConstellationStateInformation &&other) = default; 94 : : 95 : : /** 96 : : * \brief standard comparison operator 97 : : * 98 : : * \param[in] other Other UnstructuredConstellationStateInformation 99 : : * 100 : : * \returns \c true if both UnstructuredConstellationStateInformation are equal 101 : : */ 102 : 46 : bool operator==(const UnstructuredConstellationStateInformation &other) const 103 : : { 104 : 46 : return (brake_trajectory_set == other.brake_trajectory_set) 105 [ + + ]: 40 : && (continue_forward_trajectory_set == other.continue_forward_trajectory_set) 106 [ + + + + ]: 86 : && (considered_drive_away_steering_angle == other.considered_drive_away_steering_angle); 107 : : } 108 : : 109 : : /** 110 : : * \brief standard comparison operator 111 : : * 112 : : * \param[in] other Other UnstructuredConstellationStateInformation. 113 : : * 114 : : * \returns \c true if both UnstructuredConstellationStateInformation are different 115 : : */ 116 : 4 : bool operator!=(const UnstructuredConstellationStateInformation &other) const 117 : : { 118 : 4 : return !operator==(other); 119 : : } 120 : : 121 : : /*! 122 : : * The set of brake trajectories considered on calculation of the RSS state. 123 : : */ 124 : : ::ad::rss::state::UnstructuredTrajectorySet brake_trajectory_set; 125 : : 126 : : /*! 127 : : * The set of continue forward trajectories considered on calculation of the RSS state. 128 : : */ 129 : : ::ad::rss::state::UnstructuredTrajectorySet continue_forward_trajectory_set; 130 : : 131 : : /*! 132 : : * The considered current drive away steering angle in case of DriveAway state 133 : : */ 134 : : ::ad::physics::Angle considered_drive_away_steering_angle{0.}; 135 : : }; 136 : : 137 : : } // namespace state 138 : : } // namespace rss 139 : : } // namespace ad 140 : : 141 : : /*! 142 : : * \brief protect the definition of functions from duplicates by typedef usage within other data types 143 : : */ 144 : : #ifndef GEN_GUARD_AD_RSS_STATE_UNSTRUCTUREDCONSTELLATIONSTATEINFORMATION 145 : : #define GEN_GUARD_AD_RSS_STATE_UNSTRUCTUREDCONSTELLATIONSTATEINFORMATION 146 : : /*! 147 : : * @brief namespace ad 148 : : */ 149 : : namespace ad { 150 : : /*! 151 : : * @brief namespace rss 152 : : */ 153 : : namespace rss { 154 : : /*! 155 : : * @brief namespace state 156 : : */ 157 : : namespace state { 158 : : 159 : : /** 160 : : * \brief standard ostream operator 161 : : * 162 : : * \param[in] os The output stream to write to 163 : : * \param[in] _value UnstructuredConstellationStateInformation value 164 : : * 165 : : * \returns The stream object. 166 : : * 167 : : */ 168 : 10 : inline std::ostream &operator<<(std::ostream &os, UnstructuredConstellationStateInformation const &_value) 169 : : { 170 : 10 : os << "UnstructuredConstellationStateInformation("; 171 : 10 : os << "brake_trajectory_set:"; 172 : 10 : os << _value.brake_trajectory_set; 173 : 10 : os << ","; 174 : 10 : os << "continue_forward_trajectory_set:"; 175 : 10 : os << _value.continue_forward_trajectory_set; 176 : 10 : os << ","; 177 : 10 : os << "considered_drive_away_steering_angle:"; 178 : 10 : os << _value.considered_drive_away_steering_angle; 179 : 10 : os << ")"; 180 : 10 : return os; 181 : : } 182 : : 183 : : } // namespace state 184 : : } // namespace rss 185 : : } // namespace ad 186 : : 187 : : namespace std { 188 : : /*! 189 : : * \brief overload of the std::to_string for UnstructuredConstellationStateInformation 190 : : */ 191 : 1 : inline std::string to_string(::ad::rss::state::UnstructuredConstellationStateInformation const &value) 192 : : { 193 [ + - ]: 1 : stringstream sstream; 194 [ + - ]: 1 : sstream << value; 195 [ + - ]: 2 : return sstream.str(); 196 : 1 : } 197 : : } // namespace std 198 : : 199 : : /*! 200 : : * \brief overload of fmt::formatter calling std::to_string 201 : : */ 202 : : template <> struct fmt::formatter<::ad::rss::state::UnstructuredConstellationStateInformation> : formatter<string_view> 203 : : { 204 : : template <typename FormatContext> 205 : 0 : auto format(::ad::rss::state::UnstructuredConstellationStateInformation const &value, FormatContext &ctx) 206 : : { 207 : 0 : return formatter<string_view>::format(std::to_string(value), ctx); 208 : : } 209 : : }; 210 : : 211 : : #endif // GEN_GUARD_AD_RSS_STATE_UNSTRUCTUREDCONSTELLATIONSTATEINFORMATION