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. | |
const RTTI * | Find (const char *inName) |
Find type info for a specific class by name. | |
const RTTI * | Find (uint32 inHash) |
Find type info for a specific class by hash. | |
bool | Register (const RTTI *inRTTI) |
Register an object with the factory. Returns false on failure. | |
bool | Register (const RTTI **inRTTIs, uint inNumber) |
Register a list of objects with the factory. Returns false on failure. | |
void | Clear () |
Unregisters all types. | |
Array< const RTTI * > | GetAllClasses () const |
Get all registered classes. | |
Static Public Attributes | |
static Factory * | sInstance = nullptr |
Singleton factory instance. | |
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.
Register a list of objects with the factory. Returns false on failure.
Register an object with the factory. Returns false on failure.
|
static |
Singleton factory instance.