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 <sstream> 22 : : #include <vector> 23 : : #include "ad/rss/map/RssRouteId.hpp" 24 : : #include "spdlog/fmt/ostr.h" 25 : : #include "spdlog/spdlog.h" 26 : : /*! 27 : : * @brief namespace ad 28 : : */ 29 : : namespace ad { 30 : : /*! 31 : : * @brief namespace rss 32 : : */ 33 : : namespace rss { 34 : : /*! 35 : : * @brief namespace map 36 : : */ 37 : : namespace map { 38 : : 39 : : /*! 40 : : * \brief DataType RssRouteIdVector 41 : : * 42 : : * List of RssRouteIds. 43 : : */ 44 : : typedef std::vector<::ad::rss::map::RssRouteId> RssRouteIdVector; 45 : : 46 : : } // namespace map 47 : : } // namespace rss 48 : : } // namespace ad 49 : : 50 : : /*! 51 : : * \brief protect the definition of functions from duplicates by typedef usage within other data types 52 : : */ 53 : : #ifndef GEN_GUARD_VECTOR_UINT64_T 54 : : #define GEN_GUARD_VECTOR_UINT64_T 55 : : namespace std { 56 : : /** 57 : : * \brief standard ostream operator 58 : : * 59 : : * \param[in] os The output stream to write to 60 : : * \param[in] _value RssRouteIdVector value 61 : : * 62 : : * \returns The stream object. 63 : : * 64 : : */ 65 : 0 : inline std::ostream &operator<<(std::ostream &os, vector<::ad::rss::map::RssRouteId> const &_value) 66 : : { 67 : 0 : os << "["; 68 [ # # ]: 0 : for (auto it = _value.begin(); it != _value.end(); it++) 69 : : { 70 [ # # ]: 0 : if (it != _value.begin()) 71 : : { 72 [ # # ]: 0 : os << ","; 73 : : } 74 [ # # ]: 0 : os << *it; 75 : : } 76 : 0 : os << "]"; 77 : 0 : return os; 78 : : } 79 : : } // namespace std 80 : : 81 : : namespace std { 82 : : /*! 83 : : * \brief overload of the std::to_string for RssRouteIdVector 84 : : */ 85 : : inline std::string to_string(::ad::rss::map::RssRouteIdVector const &value) 86 : : { 87 : : stringstream sstream; 88 : : sstream << value; 89 : : return sstream.str(); 90 : : } 91 : : } // namespace std 92 : : 93 : : /*! 94 : : * \brief overload of fmt::formatter calling std::to_string 95 : : */ 96 : : template <> struct fmt::formatter<::ad::rss::map::RssRouteIdVector> : formatter<string_view> 97 : : { 98 : : template <typename FormatContext> auto format(::ad::rss::map::RssRouteIdVector const &value, FormatContext &ctx) 99 : : { 100 : : return formatter<string_view>::format(std::to_string(value), ctx); 101 : : } 102 : : }; 103 : : 104 : : #endif // GEN_GUARD_VECTOR_UINT64_T