CommonLibSSE (Parapets fork)
BGSStoryEventManager.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/B/BSAtomic.h"
4 #include "RE/B/BSTArray.h"
5 #include "RE/B/BSTHashMap.h"
6 #include "RE/B/BSTSingleton.h"
7 
8 namespace RE
9 {
10  class BGSRegisteredStoryEvent;
11  class BGSStoryEvent;
12 
14  public BSTSingletonImplicit<BGSStoryEventManager> // 00
15  {
16  public:
17  [[nodiscard]] static BGSStoryEventManager* GetSingleton();
18 
19  template <class T>
20  std::uint32_t AddEvent(const T& a_event)
21  {
22  return AddEvent_Impl(T::GetIndex(), &a_event);
23  }
24 
25  // members
29  mutable BSSpinLock eventArrayLock; // 60
30 
31  private:
32  std::uint32_t AddEvent_Impl(std::uint32_t a_index, const void* a_event);
33  };
34  static_assert(sizeof(BGSStoryEventManager) == 0x68);
35 }
Definition: BGSStoryEventManager.h:15
static BGSStoryEventManager * GetSingleton()
BSSpinLock eventArrayLock
Definition: BGSStoryEventManager.h:29
BSTHashMap< std::uint32_t, std::uint32_t > registeredEventIDs
Definition: BGSStoryEventManager.h:27
std::uint32_t AddEvent(const T &a_event)
Definition: BGSStoryEventManager.h:20
BSTArray< BGSStoryEvent > events
Definition: BGSStoryEventManager.h:28
BSTArray< BGSRegisteredStoryEvent > registeredEvents
Definition: BGSStoryEventManager.h:26
Definition: BSAtomic.h:49
Definition: BSTArray.h:377
Definition: BSTHashMap.h:21
constexpr REL::ID GetIndex(static_cast< std::uint64_t >(380074))
Definition: AbsorbEffect.h:6
Definition: BSTSingleton.h:19