Menge
Modular Pedestrian Simulation Framework for Research and Development
|
Factory for HexLatticeGenerator. More...
#include <HexLatticeGenerator.h>
Public Member Functions | |
HexLatticeGeneratorFactory () | |
Constructor. | |
virtual const char * | name () const |
The name of the generator type. More... | |
virtual const char * | description () const |
A description of the agent generator. More... | |
Public Member Functions inherited from Menge::ElementFactory< AgentGenerator > | |
ElementFactory () | |
Default constructor. | |
void | destroy () |
This supplants the destructor. More... | |
bool | thisFactory (const std::string &typeName) const |
Reports if the xml node defines an element for this factory. More... | |
AgentGenerator * | createInstance (TiXmlElement *node, const std::string &behaveFldr) const |
Parses the xml data. More... | |
Protected Member Functions | |
AgentGenerator * | instance () const |
Create an instance of this class's agent generator implementation. More... | |
virtual bool | setFromXML (AgentGenerator *gen, TiXmlElement *node, const std::string &specFldr) const |
Given a pointer to an AgentGenerator instance, sets the appropriate fields from the provided XML node. More... | |
Protected Member Functions inherited from Menge::ElementFactory< AgentGenerator > | |
virtual | ~ElementFactory () |
Destructor. | |
virtual bool | setFromXML (AgentGenerator *element, TiXmlElement *node, const std::string &specFldr) const |
Given a pointer to an element instance, sets the appropriate fields from the provided XML node. More... | |
Protected Attributes | |
size_t | _anchorXID |
The identifier for the "anchor_x" float parameter. | |
size_t | _anchorYID |
The identifier for the "anchor_y" float parameter. | |
size_t | _alignID |
The identifier for the "alignment" string parameter. | |
size_t | _rowDirID |
The identifier for the "row_direction" string parameter. | |
size_t | _densityID |
The identifier for the "density" float parameter. | |
size_t | _widthID |
The identifier for the "width" float parameter. | |
size_t | _popID |
The identifier for the "count" size_t parameter. | |
size_t | _rotID |
The identifier for the "rotation" float parameter. | |
Protected Attributes inherited from Menge::ElementFactory< AgentGenerator > | |
AttributeSet | _attrSet |
The attribute set for this factory. | |
Factory for HexLatticeGenerator.
|
inlinevirtual |
A description of the agent generator.
Each agent generator factory must override this function.
Implements Menge::ElementFactory< AgentGenerator >.
|
inlineprotectedvirtual |
Create an instance of this class's agent generator implementation.
All AgentGeneratorFactory sub-classes must override this by creating (on the heap) a new instance of its corresponding generator type. The various field values of the instance will be set in a subsequent call to AgentGeneratorFactory::setFromXML. The caller of this function takes ownership of the memory.
Implements Menge::ElementFactory< AgentGenerator >.
|
inlinevirtual |
The name of the generator type.
The generator's name must be unique among all registered agent generator components. Each agent generator factory must override this function.
Implements Menge::ElementFactory< AgentGenerator >.
|
protectedvirtual |
Given a pointer to an AgentGenerator instance, sets the appropriate fields from the provided XML node.
It is assumed that the value of the type
attribute is this AgentGenerator's type. (i.e. AgentGenerator::thisFactory has already been called and returned true.) If sub-classes of AgentGeneratorFactory introduce new AgentGenerator parameters, then the sub-class should override this method but explicitly call the parent class's version.
gen | A pointer to the agent generator whose attributes are to be set. |
node | The XML node containing the agent generator attributes. |
specFldr | The path to the specification file. If the AgentGenerator references resources in the file system, it should be defined relative to the specification file location. This is the folder containing that path. |
Reimplemented from Menge::Agents::AgentGeneratorFactory.