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

The simulator database class. More...

#include <SimulatorDB.h>

Public Member Functions

 SimulatorDB ()
 Constructor.
 
 ~SimulatorDB ()
 Destructor.
 
size_t modelCount () const
 Reports the number of registered pedestrian models. More...
 
::std::string paramList () const
 Gets a formatted list of valid command-line parameters for all registered simulators. More...
 
::std::string briefDescriptions () const
 Formats all brief descriptions into a single string. More...
 
::std::string longDescriptions () const
 Formats all long descriptions into a single string. More...
 
SimulatorDBEntrygetDBEntry (const std::string &modelName)
 Returns the database entry for the given command line parameter. More...
 
SimulatorDBEntryregisterEntry (SimulatorDBEntry *entry)
 Registers a database entry. More...
 

Detailed Description

The simulator database class.

The main executable program relies on the simulator database to know what models are available for simulation. Furthermore, it uses the database to instantiate the appropriate types as well.

Member Function Documentation

std::string Menge::SimulatorDB::briefDescriptions ( ) const

Formats all brief descriptions into a single string.

Returns
A formatted string consisting of all model's and their brief descriptions.
SimulatorDBEntry * Menge::SimulatorDB::getDBEntry ( const std::string &  modelName)

Returns the database entry for the given command line parameter.

It returns the database entry with a command line parameter value that is the same as the provided string. The test is case insensitive.

Parameters
modelNameThe command-line parameter for the desired pedestrian model.
Returns
A pointer to the summary entity. If the name does not match a registered model, NULL is returned
std::string Menge::SimulatorDB::longDescriptions ( ) const

Formats all long descriptions into a single string.

Returns
A formatted string consisting of all model's and their long descriptions.
size_t Menge::SimulatorDB::modelCount ( ) const
inline

Reports the number of registered pedestrian models.

Returns
The number of pedestrian models.
std::string Menge::SimulatorDB::paramList ( ) const

Gets a formatted list of valid command-line parameters for all registered simulators.

Returns
A formatted list of all registered simulators' command-line parameter names, e.g., model1, model2, ..., and modelN.
SimulatorDBEntry * Menge::SimulatorDB::registerEntry ( SimulatorDBEntry entry)

Registers a database entry.

The registration is only valid if the entry's commandLineName is unique (see SimulatorDBEntry::commandLineName). If the given entry duplicates a previous entry, the pointer is deleted.

Parameters
entryA pointer to the entry to register.
Returns
The same pointer (if valid, null if invalid).

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