8 using path_t = std::string_view;
13 void SettingLoad(
void* a_file, path_t a_path, T& a_value, T& a_valueDefault);
16 void SettingSave(
void* a_file, path_t a_path, T& a_value);
20 public TSettingStore<SettingStore>
23 virtual void Load()
override;
24 virtual void Save()
override;
27 template <
class T,
class Store = SettingStore>
29 public TSetting<T, Store>
32 Setting(path_t a_path, T a_default) :
33 TSetting<T, Store>(a_default),
38 virtual void Load(
void* a_data,
bool a_isBase)
override
41 Impl::SettingLoad(a_data, m_path, this->m_valueDefault, this->m_valueDefault);
42 this->SetValue(this->m_valueDefault);
44 Impl::SettingLoad(a_data, m_path, this->m_value, this->m_valueDefault);
48 virtual void Save(
void* a_data)
override
50 Impl::SettingSave(a_data, m_path, this->m_value);
57 template <
class Store = SettingStore>
58 using Bool = Setting<bool, Store>;
60 template <
class Store = SettingStore>
61 using F32 = Setting<float, Store>;
63 template <
class Store = SettingStore>
64 using F64 = Setting<double, Store>;
66 template <
class Store = SettingStore>
67 using I8 = Setting<std::int8_t, Store>;
69 template <
class Store = SettingStore>
70 using I16 = Setting<std::int16_t, Store>;
72 template <
class Store = SettingStore>
73 using I32 = Setting<std::int32_t, Store>;
75 template <
class Store = SettingStore>
76 using U8 = Setting<std::uint8_t, Store>;
78 template <
class Store = SettingStore>
79 using U16 = Setting<std::uint16_t, Store>;
81 template <
class Store = SettingStore>
82 using U32 = Setting<std::uint32_t, Store>;
84 template <
class Store = SettingStore>
85 using Str = Setting<std::string, Store>;
88 template <
class T,
class S,
class CharT>
89 struct std::formatter<
REX::JSON::Setting<T, S>, CharT> : std::formatter<T, CharT>
91 template <
class FormatContext>
92 auto format(
const REX::JSON::Setting<T, S>& a_setting, FormatContext& a_ctx)
const
94 return std::formatter<T, CharT>::format(a_setting.GetValue(), a_ctx);
Definition: BSDirectInputManager.h:8
constexpr REL::ID Save(static_cast< std::uint64_t >(34818))
constexpr REL::ID Load(static_cast< std::uint64_t >(34819))