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 | List of all members
Menge::Agents::ConstProfileSelector Class Reference

A profile selector that stores a single agent initializer and assigns this profile to all agents. More...

#include <ConstProfileSelector.h>

Inheritance diagram for Menge::Agents::ConstProfileSelector:
Menge::Agents::ProfileSelector Menge::Element

Public Member Functions

 ConstProfileSelector ()
 Constructor.
 
virtual AgentInitializergetProfile () const
 Select an agent profile based on internal mechanisms. More...
 
virtual bool cacheProfiles (HASH_MAP< std::string, AgentInitializer * > profiles)
 Caches the agent initializers defined in the specification. More...
 
void setName (const std::string &name)
 Sets the name of the profile. More...
 
- Public Member Functions inherited from Menge::Agents::ProfileSelector
 ProfileSelector ()
 Constructor.
 
- 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 _profileName
 The name of the profile to use.
 
AgentInitializer_init
 The initializer belonging to the named profile.
 

Additional Inherited Members

- Protected Member Functions inherited from Menge::Agents::ProfileSelector
virtual ~ProfileSelector ()
 Virtual destructor.
 

Detailed Description

A profile selector that stores a single agent initializer and assigns this profile to all agents.

Member Function Documentation

bool Menge::Agents::ConstProfileSelector::cacheProfiles ( HASH_MAP< std::string, AgentInitializer * >  profiles)
virtual

Caches the agent initializers defined in the specification.

Although the ProfileSelector can cache pointers to the profiles for internal convenience, it does not own the memory and should not delete them.

Parameters
profilesA mapping from profile name to initializer.
Returns
True if successful, false otherwise.

Implements Menge::Agents::ProfileSelector.

virtual AgentInitializer* Menge::Agents::ConstProfileSelector::getProfile ( ) const
inlinevirtual

Select an agent profile based on internal mechanisms.

Returns
A const pointer to an agent initializer.

Implements Menge::Agents::ProfileSelector.

void Menge::Agents::ConstProfileSelector::setName ( const std::string &  name)
inline

Sets the name of the profile.

Parameters
nameThe name of the selector's profile.

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