CommonLibSSE (Parapets fork)
INIPrefSettingCollection.h
Go to the documentation of this file.
1 #pragma once
2 
4 
5 namespace RE
6 {
8  {
9  public:
10  inline static constexpr auto RTTI = RTTI_INIPrefSettingCollection;
11 
12  ~INIPrefSettingCollection() override; // 00
13 
14  // override (INISettingCollection)
15  void Unk_07(void) override; // 07 - { return 1; }
16  void Unk_08(void) override; // 08
17  void Unk_09(void) override; // 09
18 
20  };
21  static_assert(sizeof(INIPrefSettingCollection) == 0x128);
22 
23  namespace literals
24  {
25  template <stl::nttp::zstring S>
26  inline auto operator""_pref()
27  {
28  static RE::Setting* setting = nullptr;
29  if (!setting) {
30  if (auto collection = INIPrefSettingCollection::GetSingleton()) {
31  setting = collection->GetSetting(S.data());
32  }
33  }
34 
35  if constexpr (S.front() == 'b') {
36  return setting ? std::optional(setting->data.b) : std::nullopt;
37  } else if constexpr (S.front() == 'f') {
38  return setting ? std::optional(setting->data.f) : std::nullopt;
39  } else if constexpr (S.front() == 'i') {
40  return setting ? std::optional(setting->data.i) : std::nullopt;
41  } else if constexpr (S.front() == 'r') {
42  return setting ? std::optional(setting->data.r) : std::nullopt;
43  } else if constexpr (S.front() == 's') {
44  return setting ? std::optional(setting->data.s) : std::nullopt;
45  } else if constexpr (S.front() == 'u') {
46  return setting ? std::optional(setting->data.u) : std::nullopt;
47  }
48  }
49  }
50 }
Definition: INIPrefSettingCollection.h:8
void Unk_08(void) override
void Unk_07(void) override
static INIPrefSettingCollection * GetSingleton()
void Unk_09(void) override
static constexpr auto RTTI
Definition: INIPrefSettingCollection.h:10
Definition: INISettingCollection.h:9
Definition: Setting.h:8
Data data
Definition: Setting.h:51
Definition: AbsorbEffect.h:6
constexpr REL::ID RTTI_INIPrefSettingCollection
Definition: Offsets_RTTI.h:5002
std::uint32_t u
Definition: Setting.h:30
float f
Definition: Setting.h:26
std::int32_t i
Definition: Setting.h:27
char * s
Definition: Setting.h:29
Color r
Definition: Setting.h:28
bool b
Definition: Setting.h:25