Jolt Physics
A multi core friendly Game Physics Engine
|
This class is responsible for creating instances of classes based on their name or hash and is mainly used for deserialization of saved data. More...
#include <Factory.h>
Public Member Functions | |
JPH_OVERRIDE_NEW_DELETE void * | CreateObject (const char *inName) |
Create an object. More... | |
const RTTI * | Find (const char *inName) |
Find type info for a specific class by name. More... | |
const RTTI * | Find (uint32 inHash) |
Find type info for a specific class by hash. More... | |
bool | Register (const RTTI *inRTTI) |
Register an object with the factory. Returns false on failure. More... | |
bool | Register (const RTTI **inRTTIs, uint inNumber) |
Register a list of objects with the factory. Returns false on failure. More... | |
void | Clear () |
Unregisters all types. More... | |
Array< const RTTI * > | GetAllClasses () const |
Get all registered classes. More... | |
Static Public Attributes | |
static Factory * | sInstance = nullptr |
Singleton factory instance. More... | |
This class is responsible for creating instances of classes based on their name or hash and is mainly used for deserialization of saved data.
void Factory::Clear | ( | ) |
Unregisters all types.
void * Factory::CreateObject | ( | const char * | inName | ) |
Create an object.
const RTTI * Factory::Find | ( | const char * | inName | ) |
Find type info for a specific class by name.
Register a list of objects with the factory. Returns false on failure.
bool Factory::Register | ( | const RTTI * | inRTTI | ) |
Register an object with the factory. Returns false on failure.
|
static |
Singleton factory instance.