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