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

The shared goal selector is a stub goal selector used strictly internally for bookkeeping. It is used to implement shared goal selectors between states. It is not intended to be sub-classed.. More...

#include <GoalSelectorShared.h>

Inheritance diagram for Menge::BFSM::SharedGoalSelector:
Menge::BFSM::GoalSelector Menge::Element

Public Member Functions

 SharedGoalSelector ()
 Default constructor.
 
virtual GoalgetGoal (const Agents::BaseAgent *agent) const
 Interface function for acquiring per-agent goals. More...
 
- Public Member Functions inherited from Menge::BFSM::GoalSelector
 GoalSelector ()
 Default constructor.
 
GoalassignGoal (const Agents::BaseAgent *agent)
 Uses the goal selector to assign a goal to the given agent. More...
 
void freeGoal (const Agents::BaseAgent *agent, Goal *goal)
 Informs the goal selector that the agent is done with the goal. More...
 
virtual void setGoalSet (std::map< size_t, GoalSet * > &goalSets)
 Gives the instance the opportunity to set the goal set. More...
 
void setPersistence (bool state)
 Sets the persistence of the goal. More...
 
bool getPersistence () const
 Reports the persistence of the goal. 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

std::string _stateName
 The name of the state which will provide the actual goal selector instance.
 
int _lineNo
 The line number this was defined on (for use with logger messages.
 
- Protected Attributes inherited from Menge::BFSM::GoalSelector
bool _persistent
 Determines if the GoalSelector maintains persistent goals. More...
 
HASH_MAP< size_t, Goal * > _assignedGoals
 A mapping from agent id to assigned goals. This will only contain meaningful values in one of two cases: More...
 
ReadersWriterLock _lock
 The lock to maintain readers-writer access to the _assignedGoals.
 

Friends

class SharedGoalSelectorFactory
 
FSMbuildFSM (FSMDescrip &fsmDescrip, Agents::SimulatorInterface *sim, bool VERBOSE)
 Templated function which builds the behavior fsm from the behavior configuration given. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Menge::BFSM::GoalSelector
virtual ~GoalSelector ()
 Default virtual destructor.
 
virtual void lockResources ()
 Allows the goal selector to lock any resources it requires. More...
 
virtual void releaseResources ()
 Allows the goal selector to release previously locked resources. More...
 

Detailed Description

The shared goal selector is a stub goal selector used strictly internally for bookkeeping. It is used to implement shared goal selectors between states. It is not intended to be sub-classed..

Member Function Documentation

Goal * Menge::BFSM::SharedGoalSelector::getGoal ( const Agents::BaseAgent agent) const
virtual

Interface function for acquiring per-agent goals.

Parameters
agentThe agent for whom a goal is extracted.
Returns
A pointer to a goal.

Implements Menge::BFSM::GoalSelector.

Friends And Related Function Documentation

FSM* buildFSM ( FSMDescrip fsmDescrip,
Agents::SimulatorInterface sim,
bool  VERBOSE 
)
friend

Templated function which builds the behavior fsm from the behavior configuration given.

Creates an FSM instance from the config file.

Parameters
fsmDescripThe Behavior configuration.
simThe simulator which uses the BFSM.
VERBOSEThe optional argument which causes the construction process to report actions as it goes.
Returns
A pointer to the resultant FSM. If there is an error in construction, NULL is returned.

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