Branch data Line data Source code
1 : : /* 2 : : * ----------------- BEGIN LICENSE BLOCK --------------------------------- 3 : : * 4 : : * Copyright (C) 2018-2020 Intel Corporation 5 : : * 6 : : * SPDX-License-Identifier: MIT 7 : : * 8 : : * ----------------- END LICENSE BLOCK ----------------------------------- 9 : : */ 10 : : 11 : : /** 12 : : * Generated file 13 : : * @file 14 : : * 15 : : * Generator Version : 11.0.0-1997 16 : : */ 17 : : 18 : : #pragma once 19 : : 20 : : #include <iostream> 21 : : #include <memory> 22 : : #include <string> 23 : : /*! 24 : : * @brief namespace ad 25 : : */ 26 : : namespace ad { 27 : : /*! 28 : : * @brief namespace map 29 : : */ 30 : : namespace map { 31 : : /*! 32 : : * @brief namespace lane 33 : : * 34 : : * Handling of lanes 35 : : */ 36 : : namespace lane { 37 : : 38 : : /*! 39 : : * \brief DataType ContactType 40 : : * 41 : : * Type of the contact between two objects. 42 : : */ 43 : : enum class ContactType : int32_t 44 : : { 45 : : /*! 46 : : * Invalid value. 47 : : */ 48 : : INVALID = 0, 49 : : 50 : : /*! 51 : : * Unknown value. 52 : : */ 53 : : UNKNOWN = 1, 54 : : 55 : : /*! 56 : : * There is no physical or legal obstacles between two objects. 57 : : */ 58 : : FREE = 2, 59 : : 60 : : /*! 61 : : * Transition between one lane to direct lateral neighboor. 62 : : */ 63 : : LANE_CHANGE = 3, 64 : : 65 : : /*! 66 : : * Transition between one lane to longitudinal direct neighboor. 67 : : */ 68 : : LANE_CONTINUATION = 4, 69 : : 70 : : /*! 71 : : * End of the Lane - line. 72 : : */ 73 : : LANE_END = 5, 74 : : 75 : : /*! 76 : : * End of the Lane - point. 77 : : */ 78 : : SINGLE_POINT = 6, 79 : : 80 : : /*! 81 : : * STOP regulation at the end of the lane. 82 : : */ 83 : : STOP = 7, 84 : : 85 : : /*! 86 : : * STOP 3-way, 4-way etc regulation at the end of the lane. 87 : : */ 88 : : STOP_ALL = 8, 89 : : 90 : : /*! 91 : : * YIELD regulation at the end of the lane. 92 : : */ 93 : : YIELD = 9, 94 : : 95 : : /*! 96 : : * Gate with barrier at the end of the lane. 97 : : */ 98 : : GATE_BARRIER = 10, 99 : : 100 : : /*! 101 : : * Tolbooth barrier at the end of the lane. 102 : : */ 103 : : GATE_TOLBOOTH = 11, 104 : : 105 : : /*! 106 : : * Spikes (in direction) at the end of the lane. 107 : : */ 108 : : GATE_SPIKES = 12, 109 : : 110 : : /*! 111 : : * Spikes (in opposite direction) at the end of the lane. 112 : : */ 113 : : GATE_SPIKES_CONTRA = 13, 114 : : 115 : : /*! 116 : : * Curb up at the object side. 117 : : */ 118 : : CURB_UP = 14, 119 : : 120 : : /*! 121 : : * Curb down at the object. 122 : : */ 123 : : CURB_DOWN = 15, 124 : : 125 : : /*! 126 : : * Speed bump at the end of the lane. 127 : : */ 128 : : SPEED_BUMP = 16, 129 : : 130 : : /*! 131 : : * Traffic light at the end of the lane. 132 : : */ 133 : : TRAFFIC_LIGHT = 17, 134 : : 135 : : /*! 136 : : * Crosswalk at the end of the lane. 137 : : */ 138 : : CROSSWALK = 18, 139 : : 140 : : /*! 141 : : * Priority to the right regulation at the end of the lane. 142 : : */ 143 : : PRIO_TO_RIGHT = 19, 144 : : 145 : : /*! 146 : : * Right of way regulation at the end of the lane. 147 : : */ 148 : : RIGHT_OF_WAY = 20, 149 : : 150 : : /*! 151 : : * Priority to right and to straight regulation at the end of the lane (Singapore). 152 : : */ 153 : : PRIO_TO_RIGHT_AND_STRAIGHT = 21 154 : : }; 155 : : 156 : : } // namespace lane 157 : : } // namespace map 158 : : } // namespace ad 159 : : /*! 160 : : * \brief Conversion of ::ad::map::lane::ContactType to std::string helper. 161 : : */ 162 : : std::string toString(::ad::map::lane::ContactType const e); 163 : : 164 : : /*! 165 : : * \brief Conversion from std::string to enum type T helper. 166 : : * 167 : : * \param [in] str - a fully qualified string name of enum class type 168 : : * 169 : : * \return T enum value 170 : : * 171 : : * \throws std::out_of_range exception if the given string does not match any enum type 172 : : * 173 : : * Example usage: 174 : : * \code 175 : : * auto value = fromString<SomeEnumType>("SomeEnumType::eValue"); 176 : : * assert(value == SomeEnumType::eValue); 177 : : * // Or: 178 : : * auto value = fromString<SomeEnumType>("eValue"); 179 : : * assert(value == SomeEnumType::eValue); 180 : : * \endcode 181 : : */ 182 : : template <typename EnumType> EnumType fromString(std::string const &str); 183 : : 184 : : /*! 185 : : * \brief Conversion from std::string to enum type T helper. 186 : : * 187 : : * \param [in] str - a fully qualified string name of enum class type 188 : : * 189 : : * \return T enum value 190 : : * 191 : : * \throws std::out_of_range exception if the given string does not match any enum type 192 : : * 193 : : * Example usage: 194 : : * \code 195 : : * auto value = fromString<SomeEnumType>("SomeEnumType::eValue"); 196 : : * assert(value == SomeEnumType::eValue); 197 : : * // Or: 198 : : * auto value = fromString<SomeEnumType>("eValue"); 199 : : * assert(value == SomeEnumType::eValue); 200 : : * \endcode 201 : : */ 202 : : template <>::ad::map::lane::ContactType fromString(std::string const &str); 203 : : 204 : : /*! 205 : : * \brief protect the definition of functions from duplicates by typedef usage within other data types 206 : : */ 207 : : #ifndef GEN_GUARD_AD_MAP_LANE_CONTACTTYPE 208 : : #define GEN_GUARD_AD_MAP_LANE_CONTACTTYPE 209 : : /*! 210 : : * @brief namespace ad 211 : : */ 212 : : namespace ad { 213 : : /*! 214 : : * @brief namespace map 215 : : */ 216 : : namespace map { 217 : : /*! 218 : : * @brief namespace lane 219 : : * 220 : : * Handling of lanes 221 : : */ 222 : : namespace lane { 223 : : 224 : : /** 225 : : * \brief standard ostream operator 226 : : * 227 : : * \param[in] os The output stream to write to 228 : : * \param[in] value ContactType value 229 : : * 230 : : * \returns The stream object. 231 : : * 232 : : */ 233 : 29 : inline std::ostream &operator<<(std::ostream &os, ContactType const &value) 234 : : { 235 [ + - ]: 29 : return os << toString(value); 236 : : } 237 : : 238 : : } // namespace lane 239 : : } // namespace map 240 : : } // namespace ad 241 : : 242 : : namespace std { 243 : : /*! 244 : : * \brief overload of the std::to_string for ContactType 245 : : */ 246 : : inline std::string to_string(::ad::map::lane::ContactType const &value) 247 : : { 248 : : return ::toString(value); 249 : : } 250 : : } // namespace std 251 : : #endif // GEN_GUARD_AD_MAP_LANE_CONTACTTYPE