CommonLibSSE (Parapets fork)
UIMessageDataFactory.h
Go to the documentation of this file.
1 #pragma once
2 
5 
6 namespace RE
7 {
8  namespace UIMessageDataFactory
9  {
10  [[nodiscard]] inline IUIMessageData* Create(const BSFixedString& a_name)
11  {
12  const auto manager = MessageDataFactoryManager::GetSingleton();
13  const auto creator = manager->GetCreator(a_name);
14  return creator->Create();
15  }
16 
17  template <typename T>
18  [[nodiscard]] inline T* Create()
19  {
20  const auto manager = MessageDataFactoryManager::GetSingleton();
21  const auto creator = manager->GetCreator<T>(T::CLASS_NAME);
22  return creator->Create();
23  }
24  }
25 }
Definition: IUIMessageData.h:6
static MessageDataFactoryManager * GetSingleton()
IUIMessageData * Create(const BSFixedString &a_name)
Definition: UIMessageDataFactory.h:10
Definition: AbsorbEffect.h:6