Menge
Modular Pedestrian Simulation Framework for Research and Development
|
The full description of the behavioral finite state machine. More...
#include <FSMDescrip.h>
Public Member Functions | |
FSMDescrip () | |
Default constructor. | |
~FSMDescrip () | |
Destructor. | |
State * | addState (StateDescrip *sData) |
Instantiates a state based on the description. More... | |
bool | loadFromXML (const std::string &xmlName, bool verbose) |
Initializes the configuration from an xml file. More... | |
Protected Member Functions | |
void | addTransition (const std::string &name, Transition *trans) |
Adds the transition(s) associated with the given name. More... | |
Protected Attributes | |
std::list< StateDescrip * > | _states |
List of state descriptions. | |
std::map< std::string, std::list< Transition * > > | _transitions |
List of transitions. | |
std::map< std::string, State * > | _stateNameMap |
Map of state names to states. | |
std::list< Task * > | _tasks |
A map from agent class id to a behavior description instance. | |
std::map< size_t, GoalSet * > | _goalSets |
A mapping of goal sets to goals. The goal sets are represented by their id. The goals for each goal set are stored in a map, mapping the goal's local id to a descriptor for that goal. This is to facilitate set additions. | |
std::vector< VelModifier * > | _velModifiers |
A list of velocity modifiers to be applied to all states in the simulator. | |
std::string | _behaviorFldr |
The folder in which the behavior specification file appears. | |
Friends | |
FSM * | buildFSM (FSMDescrip &fsmDescrip, Agents::SimulatorInterface *sim, bool VERBOSE) |
Creates an FSM instance from the config file. More... | |
Logger & | operator<< (Logger &out, const FSMDescrip &fsmDescrip) |
Friend operator for printing the behavior configuration to an output stream. More... | |
The full description of the behavioral finite state machine.
State * Menge::BFSM::FSMDescrip::addState | ( | StateDescrip * | sData | ) |
Instantiates a state based on the description.
This is a behavior operation, because the behavior is responsible for:
sData | The description of the state to create. |
|
protected |
Adds the transition(s) associated with the given name.
name | The name of the state from which the transition originates. Alternatively, a comma-separated list. |
trans | The transition to add. The FSMDescrip takes ownership of the transition. |
bool Menge::BFSM::FSMDescrip::loadFromXML | ( | const std::string & | xmlName, |
bool | verbose | ||
) |
Initializes the configuration from an xml file.
xmlName | The path to the xml file containing the behavior specification. |
verbose | Dictates whether the parsing is verbose. |
|
friend |
Creates an FSM instance from the config file.
fsmDescrip | The behavior configuration description. |
sim | An instance of the simulator. |
VERBOSE | Dictates whether the construction process is verbose (true) or not (false). |
fsmDescrip | The Behavior configuration. |
sim | The simulator which uses the BFSM. |
VERBOSE | The optional argument which causes the construction process to report actions as it goes. |
|
friend |
Friend operator for printing the behavior configuration to an output stream.
out | The logger. |
fsmDescrip | A behavior configuration to write to the stream. |