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 LaneDirection 40 : : * 41 : : * Direction of a lane 42 : : */ 43 : : enum class LaneDirection : int32_t 44 : : { 45 : : /*! 46 : : INVALID 47 : : */ 48 : : INVALID = 0, 49 : : /*! 50 : : UNKNOWN 51 : : */ 52 : : UNKNOWN = 1, 53 : : /*! 54 : : POSITIVE 55 : : */ 56 : : POSITIVE = 2, 57 : : /*! 58 : : NEGATIVE 59 : : */ 60 : : NEGATIVE = 3, 61 : : /*! 62 : : REVERSABLE 63 : : */ 64 : : REVERSABLE = 4, 65 : : /*! 66 : : BIDIRECTIONAL 67 : : */ 68 : : BIDIRECTIONAL = 5, 69 : : /*! 70 : : NONE 71 : : */ 72 : : NONE = 6 73 : : }; 74 : : 75 : : } // namespace lane 76 : : } // namespace map 77 : : } // namespace ad 78 : : /*! 79 : : * \brief Conversion of ::ad::map::lane::LaneDirection to std::string helper. 80 : : */ 81 : : std::string toString(::ad::map::lane::LaneDirection const e); 82 : : 83 : : /*! 84 : : * \brief Conversion from std::string to enum type T helper. 85 : : * 86 : : * \param [in] str - a fully qualified string name of enum class type 87 : : * 88 : : * \return T enum value 89 : : * 90 : : * \throws std::out_of_range exception if the given string does not match any enum type 91 : : * 92 : : * Example usage: 93 : : * \code 94 : : * auto value = fromString<SomeEnumType>("SomeEnumType::eValue"); 95 : : * assert(value == SomeEnumType::eValue); 96 : : * // Or: 97 : : * auto value = fromString<SomeEnumType>("eValue"); 98 : : * assert(value == SomeEnumType::eValue); 99 : : * \endcode 100 : : */ 101 : : template <typename EnumType> EnumType fromString(std::string const &str); 102 : : 103 : : /*! 104 : : * \brief Conversion from std::string to enum type T helper. 105 : : * 106 : : * \param [in] str - a fully qualified string name of enum class type 107 : : * 108 : : * \return T enum value 109 : : * 110 : : * \throws std::out_of_range exception if the given string does not match any enum type 111 : : * 112 : : * Example usage: 113 : : * \code 114 : : * auto value = fromString<SomeEnumType>("SomeEnumType::eValue"); 115 : : * assert(value == SomeEnumType::eValue); 116 : : * // Or: 117 : : * auto value = fromString<SomeEnumType>("eValue"); 118 : : * assert(value == SomeEnumType::eValue); 119 : : * \endcode 120 : : */ 121 : : template <>::ad::map::lane::LaneDirection fromString(std::string const &str); 122 : : 123 : : /*! 124 : : * \brief protect the definition of functions from duplicates by typedef usage within other data types 125 : : */ 126 : : #ifndef GEN_GUARD_AD_MAP_LANE_LANEDIRECTION 127 : : #define GEN_GUARD_AD_MAP_LANE_LANEDIRECTION 128 : : /*! 129 : : * @brief namespace ad 130 : : */ 131 : : namespace ad { 132 : : /*! 133 : : * @brief namespace map 134 : : */ 135 : : namespace map { 136 : : /*! 137 : : * @brief namespace lane 138 : : * 139 : : * Handling of lanes 140 : : */ 141 : : namespace lane { 142 : : 143 : : /** 144 : : * \brief standard ostream operator 145 : : * 146 : : * \param[in] os The output stream to write to 147 : : * \param[in] value LaneDirection value 148 : : * 149 : : * \returns The stream object. 150 : : * 151 : : */ 152 : 26 : inline std::ostream &operator<<(std::ostream &os, LaneDirection const &value) 153 : : { 154 [ + - ]: 26 : return os << toString(value); 155 : : } 156 : : 157 : : } // namespace lane 158 : : } // namespace map 159 : : } // namespace ad 160 : : 161 : : namespace std { 162 : : /*! 163 : : * \brief overload of the std::to_string for LaneDirection 164 : : */ 165 : : inline std::string to_string(::ad::map::lane::LaneDirection const &value) 166 : : { 167 : : return ::toString(value); 168 : : } 169 : : } // namespace std 170 : : #endif // GEN_GUARD_AD_MAP_LANE_LANEDIRECTION