8 using sec_t = std::string_view;
9 using key_t = std::string_view;
14 void SettingLoad(
void* a_file, sec_t a_section, key_t a_key, T& a_value, T& a_valueDefault);
17 void SettingSave(
void* a_file, sec_t a_section, key_t a_key, T& a_value);
21 public TSettingStore<SettingStore>
24 virtual void Load()
override;
25 virtual void Save()
override;
28 template <
class T,
class Store = SettingStore>
30 public TSetting<T, Store>
33 Setting(sec_t a_section, key_t a_key, T a_default) :
34 TSetting<T, Store>(a_default),
40 virtual void Load(
void* a_data,
bool a_isBase)
override
43 Impl::SettingLoad(a_data, m_section, m_key, this->m_valueDefault, this->m_valueDefault);
44 this->SetValue(this->m_valueDefault);
46 Impl::SettingLoad(a_data, m_section, m_key, this->m_value, this->m_valueDefault);
50 virtual void Save(
void* a_data)
override
52 Impl::SettingSave(a_data, m_section, m_key, this->m_value);
60 template <
class Store = SettingStore>
61 using Bool = Setting<bool, Store>;
63 template <
class Store = SettingStore>
64 using F32 = Setting<float, Store>;
66 template <
class Store = SettingStore>
67 using F64 = Setting<double, Store>;
69 template <
class Store = SettingStore>
70 using I8 = Setting<std::int8_t, Store>;
72 template <
class Store = SettingStore>
73 using I16 = Setting<std::int16_t, Store>;
75 template <
class Store = SettingStore>
76 using I32 = Setting<std::int32_t, Store>;
78 template <
class Store = SettingStore>
79 using U8 = Setting<std::uint8_t, Store>;
81 template <
class Store = SettingStore>
82 using U16 = Setting<std::uint16_t, Store>;
84 template <
class Store = SettingStore>
85 using U32 = Setting<std::uint32_t, Store>;
87 template <
class Store = SettingStore>
88 using Str = Setting<std::string, Store>;
91 template <
class T,
class S,
class CharT>
92 struct std::formatter<
REX::INI::Setting<T, S>, CharT> : std::formatter<T, CharT>
94 template <
class FormatContext>
95 auto format(
const REX::INI::Setting<T, S>& a_setting, FormatContext& a_ctx)
const
97 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))