LiteFX 0.3.1.2022
Computer Graphics Engine
app_formatters.hpp
1#pragma once
2
3#include <litefx/app_api.hpp>
4
5template <>
6struct LITEFX_APPMODEL_API fmt::formatter<LiteFX::Platform> : formatter<string_view> {
7 template <typename FormatContext>
8 auto format(LiteFX::Platform t, FormatContext& ctx) const {
9 string_view name = "Invalid";
10 switch (t) {
11 case LiteFX::Platform::Win32: name = "Win32"; break;
12 case LiteFX::Platform::Other: name = "Other"; break;
13 case LiteFX::Platform::None: name = "None"; break;
14 }
15 return formatter<string_view>::format(name, ctx);
16 }
17};
18
19template <>
20struct LITEFX_APPMODEL_API fmt::formatter<LiteFX::BackendType> : formatter<string_view> {
21 template <typename FormatContext>
22 auto format(LiteFX::BackendType t, FormatContext& ctx) const {
23 string_view name = "Invalid";
24 switch (t) {
25 case LiteFX::BackendType::Rendering: name = "Rendering"; break;
26 //case LiteFX::BackendType::Physics: name = "Physics"; break;
27 case LiteFX::BackendType::Other: name = "Other"; break;
28 }
29 return formatter<string_view>::format(name, ctx);
30 }
31};
Definition: app_formatters.hpp:6
auto format(LiteFX::BackendType t, FormatContext &ctx) const
Definition: app_formatters.hpp:22
auto format(LiteFX::Platform t, FormatContext &ctx) const
Definition: app_formatters.hpp:8