Menge
Modular Pedestrian Simulation Framework for Research and Development
|
Interface for basic FSM task. More...
#include <Task.h>
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::Task * | getTask () |
Return an optional task associated with this element. More... | |
virtual SceneGraph::GLNode * | getSGNode () |
Returns an optional visualization element associated with the element. More... | |
Protected Member Functions | |
virtual | ~Task () |
Virtual destructor. | |
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.
|
pure virtual |
The work performed by the task.
fsm | The behavior finite state machine on which the task is performed. |
A | TaskException if there was some non-fatal error in execution. It should be logged. |
A | TaskFatalException if there is a fatal error that should arrest execution of the simulation. |
Implemented in Menge::BFSM::NavMeshLocalizerTask.
|
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.
task | The task to test against this one. |
Implemented in Menge::BFSM::NavMeshLocalizerTask.
|
pure virtual |
String representation of the task.
TODO: Determine when this is used.
Implemented in Menge::BFSM::NavMeshLocalizerTask.