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 | List of all members
Menge::BFSM::Task Class Referenceabstract

Interface for basic FSM task. More...

#include <Task.h>

Inheritance diagram for Menge::BFSM::Task:
Menge::Element Menge::BFSM::NavMeshLocalizerTask

Public Member Functions

virtual void doWork (const FSM *fsm)=0 throw ( TaskException )
 The work performed by the task. More...
 
virtual std::string toString () const =0
 String representation of the task. More...
 
virtual bool isEquivalent (const Task *task) const =0
 Reports if this task is "equivalent" to the given task. More...
 
- Public Member Functions inherited from Menge::Element
void destroy ()
 This supplants the destructor. More...
 
virtual BFSM::TaskgetTask ()
 Return an optional task associated with this element. More...
 
virtual SceneGraph::GLNodegetSGNode ()
 Returns an optional visualization element associated with the element. More...
 

Protected Member Functions

virtual ~Task ()
 Virtual destructor.
 

Detailed Description

Interface for basic FSM task.

Tasks must implement three functions: doWork, toString, and isEquivalent. Tasks' doWork functions are evaluated at the beginning of each FSM evaluation per time step.

Member Function Documentation

virtual void Menge::BFSM::Task::doWork ( const FSM fsm)
throw (TaskException
)
pure virtual

The work performed by the task.

Parameters
fsmThe behavior finite state machine on which the task is performed.
Exceptions
ATaskException if there was some non-fatal error in execution. It should be logged.
ATaskFatalException if there is a fatal error that should arrest execution of the simulation.

Implemented in Menge::BFSM::NavMeshLocalizerTask.

virtual bool Menge::BFSM::Task::isEquivalent ( const Task task) const
pure virtual

Reports if this task is "equivalent" to the given task.

This makes it possible for a task to be redundantly added to the fsm without fear of duplication as the equivalent duplicates will be culled.

Parameters
taskThe task to test against this one.
Returns
A boolean reporting if the two tasks are equivalent (true) or unique (false).

Implemented in Menge::BFSM::NavMeshLocalizerTask.

virtual std::string Menge::BFSM::Task::toString ( ) const
pure virtual

String representation of the task.

TODO: Determine when this is used.

Returns
A string containing task information.

Implemented in Menge::BFSM::NavMeshLocalizerTask.


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