CommonLibSSE (powerof3)
IFormFactory.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/F/FormTypes.h"
4 
5 namespace RE
6 {
7  template <class T, FormType>
8  class ConcreteFormFactory;
9 
10  enum class OBJECT_TYPE
11  {
12  };
13 
15  {
16  };
17 
19  {
20  public:
21  inline static constexpr auto RTTI = RTTI_IFormFactory;
22  inline static constexpr auto VTABLE = VTABLE_IFormFactory;
23 
24  virtual ~IFormFactory(); // 00
25 
26  protected:
27  // add
28  virtual TESForm* CreateImpl() = 0; // 01
29 
30  public:
31  [[nodiscard]] virtual const char* GetFormName() const = 0; // 02
32  [[nodiscard]] virtual FormType GetFormType() const = 0; // 03
33  [[nodiscard]] virtual const char* GetObjectName() const; // 04 - { return 0; }
34  [[nodiscard]] virtual OBJECT_TYPE GetObjectType() const; // 05 - { return 106; }
35  [[nodiscard]] virtual OBJECT_CATEGORY_TYPE GetObjectCategory() const; // 06 - { return 9; }
36 
37  static std::pair<IFormFactory**, bool> GetFormFactories();
39 
40  template <class T>
42 
44  template <class T>
45  static T* Create();
46  };
47  static_assert(sizeof(IFormFactory) == 0x8);
48 }
Definition: ConcreteFormFactory.h:10
Definition: IFormFactory.h:19
virtual const char * GetObjectName() const
static constexpr auto RTTI
Definition: IFormFactory.h:21
static std::pair< IFormFactory **, bool > GetFormFactories()
virtual const char * GetFormName() const =0
virtual OBJECT_CATEGORY_TYPE GetObjectCategory() const
TESForm * Create()
virtual ~IFormFactory()
static IFormFactory * GetFormFactoryByType(FormType a_formType)
virtual OBJECT_TYPE GetObjectType() const
virtual TESForm * CreateImpl()=0
static ConcreteFormFactory< T, T::FORMTYPE > * GetConcreteFormFactoryByType()
Definition: ConcreteFormFactory.h:34
virtual FormType GetFormType() const =0
static constexpr auto VTABLE
Definition: IFormFactory.h:22
Definition: TESForm.h:36
Definition: AbsorbEffect.h:6
constexpr std::array< REL::ID, 1 > VTABLE_IFormFactory
Definition: Offsets_VTABLE.h:11797
OBJECT_TYPE
Definition: IFormFactory.h:11
OBJECT_CATEGORY_TYPE
Definition: IFormFactory.h:15
FormType
Definition: FormTypes.h:139
constexpr REL::ID RTTI_IFormFactory(static_cast< std::uint64_t >(684588))