The PhysicalObjectFactory class is a singleton class allowing users to register factories for a PhysicalObject class through a type name.
More...
#include <physicalobjectfactory.h>
The PhysicalObjectFactory class is a singleton class allowing users to register factories for a PhysicalObject class through a type name.
PhysicalObjectFactory::PhysicalObjectFactory |
( |
) | |
|
|
explicitprivate |
void PhysicalObjectFactory::addFactory |
( |
const QString & |
name, |
|
|
FactoryFunction |
factoryFunction |
|
) |
| |
addFactory registers a root object factory on a type name.
- Parameters
-
name | type name of the object. |
factoryFunction | factory function used to create the object from a json object. |
References _map.
Referenced by PhysicalObjectFactory().
FactoryFunction * PhysicalObjectFactory::getFactory |
( |
const QString & |
name) | |
|
getFactory
- Parameters
-
name | type name of the object. |
- Returns
- Factory function for creating an object of type "name" from a json object.
References _map.
Referenced by World::fromJsonDocument().
The documentation for this class was generated from the following files: