CommonLibSSE (Parapets fork)
Loading...
Searching...
No Matches
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
8namespace RE
9{
10 class BGSRegisteredStoryEvent;
11 class BGSStoryEvent;
12
14 public BSTSingletonImplicit<BGSStoryEventManager> // 00
15 {
16 public:
17 [[nodiscard]] static BGSStoryEventManager* GetSingleton()
18 {
19 using func_t = decltype(&BGSStoryEventManager::GetSingleton);
21 return func();
22 }
23
24 template <class T>
25 std::uint32_t AddEvent(const T& a_event)
26 {
27 return AddEvent_Impl(T::GetIndex(), &a_event);
28 }
29
30 // members
35
36 private:
37 std::uint32_t AddEvent_Impl(std::uint32_t a_index, const void* a_event)
38 {
39 using func_t = decltype(&BGSStoryEventManager::AddEvent_Impl);
41 return func(this, a_index, a_event);
42 }
43 };
44 static_assert(sizeof(BGSStoryEventManager) == 0x68);
45}
Definition: BGSStoryEventManager.h:15
BSSpinLock eventArrayLock
Definition: BGSStoryEventManager.h:34
BSTHashMap< std::uint32_t, std::uint32_t > registeredEventIDs
Definition: BGSStoryEventManager.h:32
std::uint32_t AddEvent(const T &a_event)
Definition: BGSStoryEventManager.h:25
static BGSStoryEventManager * GetSingleton()
Definition: BGSStoryEventManager.h:17
BSTArray< BGSStoryEvent > events
Definition: BGSStoryEventManager.h:33
BSTArray< BGSRegisteredStoryEvent > registeredEvents
Definition: BGSStoryEventManager.h:31
Definition: BSAtomic.h:49
Definition: BSTArray.h:377
Definition: BSTHashMap.h:21
Definition: Relocation.h:858
constexpr REL::ID AddEvent(static_cast< std::uint64_t >(32359))
constexpr REL::ID GetSingleton(static_cast< std::uint64_t >(22790))
Definition: AbsorbEffect.h:6
Definition: BSTSingleton.h:19