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 <memory> 22 : : #include <string> 23 : : #include "spdlog/fmt/ostr.h" 24 : : #include "spdlog/spdlog.h" 25 : : /*! 26 : : * @brief namespace ad 27 : : */ 28 : : namespace ad { 29 : : /*! 30 : : * @brief namespace rss 31 : : */ 32 : : namespace rss { 33 : : /*! 34 : : * @brief namespace map 35 : : */ 36 : : namespace map { 37 : : 38 : : /*! 39 : : * \brief DataType RssAppendRoadBoundariesMode 40 : : * 41 : : * The operation modes of appendRoadBoundaries() function. 42 : : */ 43 : : enum class RssAppendRoadBoundariesMode : int32_t 44 : : { 45 : : /*! 46 : : * Road bounaries are not considered at all. 47 : : */ 48 : : Off = 0, 49 : : 50 : : /*! 51 : : * The borders are created at the left border of the leftmost and 52 : : * the right border righmost lane of the provided route. 53 : : */ 54 : : RouteOnly = 1, 55 : : 56 : : /*! 57 : : * The incoming route is expanded with all parallel 58 : : * lanes of the opposite direction to ensure the whole driveable road is within the 59 : : * boundaries 60 : : */ 61 : : ExpandRouteToOppositeLanes = 2, 62 : : 63 : : /*! 64 : : * the incoming route is expanded with all parallel neighbor lanes 65 : : * including the opposite direction and shoulder lanes to ensure the whole road is 66 : : * within the boundaries 67 : : */ 68 : : ExpandRouteToAllNeighbors = 3 69 : : }; 70 : : 71 : : } // namespace map 72 : : } // namespace rss 73 : : } // namespace ad 74 : : /*! 75 : : * \brief Conversion of ::ad::rss::map::RssAppendRoadBoundariesMode to std::string helper. 76 : : */ 77 : : std::string toString(::ad::rss::map::RssAppendRoadBoundariesMode 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::rss::map::RssAppendRoadBoundariesMode 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_RSS_MAP_RSSAPPENDROADBOUNDARIESMODE 123 : : #define GEN_GUARD_AD_RSS_MAP_RSSAPPENDROADBOUNDARIESMODE 124 : : /*! 125 : : * @brief namespace ad 126 : : */ 127 : : namespace ad { 128 : : /*! 129 : : * @brief namespace rss 130 : : */ 131 : : namespace rss { 132 : : /*! 133 : : * @brief namespace map 134 : : */ 135 : : namespace map { 136 : : 137 : : /** 138 : : * \brief standard ostream operator 139 : : * 140 : : * \param[in] os The output stream to write to 141 : : * \param[in] value RssAppendRoadBoundariesMode value 142 : : * 143 : : * \returns The stream object. 144 : : * 145 : : */ 146 : 1 : inline std::ostream &operator<<(std::ostream &os, RssAppendRoadBoundariesMode const &value) 147 : : { 148 [ + - ]: 1 : return os << toString(value); 149 : : } 150 : : 151 : : } // namespace map 152 : : } // namespace rss 153 : : } // namespace ad 154 : : 155 : : namespace std { 156 : : /*! 157 : : * \brief overload of the std::to_string for RssAppendRoadBoundariesMode 158 : : */ 159 : 1 : inline std::string to_string(::ad::rss::map::RssAppendRoadBoundariesMode const &value) 160 : : { 161 : 1 : return ::toString(value); 162 : : } 163 : : } // namespace std 164 : : 165 : : /*! 166 : : * \brief overload of fmt::formatter calling std::to_string 167 : : */ 168 : : template <> struct fmt::formatter<::ad::rss::map::RssAppendRoadBoundariesMode> : formatter<string_view> 169 : : { 170 : : template <typename FormatContext> 171 : 1 : auto format(::ad::rss::map::RssAppendRoadBoundariesMode const &value, FormatContext &ctx) 172 : : { 173 : 2 : return formatter<string_view>::format(std::to_string(value), ctx); 174 : : } 175 : : }; 176 : : 177 : : #endif // GEN_GUARD_AD_RSS_MAP_RSSAPPENDROADBOUNDARIESMODE