CommonLibVR
Loading...
Searching...
No Matches
BGSNumericIDIndex.h
Go to the documentation of this file.
1#pragma once
2
3namespace RE
4{
6 {
7 public:
8 ~BGSNumericIDIndex() noexcept {} // intentional
9
10 enum class Flags : std::uint8_t
11 {
12 kDefault = 1u << 6, // idx 0x00
13 kCreated = 1u << 7, // idx 0xFF
14 };
15
16 [[nodiscard]] bool IsCreated() const noexcept { return flags.all(Flags::kCreated); }
17 [[nodiscard]] bool IsDefault() const noexcept { return flags.all(Flags::kDefault); }
18
19 [[nodiscard]] FormID GetNumericID() const
20 {
21 using func_t = decltype(&BGSNumericIDIndex::GetNumericID);
22 static REL::Relocation<func_t> func{ RELOCATION_ID(35026, 35927) };
23 return func(this);
24 }
25 void SetNumericID(FormID a_formID)
26 {
27 using func_t = decltype(&BGSNumericIDIndex::SetNumericID);
28 static REL::Relocation<func_t> func{ RELOCATION_ID(35027, 35928) };
29 return func(this, a_formID);
30 }
31
32 // members
33 union
34 {
35 struct
36 {
37 union
38 {
39 std::uint8_t data1;
41 }; // 0
42 std::uint8_t data2; // 1
43 std::uint8_t data3; // 2
44 };
45 std::uint8_t data[3]{ 0 };
46 }; // 0
47 private:
49 };
50 static_assert(sizeof(BGSNumericIDIndex) == 0x3);
51}
#define KEEP_FOR_RE()
Definition PCH.h:517
#define RELOCATION_ID(SE, AE)
Definition PCH.h:506
Definition Relocation.h:210
Definition EnumSet.h:9
constexpr bool all(Args... a_args) const noexcept
Definition EnumSet.h:99
Definition AbsorbEffect.h:6
std::uint32_t FormID
Definition BSCoreTypes.h:5
Definition BGSNumericIDIndex.h:6
bool IsDefault() const noexcept
Definition BGSNumericIDIndex.h:17
REX::EnumSet< Flags, std::uint8_t > flags
Definition BGSNumericIDIndex.h:40
void SetNumericID(FormID a_formID)
Definition BGSNumericIDIndex.h:25
FormID GetNumericID() const
Definition BGSNumericIDIndex.h:19
std::uint8_t data2
Definition BGSNumericIDIndex.h:42
~BGSNumericIDIndex() noexcept
Definition BGSNumericIDIndex.h:8
std::uint8_t data[3]
Definition BGSNumericIDIndex.h:45
bool IsCreated() const noexcept
Definition BGSNumericIDIndex.h:16
Flags
Definition BGSNumericIDIndex.h:11
std::uint8_t data1
Definition BGSNumericIDIndex.h:39
std::uint8_t data3
Definition BGSNumericIDIndex.h:43