Menge
Modular Pedestrian Simulation Framework for Research and Development
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Menge::BFSM::PointGoalFactory Class Reference

Factory for the PointGoal. More...

#include <GoalPoint.h>

Inheritance diagram for Menge::BFSM::PointGoalFactory:
Menge::BFSM::GoalFactory Menge::ElementFactory< Goal >

Public Member Functions

 PointGoalFactory ()
 Constructor.
 
virtual const char * name () const
 The name of the goal type. More...
 
virtual const char * description () const
 A description of the goal. More...
 
- Public Member Functions inherited from Menge::BFSM::GoalFactory
 GoalFactory ()
 Constructor.
 
- Public Member Functions inherited from Menge::ElementFactory< Goal >
 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...
 
Goal * createInstance (TiXmlElement *node, const std::string &behaveFldr) const
 Parses the xml data. More...
 

Protected Member Functions

Goalinstance () const
 Create an instance of this class's goal. More...
 
virtual bool setFromXML (Goal *goal, TiXmlElement *node, const std::string &behaveFldr) const
 Given a pointer to a Goal instance, sets the appropriate fields from the provided XML node. More...
 
- Protected Member Functions inherited from Menge::ElementFactory< Goal >
virtual ~ElementFactory ()
 Destructor.
 
virtual bool setFromXML (Goal *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 _xID
 The identifier for the "x" float attribute.
 
size_t _yID
 The identifier for the "y" float attribute.
 
- Protected Attributes inherited from Menge::BFSM::GoalFactory
size_t _idID
 The identifier for the "id" size_t attribute.
 
size_t _capacityID
 The identifier for the "capacity" size_t attribute.
 
size_t _weightID
 The identifier for the "weight" size_t attribute.
 
- Protected Attributes inherited from Menge::ElementFactory< Goal >
AttributeSet _attrSet
 The attribute set for this factory.
 

Detailed Description

Factory for the PointGoal.

Member Function Documentation

virtual const char* Menge::BFSM::PointGoalFactory::description ( ) const
inlinevirtual

A description of the goal.

Each goal factory must override this function.

Returns
A string containing the goal description.

Implements Menge::ElementFactory< Goal >.

Goal* Menge::BFSM::PointGoalFactory::instance ( ) const
inlineprotectedvirtual

Create an instance of this class's goal.

Returns
A pointer to a newly instantiated Goal class.

Implements Menge::ElementFactory< Goal >.

virtual const char* Menge::BFSM::PointGoalFactory::name ( ) const
inlinevirtual

The name of the goal type.

The goal's name must be unique among all registered goals. Each goal factory must override this function.

Returns
A string containing the unique goal name.

Implements Menge::ElementFactory< Goal >.

bool Menge::BFSM::PointGoalFactory::setFromXML ( Goal goal,
TiXmlElement *  node,
const std::string &  behaveFldr 
) const
protectedvirtual

Given a pointer to a Goal instance, sets the appropriate fields from the provided XML node.

Parameters
goalA pointer to the goal whose attributes are to be set.
nodeThe XML node containing the action attributes.
behaveFldrThe path to the behavior file. If the action references resources in the file system, it should be defined relative to the behavior file location. This is the folder containing that path.
Returns
A boolean reporting success (true) or failure (false).

Reimplemented from Menge::BFSM::GoalFactory.


The documentation for this class was generated from the following files: