CommonLibSSE NG
Loading...
Searching...
No Matches
ConcreteFormFactory.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
RE/I/IFormFactory.h
"
4
#include "
RE/T/TESForm.h
"
5
6
namespace
RE
7
{
8
template
<
class
T, FormType FORM_TYPE>
9
class
ConcreteFormFactory
:
public
IFormFactory
10
{
11
public
:
12
~ConcreteFormFactory
()
override
;
// 00
13
14
protected
:
15
// override (IFormFactory)
16
TESForm
*
CreateImpl
()
override
;
// 01
17
18
public
:
19
const
char
*
GetFormName
()
const override
;
// 02 - { return _name; }
20
[[nodiscard]]
FormType
GetFormType
()
const override
;
// 03 - { return FORM_TYPE; }
21
22
inline
T*
Create
()
23
{
24
return
static_cast<
T*
>
(
CreateImpl
());
25
}
26
27
protected
:
28
// members
29
const
char
*
_name
;
// 08
30
};
31
static_assert
(
sizeof
(
ConcreteFormFactory<TESForm, FormType::None>
) == 0x10);
32
33
template
<
class
T>
34
inline
ConcreteFormFactory<T, T::FORMTYPE>
*
IFormFactory::GetConcreteFormFactoryByType
()
35
{
36
return
static_cast<
ConcreteFormFactory<T, T::FORMTYPE>
*
>
(
GetFormFactoryByType
(T::FORMTYPE));
37
}
38
}
IFormFactory.h
TESForm.h
RE::ConcreteFormFactory
Definition
ConcreteFormFactory.h:10
RE::ConcreteFormFactory::~ConcreteFormFactory
~ConcreteFormFactory() override
RE::ConcreteFormFactory::GetFormName
const char * GetFormName() const override
RE::ConcreteFormFactory::GetFormType
FormType GetFormType() const override
RE::ConcreteFormFactory::_name
const char * _name
Definition
ConcreteFormFactory.h:29
RE::ConcreteFormFactory::Create
T * Create()
Definition
ConcreteFormFactory.h:22
RE::ConcreteFormFactory::CreateImpl
TESForm * CreateImpl() override
RE::IFormFactory
Definition
IFormFactory.h:19
RE::IFormFactory::GetFormFactoryByType
static IFormFactory * GetFormFactoryByType(FormType a_formType)
RE::IFormFactory::GetConcreteFormFactoryByType
static ConcreteFormFactory< T, T::FORMTYPE > * GetConcreteFormFactoryByType()
Definition
ConcreteFormFactory.h:34
RE::TESForm
Definition
TESForm.h:35
RE
Definition
AbsorbEffect.h:6
RE::FormType
FormType
Definition
FormTypes.h:139
CommonLibSSE-NG
include
RE
C
ConcreteFormFactory.h
Generated by
1.9.7