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 route 33 : : * 34 : : * Handling of routes 35 : : */ 36 : : namespace route { 37 : : 38 : : /*! 39 : : * \brief DataType RouteCreationMode 40 : : * 41 : : * The mode on how the full route is created 42 : : */ 43 : : enum class RouteCreationMode : int32_t 44 : : { 45 : : /*! 46 : : * undefined value 47 : : */ 48 : : Undefined = 0, 49 : : 50 : : /*! 51 : : * Only add lanes having the same driving direction to the route 52 : : */ 53 : : SameDrivingDirection = 1, 54 : : 55 : : /*! 56 : : * include also lanes in opposite driving direction 57 : : */ 58 : : AllRoutableLanes = 2, 59 : : 60 : : /*! 61 : : * include all neighbors, which might include not explicitly routeable shoulder lanes 62 : : */ 63 : : AllNeighborLanes = 3 64 : : }; 65 : : 66 : : } // namespace route 67 : : } // namespace map 68 : : } // namespace ad 69 : : /*! 70 : : * \brief Conversion of ::ad::map::route::RouteCreationMode to std::string helper. 71 : : */ 72 : : std::string toString(::ad::map::route::RouteCreationMode const e); 73 : : 74 : : /*! 75 : : * \brief Conversion from std::string to enum type T helper. 76 : : * 77 : : * \param [in] str - a fully qualified string name of enum class type 78 : : * 79 : : * \return T enum value 80 : : * 81 : : * \throws std::out_of_range exception if the given string does not match any enum type 82 : : * 83 : : * Example usage: 84 : : * \code 85 : : * auto value = fromString<SomeEnumType>("SomeEnumType::eValue"); 86 : : * assert(value == SomeEnumType::eValue); 87 : : * // Or: 88 : : * auto value = fromString<SomeEnumType>("eValue"); 89 : : * assert(value == SomeEnumType::eValue); 90 : : * \endcode 91 : : */ 92 : : template <typename EnumType> EnumType fromString(std::string const &str); 93 : : 94 : : /*! 95 : : * \brief Conversion from std::string to enum type T helper. 96 : : * 97 : : * \param [in] str - a fully qualified string name of enum class type 98 : : * 99 : : * \return T enum value 100 : : * 101 : : * \throws std::out_of_range exception if the given string does not match any enum type 102 : : * 103 : : * Example usage: 104 : : * \code 105 : : * auto value = fromString<SomeEnumType>("SomeEnumType::eValue"); 106 : : * assert(value == SomeEnumType::eValue); 107 : : * // Or: 108 : : * auto value = fromString<SomeEnumType>("eValue"); 109 : : * assert(value == SomeEnumType::eValue); 110 : : * \endcode 111 : : */ 112 : : template <>::ad::map::route::RouteCreationMode fromString(std::string const &str); 113 : : 114 : : /*! 115 : : * \brief protect the definition of functions from duplicates by typedef usage within other data types 116 : : */ 117 : : #ifndef GEN_GUARD_AD_MAP_ROUTE_ROUTECREATIONMODE 118 : : #define GEN_GUARD_AD_MAP_ROUTE_ROUTECREATIONMODE 119 : : /*! 120 : : * @brief namespace ad 121 : : */ 122 : : namespace ad { 123 : : /*! 124 : : * @brief namespace map 125 : : */ 126 : : namespace map { 127 : : /*! 128 : : * @brief namespace route 129 : : * 130 : : * Handling of routes 131 : : */ 132 : : namespace route { 133 : : 134 : : /** 135 : : * \brief standard ostream operator 136 : : * 137 : : * \param[in] os The output stream to write to 138 : : * \param[in] value RouteCreationMode value 139 : : * 140 : : * \returns The stream object. 141 : : * 142 : : */ 143 : 38 : inline std::ostream &operator<<(std::ostream &os, RouteCreationMode const &value) 144 : : { 145 [ + - ]: 38 : return os << toString(value); 146 : : } 147 : : 148 : : } // namespace route 149 : : } // namespace map 150 : : } // namespace ad 151 : : 152 : : namespace std { 153 : : /*! 154 : : * \brief overload of the std::to_string for RouteCreationMode 155 : : */ 156 : : inline std::string to_string(::ad::map::route::RouteCreationMode const &value) 157 : : { 158 : : return ::toString(value); 159 : : } 160 : : } // namespace std 161 : : #endif // GEN_GUARD_AD_MAP_ROUTE_ROUTECREATIONMODE