Menge
Modular Pedestrian Simulation Framework for Research and Development
|
The factory to generate NamedStateMemberTarget instances. More...
#include <StateMemberTarget.h>
Public Member Functions | |
NamedStateMemberTargetFactory () | |
Constructor. | |
virtual const char * | name () const |
The name of the target. More... | |
virtual const char * | description () const |
A description of the target. More... | |
Public Member Functions inherited from Menge::ElementFactory< EventTarget > | |
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... | |
EventTarget * | createInstance (TiXmlElement *node, const std::string &behaveFldr) const |
Parses the xml data. More... | |
Protected Member Functions | |
EventTarget * | instance () const |
Create an instance of this class's target. More... | |
virtual bool | setFromXML (EventTarget *target, TiXmlElement *node, const std::string &behaveFldr) const |
Given a pointer to an EventTarget instance, sets the appropriate fields from the provided XML node. More... | |
Protected Member Functions inherited from Menge::ElementFactory< EventTarget > | |
virtual | ~ElementFactory () |
Destructor. | |
Protected Attributes | |
size_t | _stateID |
The identifier for the "state" string attribute. | |
size_t | _isMemberID |
The identifier for the "is_member" bool attribute. | |
Protected Attributes inherited from Menge::ElementFactory< EventTarget > | |
AttributeSet | _attrSet |
The attribute set for this factory. | |
The factory to generate NamedStateMemberTarget instances.
|
inlinevirtual |
A description of the target.
Each target factory must override this function.
Implements Menge::ElementFactory< EventTarget >.
|
inlineprotectedvirtual |
Create an instance of this class's target.
All EventTargetFactory sub-classes must override this by creating (on the heap) a new instance of its corresponding event target type. The various field values of the instance will be set in a subsequent call to EventTargetFactory::setFromXML. The caller of this function takes ownership of the memory.
Implements Menge::ElementFactory< EventTarget >.
|
inlinevirtual |
The name of the target.
The target's name must be unique among all registered targets. Each target factory must override this function.
Implements Menge::ElementFactory< EventTarget >.
|
protectedvirtual |
Given a pointer to an EventTarget instance, sets the appropriate fields from the provided XML node.
It is assumed that the value of the type
attribute is this EventTarget's type. (i.e. EventTargetFactory::thisFactory has already been called and returned true.) If sub-classes of EventTargetFactory introduce new EventTarget parameters, then the sub-class should override this method but explicitly call the parent class's version.
target | A pointer to the target whose attributes are to be set. |
node | The XML node containing the target attributes. |
behaveFldr | The path to the behavior file. If the target references resources in the file system, it should be defined relative to the behavior file location. This is the folder containing that path. |
Reimplemented from Menge::ElementFactory< EventTarget >.