Menge
Modular Pedestrian Simulation Framework for Research and Development
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Protected Member Functions | List of all members
Menge::SetPropertyManipulator Class Reference

Modifies a particular agent property based by explicitly setting the property value from a distribution. More...

#include <AgentPropertyManipulator.h>

Inheritance diagram for Menge::SetPropertyManipulator:
Menge::AgentPropertyManipulator Menge::Element

Protected Member Functions

virtual float newValue (float value, size_t agentID)
 Computes the new property value given the original property value. More...
 
- Protected Member Functions inherited from Menge::AgentPropertyManipulator
virtual ~AgentPropertyManipulator ()
 Virtual destructor.
 

Additional Inherited Members

- Public Member Functions inherited from Menge::AgentPropertyManipulator
 AgentPropertyManipulator ()
 Constructor.
 
void manipulate (Agents::BaseAgent *agent)
 Applies the manipulation to the given agent, storing the previous state for restoration. More...
 
void restore (Agents::BaseAgent *agent)
 Restores the agent's previous value. More...
 
void setGenerator (FloatGenerator *gen)
 Sets the generator for the manipulator. More...
 
void setProperty (BFSM::PropertyOperand prop)
 Sets the property operand. 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 inherited from Menge::AgentPropertyManipulator
FloatGenerator_operandGen
 The generator for determining the operand value.
 
BFSM::PropertyOperand _property
 The property to operate on.
 
std::map< size_t, float > _originalMap
 A mapping from agent id to the agent's property value before the action was applied.
 
SimpleLock _lock
 Lock for guaranteeing thread-safety.
 

Detailed Description

Modifies a particular agent property based by explicitly setting the property value from a distribution.

Member Function Documentation

float Menge::SetPropertyManipulator::newValue ( float  value,
size_t  agentID 
)
protectedvirtual

Computes the new property value given the original property value.

Parameters
valueThe original value of the property.
agentIDThe identifier for the agent.
Returns
The new value.

Implements Menge::AgentPropertyManipulator.


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