CommonLibSSE (Parapets fork)
Loading...
Searching...
No Matches
Object.h
Go to the documentation of this file.
1#pragma once
2
6#include "RE/V/Variable.h"
7
8namespace RE
9{
10 namespace BSScript
11 {
12 class ObjectTypeInfo;
13
14 class Object
15 {
16 public:
18
19 [[nodiscard]] VMHandle GetHandle() const;
21 [[nodiscard]] const ObjectTypeInfo* GetTypeInfo() const;
22 [[nodiscard]] constexpr bool IsConstructed() const noexcept { return static_cast<bool>(constructed); }
23 [[nodiscard]] constexpr bool IsInitialized() const noexcept { return static_cast<bool>(initialized); }
24 [[nodiscard]] constexpr bool IsValid() const noexcept { return static_cast<bool>(valid); }
25
26 [[nodiscard]] void* Resolve(VMTypeID a_typeID) const;
27
28 void IncRef();
29 std::uint32_t DecRef();
30
32 [[nodiscard]] const Variable* GetProperty(const BSFixedString& a_name) const;
33
35
36 // members
37 std::uint32_t constructed: 1; // 00 - 0
38 std::uint32_t initialized: 1; // 00 - 1
39 std::uint32_t valid: 1; // 00 - 2
40 std::uint32_t remainingPropsToInit: 29; // 00 - 3
43 void* lockStructure; // 18 - first bit used as flag
44 volatile VMHandle handle; // 20
45 volatile std::int32_t refCountAndHandleLock; // 28
46 std::uint32_t pad2C; // 2C
47 Variable variables[0]; // 30 - size == classPtr->GetTotalNumVariables() + 3
48
49 private:
50 void Dtor();
51 };
52 static_assert(sizeof(Object) == 0x30);
53 }
54}
Definition: Object.h:15
const ObjectTypeInfo * GetTypeInfo() const
VMHandle GetHandle() const
std::uint32_t valid
Definition: Object.h:39
BSFixedString currentState
Definition: Object.h:42
constexpr bool IsConstructed() const noexcept
Definition: Object.h:22
ObjectTypeInfo * GetTypeInfo()
const Variable * GetProperty(const BSFixedString &a_name) const
std::uint32_t initialized
Definition: Object.h:38
std::uint32_t remainingPropsToInit
Definition: Object.h:40
void * lockStructure
Definition: Object.h:43
BSTSmartPointer< ObjectTypeInfo > type
Definition: Object.h:41
Variable * GetProperty(const BSFixedString &a_name)
std::uint32_t pad2C
Definition: Object.h:46
void * Resolve(VMTypeID a_typeID) const
volatile VMHandle handle
Definition: Object.h:44
constexpr bool IsInitialized() const noexcept
Definition: Object.h:23
constexpr bool IsValid() const noexcept
Definition: Object.h:24
std::uint32_t constructed
Definition: Object.h:37
std::uint32_t DecRef()
volatile std::int32_t refCountAndHandleLock
Definition: Object.h:45
Variable variables[0]
Definition: Object.h:47
Definition: ObjectTypeInfo.h:17
Definition: Variable.h:15
Definition: BSTSmartPointer.h:37
Definition: AbsorbEffect.h:6
std::uint32_t VMTypeID
Definition: BSCoreTypes.h:9
std::uint64_t VMHandle
Definition: BSCoreTypes.h:7