CommonLibSSE (powerof3)
GarbageCollector.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/B/BSAtomic.h"
4 #include "RE/B/BSPointerHandle.h"
5 #include "RE/B/BSTArray.h"
6 #include "RE/B/BSTEvent.h"
7 #include "RE/B/BSTSingleton.h"
8 #include "RE/N/NiSmartPointer.h"
9 
10 namespace RE
11 {
12  class BSAnimationGraphManager;
13  class BSCloneReserver;
14  class BSTempEffect;
15  class BipedAnim;
16  class NavMesh;
17  class NiAVObject;
18  class QueuedFile;
19  class TESBoundObject;
20  class TESObjectREFR;
21 
23  {
24  public:
25  // members
36  bool deleting; // E0
37  };
38  static_assert(sizeof(GarbageCollection) == 0xE8);
39 
41  public BSTSingletonSDM<GarbageCollector>,
42  public BSTEventSink<PositionPlayerEvent>
43  {
44  public:
45  inline static constexpr auto RTTI = RTTI_GarbageCollector;
46  inline static constexpr auto VTABLE = VTABLE_GarbageCollector;
47 
48  ~GarbageCollector() override; // 00
49 
50  // override (BSTEventSink<PositionPlayerEvent>)
52 
54  {
55  static REL::Relocation<GarbageCollector**> singleton{ RELOCATION_ID(514180, 400329) };
56  return *singleton;
57  }
58 
59  void Add(TESObjectREFR* a_object, bool a_removeFromCell)
60  {
61  using func_t = decltype(&GarbageCollector::Add);
62  static REL::Relocation<func_t> func{ RELOCATION_ID(35492, 36459) };
63  return func(this, a_object, a_removeFromCell);
64  }
65 
66  // members
68  };
69  static_assert(sizeof(GarbageCollector) == 0x18);
70 }
#define RELOCATION_ID(SE, AE)
Definition: PCH.h:505
Definition: Relocation.h:210
Definition: BSAtomic.h:92
Definition: BSTArray.h:378
Definition: BSTEvent.h:143
Definition: GarbageCollector.h:43
BSEventNotifyControl ProcessEvent(const PositionPlayerEvent *a_event, BSTEventSource< PositionPlayerEvent > *a_eventSource) override
static GarbageCollector * GetSingleton()
Definition: GarbageCollector.h:53
~GarbageCollector() override
GarbageCollection * garbageCollection
Definition: GarbageCollector.h:67
static constexpr auto RTTI
Definition: GarbageCollector.h:45
void Add(TESObjectREFR *a_object, bool a_removeFromCell)
Definition: GarbageCollector.h:59
static constexpr auto VTABLE
Definition: GarbageCollector.h:46
Definition: TESObjectREFR.h:114
Definition: AbsorbEffect.h:6
constexpr REL::ID RTTI_GarbageCollector(static_cast< std::uint64_t >(686640))
constexpr std::array< REL::ID, 1 > VTABLE_GarbageCollector
Definition: Offsets_VTABLE.h:11715
BSEventNotifyControl
Definition: BSTEvent.h:12
Definition: BSTSingleton.h:50
Definition: GarbageCollector.h:23
BSTArray< TESBoundObject * > baseObjects
Definition: GarbageCollector.h:28
BSTArray< BSTSmartPointer< BipedAnim > > bipedAnims
Definition: GarbageCollector.h:31
BSTArray< BSTSmartPointer< NavMesh > > navMeshes
Definition: GarbageCollector.h:35
bool deleting
Definition: GarbageCollector.h:36
BSTArray< NiPointer< BSTempEffect > > tempEffects
Definition: GarbageCollector.h:32
BSTArray< NiPointer< NiAVObject > > actorNodes
Definition: GarbageCollector.h:30
BSTArray< NiPointer< BSCloneReserver > > cloneReservers
Definition: GarbageCollector.h:34
BSTArray< NiPointer< QueuedFile > > queuedFiles
Definition: GarbageCollector.h:33
BSTArray< BSTSmartPointer< BSAnimationGraphManager > > animations
Definition: GarbageCollector.h:27
BSSpinLock lock
Definition: GarbageCollector.h:26
BSTArray< ObjectRefHandle > objectHandles
Definition: GarbageCollector.h:29
Definition: PositionPlayerEvent.h:7