![]() |
Menge
Modular Pedestrian Simulation Framework for Research and Development
|
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... | |
SimulatorDBEntry * | getDBEntry (const std::string &modelName) |
Returns the database entry for the given command line parameter. More... | |
SimulatorDBEntry * | registerEntry (SimulatorDBEntry *entry) |
Registers a database entry. More... | |
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.
std::string Menge::SimulatorDB::briefDescriptions | ( | ) | const |
Formats all brief descriptions into a single string.
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.
modelName | The command-line parameter for the desired pedestrian model. |
std::string Menge::SimulatorDB::longDescriptions | ( | ) | const |
Formats all long descriptions into a single string.
|
inline |
Reports the number of registered pedestrian models.
std::string Menge::SimulatorDB::paramList | ( | ) | const |
Gets a formatted list of valid command-line parameters for all registered simulators.
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.
entry | A pointer to the entry to register. |