Go to the source code of this file.
◆ DECLARE_FACTORY
| #define DECLARE_FACTORY |
( |
|
Class, |
|
|
|
BaseClass |
|
) |
| |
Value:
virtual TypeId GetType()
const; \
virtual const char* GetClassName() const; \
static TypeId GetStaticType();
uint32_t TypeId
Definition EngineTypes.h:64
◆ DECLARE_FACTORY_MANAGER
| #define DECLARE_FACTORY_MANAGER |
( |
|
Base | ) |
|
Value: static std::vector<Factory*>& GetFactoryList(); \
static TypeId RegisterFactory(
Factory* factory, uint32_t typeIdMod = 0); \
static Base* CreateInstance(const char* typeName); \
static Base* CreateInstance(
TypeId typeId);
◆ DEFINE_FACTORY
◆ DEFINE_FACTORY_EX
| #define DEFINE_FACTORY_EX |
( |
|
Class, |
|
|
|
BaseClass, |
|
|
|
TypeMod |
|
) |
| |
Value:
{ \
public: \
Factory_##
Class() { mType = BaseClass::RegisterFactory(
this, TypeMod); } \
virtual void*
Create()
override {
return new Class(); } \
}; \
TypeId Class::GetType()
const {
return sFactory_##
Class.GetType(); } \
const char* Class::GetClassName()
const {
return sFactory_##
Class.GetClassName(); } \
TypeId Class::GetStaticType() {
return sFactory_##
Class.GetType(); }
virtual const char * GetClassName() const
Definition Factory.h:79
virtual void * Create()
Definition Factory.h:74
◆ DEFINE_FACTORY_MANAGER
| #define DEFINE_FACTORY_MANAGER |
( |
|
Base | ) |
|