Menge Plugin Examples
A Collection of Example Plugins for the Menge Framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
Public Member Functions | Protected Attributes | List of all members
Formations::FormationsTask Class Reference

Task responsible for updating agent data for maintaining a formation. More...

#include <FormationsTask.h>

Inheritance diagram for Formations::FormationsTask:

Public Member Functions

 FormationsTask (Formations::FormationPtr &form)
 Constructor. More...
 
virtual void doWork (const BFSM::FSM *fsm) throw ( BFSM::TaskException )
 The work performed by the task. More...
 
virtual std::string toString () const
 String representation of the task. More...
 
virtual bool isEquivalent (const BFSM::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...
 
const Formations::FormationPtr getFormation () const
 Get the formation represented in this task. More...
 

Protected Attributes

Formations::FormationPtr _formation
 The underlying formation data.
 

Detailed Description

Task responsible for updating agent data for maintaining a formation.

Constructor & Destructor Documentation

Formations::FormationsTask::FormationsTask ( Formations::FormationPtr form)

Constructor.

Parameters
formThe formation to be maintained in the task.

Member Function Documentation

void Formations::FormationsTask::doWork ( const BFSM::FSM *  fsm)
throw (BFSM::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.
const Formations::FormationPtr Formations::FormationsTask::getFormation ( ) const
inline

Get the formation represented in this task.

Returns
The FormationPtr object containing the formation resource
bool Formations::FormationsTask::isEquivalent ( const BFSM::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).
std::string Formations::FormationsTask::toString ( ) const
virtual

String representation of the task.

Returns
A string containing task information.

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