#pragma once #include "data_types.hpp" #include namespace phosphor { namespace dbus { namespace monitoring { namespace detail { /** @brief Map format strings to undecorated C++ types. */ template struct GetFormatType {}; template <> struct GetFormatType { static constexpr auto format = "=%d"; }; template <> struct GetFormatType { static constexpr auto format = "=%hhd"; }; template <> struct GetFormatType { static constexpr auto format = "=%hd"; }; template <> struct GetFormatType { static constexpr auto format = "=%d"; }; template <> struct GetFormatType { static constexpr auto format = "=%ld"; }; template <> struct GetFormatType { static constexpr auto format = "=%lld"; }; template <> struct GetFormatType { static constexpr auto format = "=%lf"; }; template <> struct GetFormatType { static constexpr auto format = "=%hhd"; }; template <> struct GetFormatType { static constexpr auto format = "=%hd"; }; template <> struct GetFormatType { static constexpr auto format = "=%d"; }; template <> struct GetFormatType { static constexpr auto format = "=%ld"; }; template <> struct GetFormatType { static constexpr auto format = "=%lld"; }; template <> struct GetFormatType { static constexpr auto format = "=%s"; }; template <> struct GetFormatType { static constexpr auto format = "=%s"; }; template <> struct GetFormatType { static constexpr auto format = "=%s"; }; } // namespace detail /** @brief Get the format string for a C++ type. */ template struct GetFormat { static constexpr auto format = detail::GetFormatType>::format; }; } // namespace monitoring } // namespace dbus } // namespace phosphor