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 RssConstellationCreationMode 40 : : * 41 : : * Specifies the constellation creation mode 42 : : */ 43 : : enum class RssConstellationCreationMode : int32_t 44 : : { 45 : : /*! 46 : : * the scene is ignored completely 47 : : */ 48 : : Ignore = 0, 49 : : 50 : : /*! 51 : : * The scene is not relevant (but should be visible as NotRelvant scene) 52 : : */ 53 : : NotRelevant = 1, 54 : : 55 : : /*! 56 : : * the scene requires structured analysis 57 : : */ 58 : : Structured = 2, 59 : : 60 : : /*! 61 : : * the scene requires unstructured analysis 62 : : */ 63 : : Unstructured = 3 64 : : }; 65 : : 66 : : } // namespace map 67 : : } // namespace rss 68 : : } // namespace ad 69 : : /*! 70 : : * \brief Conversion of ::ad::rss::map::RssConstellationCreationMode to std::string helper. 71 : : */ 72 : : std::string toString(::ad::rss::map::RssConstellationCreationMode 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::rss::map::RssConstellationCreationMode 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_RSS_MAP_RSSCONSTELLATIONCREATIONMODE 118 : : #define GEN_GUARD_AD_RSS_MAP_RSSCONSTELLATIONCREATIONMODE 119 : : /*! 120 : : * @brief namespace ad 121 : : */ 122 : : namespace ad { 123 : : /*! 124 : : * @brief namespace rss 125 : : */ 126 : : namespace rss { 127 : : /*! 128 : : * @brief namespace map 129 : : */ 130 : : namespace map { 131 : : 132 : : /** 133 : : * \brief standard ostream operator 134 : : * 135 : : * \param[in] os The output stream to write to 136 : : * \param[in] value RssConstellationCreationMode value 137 : : * 138 : : * \returns The stream object. 139 : : * 140 : : */ 141 : 11 : inline std::ostream &operator<<(std::ostream &os, RssConstellationCreationMode const &value) 142 : : { 143 [ + - ]: 11 : return os << toString(value); 144 : : } 145 : : 146 : : } // namespace map 147 : : } // namespace rss 148 : : } // namespace ad 149 : : 150 : : namespace std { 151 : : /*! 152 : : * \brief overload of the std::to_string for RssConstellationCreationMode 153 : : */ 154 : 3 : inline std::string to_string(::ad::rss::map::RssConstellationCreationMode const &value) 155 : : { 156 : 3 : return ::toString(value); 157 : : } 158 : : } // namespace std 159 : : 160 : : /*! 161 : : * \brief overload of fmt::formatter calling std::to_string 162 : : */ 163 : : template <> struct fmt::formatter<::ad::rss::map::RssConstellationCreationMode> : formatter<string_view> 164 : : { 165 : : template <typename FormatContext> 166 : 3 : auto format(::ad::rss::map::RssConstellationCreationMode const &value, FormatContext &ctx) 167 : : { 168 : 6 : return formatter<string_view>::format(std::to_string(value), ctx); 169 : : } 170 : : }; 171 : : 172 : : #endif // GEN_GUARD_AD_RSS_MAP_RSSCONSTELLATIONCREATIONMODE