docs: add plugin setup guide
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
#pragma once
|
||||
|
||||
#include "RE/I/IFormFactory.h"
|
||||
|
||||
namespace RE
|
||||
{
|
||||
template <class T, ENUM_FORM_ID ID = T::FORM_ID>
|
||||
class __declspec(novtable) ConcreteFormFactory :
|
||||
public IFormFactory // 00
|
||||
{
|
||||
public:
|
||||
[[nodiscard]] static ConcreteFormFactory* GetFormFactory()
|
||||
{
|
||||
const auto factories = GetFormFactories();
|
||||
return static_cast<ConcreteFormFactory*>(factories[std::to_underlying(ID)]);
|
||||
}
|
||||
|
||||
[[nodiscard]] T* Create() { return static_cast<T*>(DoCreate()); }
|
||||
|
||||
// members
|
||||
const char* name{ nullptr };
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user