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 Attributes | List of all members
Menge::BFSM::NavMeshLocalizerTask Class Reference

Sub-class of NavMeshLocalizer that can be run as an FSM task. More...

#include <NavMeshLocalizerTask.h>

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

Public Member Functions

 NavMeshLocalizerTask (const std::string &navMeshName, bool usePlanner)
 Constructor from a localizer. More...
 
virtual void doWork (const FSM *fsm) throw ( TaskException )
 The work performed by the task. More...
 
virtual std::string toString () const
 String representation of the task. More...
 
virtual bool isEquivalent (const Task *task) const
 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. 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 Attributes

NavMeshLocalizerPtr _localizer
 The localizer used by this task.
 

Additional Inherited Members

- Protected Member Functions inherited from Menge::BFSM::Task
virtual ~Task ()
 Virtual destructor.
 

Detailed Description

Sub-class of NavMeshLocalizer that can be run as an FSM task.

Constructor & Destructor Documentation

Menge::BFSM::NavMeshLocalizerTask::NavMeshLocalizerTask ( const std::string &  navMeshName,
bool  usePlanner 
)

Constructor from a localizer.

Parameters
navMeshNameThe name of the navigation mesh which the task depends on.
usePlannerIndicates if the localizer should use a planner (true) or not (false).

Member Function Documentation

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

The work performed by the task.

Parameters
fsmThe finite state machine for the task to operate on.
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.

Implements Menge::BFSM::Task.

bool Menge::BFSM::NavMeshLocalizerTask::isEquivalent ( const Task task) const
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).

Implements Menge::BFSM::Task.

std::string Menge::BFSM::NavMeshLocalizerTask::toString ( ) const
virtual

String representation of the task.

Returns
A string containing task information.

Implements Menge::BFSM::Task.


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