![]() |
Menge
Modular Pedestrian Simulation Framework for Research and Development
|
The abstract definition of an action. More...
#include <Action.h>
Public Member Functions | |
Action () | |
Constructor. | |
virtual void | onEnter (Agents::BaseAgent *agent)=0 |
Upon entering the state, this is called – it is the main work of the action. More... | |
void | onLeave (Agents::BaseAgent *agent) |
The work to do upon state exit. More... | |
![]() | |
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 | ~Action () |
Virtual destructor. | |
virtual void | leaveAction (Agents::BaseAgent *agent)=0 |
The actual work to do upon exiting the state. More... | |
Protected Attributes | |
bool | _undoOnExit |
Determines if the action undoes itself on exiting the state. | |
Friends | |
class | ActionFactory |
The abstract definition of an action.
An action is explicitly executed upon entering a state and has the option of undoing its effect upon exiting the state.
|
protectedpure virtual |
The actual work to do upon exiting the state.
This is a purely virtual function. Any Action sub-class must explicitly account for this function. It will only be called if the action is set to undo its work upon exit.
agent | The agent to act on. |
Implemented in Menge::BFSM::PropertyAction< Manipulator >, Menge::BFSM::ObstacleAction, and Menge::BFSM::TeleportAction.
|
pure virtual |
Upon entering the state, this is called – it is the main work of the action.
This is a purely virtual function. Any instantiable Action sub-class must explicitly account for this function.
agent | The agent to act on. |
Implemented in Menge::BFSM::PropertyAction< Manipulator >, Menge::BFSM::ObstacleAction, and Menge::BFSM::TeleportAction.
void Menge::BFSM::Action::onLeave | ( | Agents::BaseAgent * | agent | ) |
The work to do upon state exit.
agent | The agent to act on. |