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