Factory class to create WallBase objects.
More...
#include <WallFactory.h>
Factory class to create WallBase objects.
This class is mainly used via the newWall() function, for example:
shared_ptr<WallBase> piston =
newWall(
"Wall");
shared_ptr< WallBase > newWall(const string &model)
Create a WallBase object of the specified type.
Definition at line 22 of file WallFactory.h.
|
void | deleteFactory () override |
| Virtual abstract function that deletes the factory.
|
|
WallBase * | create (const string &name, Args... args) |
| Create an object using the object construction function corresponding to "name" and the provided constructor arguments.
|
|
void | reg (const string &name, function< WallBase *(Args...)> f) |
| Register a new object construction function.
|
|
void | addAlias (const string &original, const string &alias) |
| Add an alias for an existing registered type.
|
|
string | canonicalize (const string &name) |
| Get the canonical name registered for a type.
|
|
bool | exists (const string &name) const |
| Returns true if name is registered with this factory.
|
|
virtual | ~FactoryBase () |
| destructor
|
|
|
void | addDeprecatedAlias (const string &original, const string &alias) |
| Add a deprecated alias for an existing registered type.
|
|
| FactoryBase () |
| Constructor.
|
|
virtual void | deleteFactory ()=0 |
| Virtual abstract function that deletes the factory.
|
|
◆ WallFactory()
◆ factory()
◆ deleteFactory()
Virtual abstract function that deletes the factory.
This must be properly defined in child objects.
Implements FactoryBase.
Definition at line 28 of file WallFactory.cpp.
◆ s_factory
◆ wall_mutex
The documentation for this class was generated from the following files: