Eclipse SUMO - Simulation of Urban MObility
|
A storage for options typed value containers) More...
#include <OptionsCont.h>
Public Member Functions | |
std::vector< std::pair< std::string, Option * > >::const_iterator | begin () const |
get begin adresses iterator | |
void | clear () |
Removes all information from the container. | |
std::vector< std::pair< std::string, Option * > >::const_iterator | end () const |
get begin adresses iterator | |
const std::string & | getFullName () const |
get options full name | |
const std::vector< std::string > & | getSubTopics () const |
return the list of subtopics | |
std::vector< std::string > | getSubTopicsEntries (const std::string &subtopic) const |
return the list of entries for the given subtopic | |
std::string | getTypeName (const std::string name) |
return the type name for the given option | |
bool | isEmpty () const |
check if options container is empty | |
OptionsCont () | |
Constructor. | |
bool | processMetaOptions (bool missingOptions) |
Checks for help and configuration output, returns whether we should exit. | |
void | resetDefault () |
Resets all options to default. | |
void | resetDefault (const std::string &name) |
Reset specific option to default. | |
void | resetWritable () |
Resets all options to be writeable. | |
~OptionsCont () | |
Destructor. | |
Methods setting and getting information about the appplication and currently set options | |
void | setApplicationName (const std::string &appName, const std::string &fullName) |
Sets the application name. | |
void | setApplicationDescription (const std::string &appDesc) |
Sets the application description. | |
void | addCallExample (const std::string &example, const std::string &desc) |
Add a call example. | |
void | setAdditionalHelpMessage (const std::string &add) |
Sets an additional message to be printed at the begin of the help screen. | |
void | addCopyrightNotice (const std::string ©rightLine) |
Adds a copyright notice to the help output. | |
void | clearCopyrightNotices () |
Removes all copyright information. | |
void | addOptionSubTopic (const std::string &topic) |
Adds an option subtopic. | |
void | printHelp (std::ostream &os) |
Prints the help. | |
void | printHelpOnTopic (const std::string &topic, int tooLarge, int maxSize, std::ostream &os) |
Prints help on the given topic. | |
void | writeConfiguration (std::ostream &os, const bool filled, const bool complete, const bool addComments, const std::string &relativeTo="", const bool forceRelative=false, const bool inComment=false) const |
Writes the configuration. | |
void | writeSchema (std::ostream &os) |
Writes the xml schema for the configuration. | |
void | writeXMLHeader (std::ostream &os, const bool includeConfig=true) const |
Writes a standard XML header, including the configuration. | |
Methods for registering options | |
void | doRegister (const std::string &name, Option *o) |
Adds an option under the given name. | |
void | doRegister (const std::string &name, char abbr, Option *o) |
Adds an option under the given name and the given abbreviation. | |
void | addSynonyme (const std::string &name1, const std::string &name2, bool isDeprecated=false) |
Adds a synonyme for an options name (any order) | |
void | addXMLDefault (const std::string &name, const std::string &xmlRoot="") |
Adds an XML root element to handle by default. The special root "" denotes the default handler. | |
void | addDescription (const std::string &name, const std::string &subtopic, const std::string &description) |
Adds a description for an option. | |
void | setFurtherAttributes (const std::string &name, const std::string &subtopic, bool required, bool positional, const std::string &listSep) |
mark option as required | |
void | addCategory (const std::string &name, const std::string &subtopic, const std::string &category) |
Adds a category for an option. | |
Methods for retrieving information about options | |
bool | exists (const std::string &name) const |
Returns the information whether the named option is known. | |
bool | isSet (const std::string &name, bool failOnNonExistant=true) const |
Returns the information whether the named option is set. | |
bool | isDefault (const std::string &name) const |
Returns the information whether the named option has still the default value. | |
bool | isBool (const std::string &name) const |
Returns the information whether the option is a boolean option. | |
bool | isUsableFileList (const std::string &name) const |
Checks whether the named option is usable as a file list (with at least a single file) | |
bool | checkDependingSuboptions (const std::string &name, const std::string &prefix) const |
Checks whether an option is set, which has options with a prefix depending on it. | |
void | relocateFiles (const std::string &configuration) const |
Modifies file name options according to the configuration path. | |
std::vector< std::string > | getSynonymes (const std::string &name) const |
Returns the synonymes of an option name. | |
const std::string & | getDescription (const std::string &name) const |
Returns the option description. | |
const std::string & | getSubTopic (const std::string &name) const |
Returns the option category. | |
bool | isWriteable (const std::string &name) |
Returns the information whether the named option may be set. | |
Methods for retrieving values from options | |
std::string | getValueString (const std::string &name) const |
Returns the string-value of the named option (all options) | |
std::string | getString (const std::string &name) const |
Returns the string-value of the named option (only for Option_String) | |
double | getFloat (const std::string &name) const |
Returns the double-value of the named option (only for Option_Float) | |
int | getInt (const std::string &name) const |
Returns the int-value of the named option (only for Option_Integer) | |
bool | getBool (const std::string &name) const |
Returns the boolean-value of the named option (only for Option_Bool) | |
const IntVector & | getIntVector (const std::string &name) const |
Returns the list of integer-value of the named option (only for Option_IntVector) | |
const StringVector & | getStringVector (const std::string &name) const |
Returns the list of string-value of the named option (only for Option_StringVector) | |
bool | isInStringVector (const std::string &optionName, const std::string &itemName) const |
Returns the named option is a list of string values containing the specified item. | |
Methods for setting values into options | |
bool | set (const std::string &name, const std::string &value, const bool append=false) |
Sets the given value for the named option. | |
bool | setDefault (const std::string &name, const std::string &value) |
Sets the given value for the named option as new default value. | |
bool | setByRootElement (const std::string &name, const std::string &value) |
Sets the given value for the option which can handle the given XML root. | |
Static Public Member Functions | |
static OptionsCont & | getOptions () |
Retrieves the options. | |
Static Public Attributes | |
static OptionsCont | EMPTY_OPTIONS |
empty option container | |
Private Member Functions | |
std::string | convertChar (char abbr) const |
Converts an abbreviation into a name. | |
Option * | getSecure (const std::string &name) const |
Returns the named option. | |
OptionsCont & | operator= (const OptionsCont &s)=delete |
invalid assignment operator | |
OptionsCont (const OptionsCont &s)=delete | |
invalid copy constructor | |
void | reportDoubleSetting (const std::string &arg) const |
Reports an error that the option has already been set. | |
void | splitLines (std::ostream &os, std::string what, int offset, int nextOffset) |
Writes the given string 'formatted'. | |
Private Attributes | |
std::string | myAdditionalMessage |
std::vector< std::pair< std::string, Option * > > | myAddresses |
option-adresses | |
std::string | myAppDescription |
std::string | myAppName |
some information on the application | |
std::vector< std::pair< std::string, std::string > > | myCallExamples |
list of call examples | |
std::vector< std::string > | myCopyrightNotices |
std::map< std::string, bool > | myDeprecatedSynonymes |
A map from deprecated options to a bool indicating whether we warned about deprecation. | |
std::string | myFullName |
std::map< std::string, std::vector< std::string > > | mySubTopicEntries |
A map from subtopic to option. | |
std::vector< std::string > | mySubTopics |
lists of option subtopics and copyright notices | |
std::map< std::string, Option * > | myValues |
option maps sorted by name (for adresses AND their synonyms) | |
std::map< std::string, std::string > | myXMLDefaults |
A map from XML root element to option. | |
Static Private Attributes | |
static OptionsCont | myOptions |
The static options container used. | |
Friends | |
std::ostream & | operator<< (std::ostream &os, const OptionsCont &oc) |
Output operator. | |
A storage for options typed value containers)
This container stores options (typed value containers) by their names. In the case of command line tools, this container is the main interface between a user's definitions about what to do (command line options, configuration files) and the application.
At the begin, the application should initialise the container. Because the OptionsCont is also responsible for printing the help screen, one should name and describe the application, first. This means that the first usage of this container should look similar to this:
Then, you may also add some example calls using addCallExample.
In the next step, option subtopics are registered. This is needed for the help screen and for writing the templates/saving configurations. A subtopic is added using addOptionSubTopic(<SUBTOPIC_NAME>).
After this, you may add options to the container. This is done using doRegister. This method requires a long name for the option and the value container. The value container must be an instance of one of the classes derived from "Option". Do not use Option itself! This is a base class which is meant to supply a default behaviour, but this default behaviour throws exceptions only!
Once stored inside this container, options will not be visible to the world and are deleted by the container. Only values and stati of the options may be returned. While accessing the options, the programmer must assure that he asks for the right value (only Option_Bool is able to return a boolean value, other option types will throw exceptions). Further, options added to the container must not be deleted outside this container (the container becomes the owner).
For being printed in the help screen, a description together with the subtopic the option belongs to must be given to OptionsCont. This is done using addDescription(<OPTION_NAME>, <SUBTOPIC>, <DESCRIPTION>).
Definition at line 89 of file OptionsCont.h.
OptionsCont::OptionsCont | ( | ) |
OptionsCont::~OptionsCont | ( | ) |
|
privatedelete |
invalid copy constructor
void OptionsCont::addCallExample | ( | const std::string & | example, |
const std::string & | desc | ||
) |
Add a call example.
[in] | example | A call example (without the app name) |
[in] | desc | A verbose description |
Definition at line 554 of file OptionsCont.cpp.
References myCallExamples.
Referenced by AGFrame::fillOptions(), RODFFrame::fillOptions(), RODUAFrame::fillOptions(), ROJTRFrame::fillOptions(), ROMAFrame::fillOptions(), MSFrame::fillOptions(), fillOptions(), and GNELoadThread::fillOptions().
void OptionsCont::addCategory | ( | const std::string & | name, |
const std::string & | subtopic, | ||
const std::string & | category | ||
) |
Adds a category for an option.
Tries to retrieve the named option and to set the given category. Adds the name to the list of option names to be located in the named subtopic.
Throws an InvalidArgument if the option is not known or already has a category set.
[in] | name | The option's name |
[in] | subtopic | The subtopic to locate the category within |
[in] | category | The category |
InvalidArgument | If none of the synonymes or both synonymes with different options were registered before |
void OptionsCont::addCopyrightNotice | ( | const std::string & | copyrightLine | ) |
Adds a copyright notice to the help output.
[in] | copyrightLine | The line to put out as a copyright notice |
Definition at line 566 of file OptionsCont.cpp.
References myCopyrightNotices.
Referenced by main().
void OptionsCont::addDescription | ( | const std::string & | name, |
const std::string & | subtopic, | ||
const std::string & | description | ||
) |
Adds a description for an option.
Tries to retrieve the named option and to set the given description. Adds the name to the list of option names to be located in the named subtopic.
Throws an InvalidArgument if the option is not known or already has a description set.
[in] | name | The option's name |
[in] | subtopic | The subtopic to locate the description within |
[in] | description | The description |
InvalidArgument | If none of the synonymes or both synonymes with different options were registered before |
Definition at line 505 of file OptionsCont.cpp.
References getSecure(), mySubTopicEntries, mySubTopics, Option::setDescription(), and Option::setSubtopic().
Referenced by ROMAFrame::addAssignmentOptions(), SystemFrame::addConfigurationOptions(), RODUAFrame::addDUAOptions(), RODUAFrame::addImportOptions(), ROMAFrame::addImportOptions(), TemplateHandler::addOption(), GeoConvHelper::addProjectionOptions(), SystemFrame::addReportOptions(), GNENetDiffTool::fillNetDiffOptions(), AGFrame::fillOptions(), RODFFrame::fillOptions(), ROJTRFrame::fillOptions(), MSFrame::fillOptions(), fillOptions(), NGFrame::fillOptions(), GNELoadThread::fillOptions(), NIFrame::fillOptions(), NBFrame::fillOptions(), NWFrame::fillOptions(), ROFrame::fillOptions(), MSDevice::insertDefaultAssignmentOptions(), MSDevice_Battery::insertOptions(), MSDevice_Bluelight::insertOptions(), MSVehicleDevice_BTreceiver::insertOptions(), MSDevice_DriverState::insertOptions(), MSDevice_Emissions::insertOptions(), MSDevice_Example::insertOptions(), MSDevice_FCD::insertOptions(), MSDevice_FCDReplay::insertOptions(), MSDevice_Friction::insertOptions(), MSDevice_GLOSA::insertOptions(), MSDevice_Routing::insertOptions(), MSDevice_SSM::insertOptions(), MSDevice_StationFinder::insertOptions(), MSDevice_Taxi::insertOptions(), MSDevice_ToC::insertOptions(), MSTransportableDevice_FCD::insertOptions(), MSTransportableDevice_Routing::insertOptions(), RandHelper::insertRandOptions(), and main().
void OptionsCont::addOptionSubTopic | ( | const std::string & | topic | ) |
Adds an option subtopic.
Sub-topics are used to join several options into one thematic field. They are used on writing the help screen and the configuration. They have no further meaning besides making the outputs better readable.
[in] | topic | The options sub topic |
Definition at line 578 of file OptionsCont.cpp.
References mySubTopicEntries, and mySubTopics.
Referenced by SystemFrame::addConfigurationOptions(), GeoConvHelper::addProjectionOptions(), SystemFrame::addReportOptions(), GNENetDiffTool::fillNetDiffOptions(), AGFrame::fillOptions(), RODFFrame::fillOptions(), RODUAFrame::fillOptions(), ROJTRFrame::fillOptions(), ROMAFrame::fillOptions(), MSFrame::fillOptions(), fillOptions(), GNELoadThread::fillOptions(), MSDevice_Bluelight::insertOptions(), MSDevice_DriverState::insertOptions(), MSDevice_ElecHybrid::insertOptions(), MSDevice_Example::insertOptions(), MSDevice_FCD::insertOptions(), MSDevice_FCDReplay::insertOptions(), MSDevice_Friction::insertOptions(), MSDevice_GLOSA::insertOptions(), MSDevice_SSM::insertOptions(), MSDevice_Taxi::insertOptions(), MSDevice_ToC::insertOptions(), MSDevice_Tripinfo::insertOptions(), MSDevice_Vehroutes::insertOptions(), RandHelper::insertRandOptions(), main(), and TemplateHandler::startElement().
void OptionsCont::addSynonyme | ( | const std::string & | name1, |
const std::string & | name2, | ||
bool | isDeprecated = false |
||
) |
Adds a synonyme for an options name (any order)
Tries to find one of the synonymes. If both are known and the option differs for both, an InvalidArgument exception is thrown. If none is known, also.
If one of the synonymes is known and the other not, the option from the known one is made accessible by the other.
In the case both synonymes are known and have the same option assigned, nothing is done.
[in] | name1 | The first synonyme |
[in] | name2 | The second synonyme |
[in] | isDeprecated | whether the synonyme is considered deprecated |
InvalidArgument | If none of the synonymes or both synonymes with different options were registered before |
Definition at line 108 of file OptionsCont.cpp.
References doRegister(), myDeprecatedSynonymes, and myValues.
Referenced by ROMAFrame::addAssignmentOptions(), SystemFrame::addConfigurationOptions(), RODUAFrame::addDUAOptions(), RODUAFrame::addImportOptions(), ROMAFrame::addImportOptions(), TemplateHandler::addOption(), GeoConvHelper::addProjectionOptions(), SystemFrame::addReportOptions(), AGFrame::fillOptions(), RODFFrame::fillOptions(), ROJTRFrame::fillOptions(), MSFrame::fillOptions(), fillOptions(), NGFrame::fillOptions(), GNELoadThread::fillOptions(), NIFrame::fillOptions(), NBFrame::fillOptions(), NWFrame::fillOptions(), ROFrame::fillOptions(), MSDevice::insertDefaultAssignmentOptions(), MSDevice_Routing::insertOptions(), MSTransportableDevice_Routing::insertOptions(), RandHelper::insertRandOptions(), and main().
void OptionsCont::addXMLDefault | ( | const std::string & | name, |
const std::string & | xmlRoot = "" |
||
) |
Adds an XML root element to handle by default. The special root "" denotes the default handler.
[in] | name | The option name |
[in] | xmlRoot | The name of the xml root element to handle |
Definition at line 136 of file OptionsCont.cpp.
References myXMLDefaults.
Referenced by SystemFrame::addConfigurationOptions(), MSFrame::fillOptions(), GNELoadThread::fillOptions(), and NIFrame::fillOptions().
std::vector< std::pair< std::string, Option * > >::const_iterator OptionsCont::begin | ( | ) | const |
bool OptionsCont::checkDependingSuboptions | ( | const std::string & | name, |
const std::string & | prefix | ||
) | const |
Checks whether an option is set, which has options with a prefix depending on it.
The method returns true, if the named option is set or no option dependoing on it is set. Throws an InvalidArgument exception if the option is not known.
[in] | name | The name of the option to check |
[in] | prefix | The prefix of depending options |
InvalidArgument | If the option does not exist |
Definition at line 406 of file OptionsCont.cpp.
References getSecure(), getSynonymes(), Option::isSet(), myValues, TL, and WRITE_ERRORF.
Referenced by NIFrame::checkOptions().
void OptionsCont::clear | ( | ) |
Removes all information from the container.
Definition at line 492 of file OptionsCont.cpp.
References myAddresses, mySubTopicEntries, mySubTopics, and myValues.
Referenced by SystemFrame::close(), GNELoadThread::fillOptions(), NLBuilder::init(), GUILoadThread::run(), and ~OptionsCont().
void OptionsCont::clearCopyrightNotices | ( | ) |
Removes all copyright information.
Definition at line 572 of file OptionsCont.cpp.
References myCopyrightNotices.
|
private |
Converts an abbreviation into a name.
Build and returns the string which consists of the given character only.
[in] | abbr | The abbreviation to convert into a string |
Definition at line 446 of file OptionsCont.cpp.
Referenced by doRegister().
void OptionsCont::doRegister | ( | const std::string & | name, |
char | abbr, | ||
Option * | o | ||
) |
Adds an option under the given name and the given abbreviation.
Adds the option under both names using void doRegister(const std::string &name, Option *v);
[in] | name | The (long) name of the option |
[in] | abbr | The (short) name of the option |
[in] | v | The option (typed value storage) |
InvalidArgument | If one of the names is already used |
Definition at line 101 of file OptionsCont.cpp.
References convertChar(), and doRegister().
void OptionsCont::doRegister | ( | const std::string & | name, |
Option * | o | ||
) |
Adds an option under the given name.
[in] | name | The (long) name of the option |
[in] | o | The option (typed value storage) |
InvalidArgument | If the name is already used |
Definition at line 76 of file OptionsCont.cpp.
References myAddresses, and myValues.
Referenced by ROMAFrame::addAssignmentOptions(), SystemFrame::addConfigurationOptions(), RODUAFrame::addDUAOptions(), RODUAFrame::addImportOptions(), ROMAFrame::addImportOptions(), TemplateHandler::addOption(), GeoConvHelper::addProjectionOptions(), SystemFrame::addReportOptions(), addSynonyme(), doRegister(), GNENetDiffTool::fillNetDiffOptions(), AGFrame::fillOptions(), RODFFrame::fillOptions(), ROJTRFrame::fillOptions(), MSFrame::fillOptions(), fillOptions(), NGFrame::fillOptions(), GNELoadThread::fillOptions(), NIFrame::fillOptions(), NBFrame::fillOptions(), NWFrame::fillOptions(), ROFrame::fillOptions(), MSDevice::insertDefaultAssignmentOptions(), MSDevice_Battery::insertOptions(), MSDevice_Bluelight::insertOptions(), MSVehicleDevice_BTreceiver::insertOptions(), MSDevice_DriverState::insertOptions(), MSDevice_Emissions::insertOptions(), MSDevice_Example::insertOptions(), MSDevice_FCD::insertOptions(), MSDevice_FCDReplay::insertOptions(), MSDevice_Friction::insertOptions(), MSDevice_GLOSA::insertOptions(), MSDevice_Routing::insertOptions(), MSDevice_SSM::insertOptions(), MSDevice_StationFinder::insertOptions(), MSDevice_Taxi::insertOptions(), MSDevice_ToC::insertOptions(), MSTransportableDevice_FCD::insertOptions(), MSTransportableDevice_Routing::insertOptions(), RandHelper::insertRandOptions(), and main().
std::vector< std::pair< std::string, Option * > >::const_iterator OptionsCont::end | ( | ) | const |
bool OptionsCont::exists | ( | const std::string & | name | ) | const |
Returns the information whether the named option is known.
Definition at line 142 of file OptionsCont.cpp.
References myValues.
Referenced by NBParkingCont::addEdges2Keep(), TemplateHandler::addOption(), SystemFrame::addReportOptions(), NBEdgeCont::applyOptions(), NWFrame::checkOptions(), SystemFrame::checkOptions(), RORouteHandler::closeRoute(), NBNetBuilder::compute(), NBNodeShapeComputer::computeNodeShapeDefault(), NIImporter_OpenDrive::computeShapes(), SUMOVehicleParameter::defaultOptionOverrides(), MSDevice::equippedByDefaultAssignmentOptions(), PollutantsInterface::Helper::getClassByName(), LIBSUMO_NAMESPACE::Simulation::getOption(), SUMOTrafficObject::getStringParam(), NBRailwaySignalGuesser::guessRailSignals(), NBNodeCont::guessTLs(), GeoConvHelper::init(), NBEdgeCont::insert(), NBNodeShapeComputer::joinSameDirectionEdges(), OptionsIO::loadConfiguration(), ROLoader::loadNet(), NILoader::loadXML(), RONet::openOutput(), RORouteDef::preComputeCurrentRoute(), NBEdgeCont::recheckPostProcessConnections(), NBNodeCont::removeUnwishedNodes(), RouteCostCalculator< R, E, V >::RouteCostCalculator(), NBNetBuilder::runningNetedit(), ROPerson::saveAsXML(), ROVehicle::saveAsXML(), SUMOVTypeParameter::SUMOVTypeParameter(), SUMOVehicleParameter::write(), NWWriter_XML::writeEdgesAndConnections(), RONet::writeIntermodal(), NWWriter_XML::writeNetwork(), NWWriter_SUMO::writeNetwork(), and NWWriter_XML::writeNodes().
bool OptionsCont::getBool | ( | const std::string & | name | ) | const |
Returns the boolean-value of the named option (only for Option_Bool)
This method returns the boolean-value of an existing boolean-option. If the named option does not exist or is not a boolean-option, an InvalidArgument is thrown.
[in] | name | The name of the option to return the boolean-value of |
InvalidArgument | If the option does not exist or is not a boolean-option |
Definition at line 228 of file OptionsCont.cpp.
References Option::getBool(), and getSecure().
Referenced by MSRoutingEngine::_initEdgeWeights(), NIImporter_SUMO::_loadNetwork(), NLHandler::addDistrict(), NIXMLEdgesHandler::addEdge(), NIXMLEdgesHandler::addSplit(), NBEdge::append(), NIImporter_OpenStreetMap::applyLaneUse(), NBEdgeCont::applyOptions(), NLBuilder::build(), GNEContour::buildContourEdge(), MSDriveWay::buildDriveWay(), NBEdge::buildInnerEdges(), NGEdge::buildNBEdge(), buildNetwork(), MELoop::buildSegmentsFor(), MSDevice_Tripinfo::buildVehicleDevices(), MSVehicleType::check(), RODUAFrame::checkOptions(), MSFrame::checkOptions(), NGFrame::checkOptions(), checkOptions(), NBFrame::checkOptions(), NIFrame::checkOptions(), NWFrame::checkOptions(), SystemFrame::checkOptions(), MSTransportableControl::checkWaiting(), RORouteHandler::closeFlow(), RORouteHandler::closeRoute(), NBTrafficLightDefinition::collectEdges(), NBNetBuilder::compute(), computeAllPairs(), GNENet::computeAndUpdate(), NBOwnTLDef::computeLogicAndConts(), NBTrafficLightLogicCont::computeLogics(), NBNodeCont::computeLogics2(), NBNodeShapeComputer::computeNodeShapeDefault(), NBNodeTypeComputer::computeNodeTypes(), NBRampsComputer::computeRamps(), computeRoutes(), computeRoutes(), NIImporter_OpenDrive::computeShapes(), RODFDetector::computeSplitProbabilities(), NBOwnTLDef::correctConflicting(), GNENet::createRoundabout(), SUMOVehicleParameter::defaultOptionOverrides(), GNEViewNet::doPaintGL(), GNEStoppingPlace::drawSign(), GNEViewNet::drawTestsCircle(), MSDevice::equippedByDefaultAssignmentOptions(), MSTransportableControl::erase(), MSDevice_BTreceiver::BTreceiverUpdate::execute(), MSDevice_Tripinfo::generateOutputForUnfinished(), GNEConnection::getAttribute(), HelpersPHEMlight::getClassByName(), HelpersPHEMlight5::getClassByName(), PollutantsInterface::Helper::getClassByName(), GNENetDiffTool::getCommand(), NBRequest::getFoesString(), MSNet::getMesoType(), NWWriter_SUMO::getOppositeInternalID(), NBRequest::getResponseString(), NBRailwaySignalGuesser::guessRailSignals(), NBNodeCont::guessTLs(), MSRailSignalControl::haveDeadlock(), MSDevice_Vehroutes::init(), GeoConvHelper::init(), MSLane::initCollisionOptions(), MSAbstractLaneChangeModel::initGlobalOptions(), MSPModel_JuPedSim::initialize(), NBLoadedSUMOTLDef::initNeedsContRelation(), initNet(), MsgHandler::initOutputOptions(), RandHelper::initRandGlobal(), MSLane::initRNGs(), MSRoutingEngine::initRouter(), MSRoutingEngine::initWeightUpdate(), NBEdgeCont::insert(), NIImporter_OpenStreetMap::insertEdge(), NBNodeCont::joinNodeCluster(), NBEdgeCont::joinTramEdges(), NIImporter_ArcView::load(), NIImporter_OpenStreetMap::load(), PCLoaderArcView::load(), PCLoaderVisum::load(), NILoader::load(), OptionsIO::loadConfiguration(), PCLoaderOSM::loadIfSet(), loadJTRDefinitions(), ROLoader::loadNet(), NIImporter_ArcView::loadNetwork(), NIImporter_DlrNavteq::loadNetwork(), NIImporter_MATSim::loadNetwork(), NIImporter_OpenDrive::loadNetwork(), NIImporter_VISUM::loadNetwork(), PCLoaderDlrNavteq::loadPOIFile(), PCLoaderDlrNavteq::loadPolyFile(), main(), main(), MSDevice_Battery::MSDevice_Battery(), MSNet::MSNet(), MSPModel_Striping::MSPModel_Striping(), MSRailSignal::MSRailSignal(), NBLoadedTLDef::myCompute(), PCLoaderXML::myStartElement(), PCTypeDefHandler::myStartElement(), RONet::openOutput(), ROLoader::openRoutes(), ROLoader::openTypedRoutes(), MSRouteHandler::parseFromViaTo(), RORouteHandler::parseFromViaTo(), PCTypeMap::PCTypeMap(), GNENetDiffTool::postProcessing(), RORouteDef::preComputeCurrentRoute(), MSStageWalking::proceed(), processMetaOptions(), readDetectors(), NBEdgeCont::recheckLanes(), NBEdgeCont::recheckPostProcessConnections(), NBEdgeCont::remapIDs(), NBNodeCont::remapIDs(), NBNodeCont::removeUnwishedNodes(), RORouteDef::repairCurrentRoute(), NBRailwayTopologyAnalyzer::repairTopology(), NIImporter_DlrNavteq::EdgesHandler::report(), MSDevice_SSM::requestsTrajectories(), RODFNet::RODFNet(), RouteCostCalculator< R, E, V >::RouteCostCalculator(), MSStageDriving::routeOutput(), MSStageTranship::routeOutput(), MSStageWalking::routeOutput(), GUILoadThread::run(), RONet::saveAndRemoveRoutesUntil(), ROPerson::PersonTrip::saveAsXML(), ROPerson::Ride::saveAsXML(), ROPerson::Walk::saveAsXML(), ROPerson::saveAsXML(), ROVehicle::saveAsXML(), MSStateHandler::saveState(), GNEEdge::setGeometry(), MSFrame::setMSGlobals(), GNEStoppingPlace::setStoppingPlaceGeometry(), startComputation(), NGNet::toNB(), GNEBusStop::updateGeometry(), GNEChargingStation::updateGeometry(), GNEContainerStop::updateGeometry(), GNEParkingArea::updateGeometry(), MSDevice_SSM::useGeoCoords(), AGCity::workAllocation(), MSChargingStationExport::write(), MSFCDExport::write(), MSEmissionExport::write(), ODMatrix::write(), writeConfiguration(), NWWriter_SUMO::writeConnection(), NWWriter_XML::writeEdgesAndConnections(), RODFDetector::writeEmitterDefinition(), NWWriter_SUMO::writeInternalConnections(), NWWriter_SUMO::writeJunction(), MSDevice_SSM::writeLanesPositions(), NWWriter_DlrNavteq::writeLinksUnsplitted(), NWWriter_OpenDrive::writeNetwork(), NWWriter_SUMO::writeNetwork(), NWWriter_XML::writeNodes(), NWWriter_DlrNavteq::writeNodesUnsplitted(), MSNet::writeOutput(), MSDevice_Vehroutes::writeOutput(), MSDevice_SSM::writePositions(), NIImporter_OpenDrive::writeRoadObjects(), MSNet::writeStatistics(), and writeXMLHeader().
const std::string & OptionsCont::getDescription | ( | const std::string & | name | ) | const |
Returns the option description.
[in] | name | The name of the option to return the description of |
InvalidArgument | If the named option does not exist |
Definition at line 304 of file OptionsCont.cpp.
References Option::getDescription(), and getSecure().
Referenced by GNEOptionsDialog::GNEOptionsDialog().
double OptionsCont::getFloat | ( | const std::string & | name | ) | const |
Returns the double-value of the named option (only for Option_Float)
This method returns the double-value of an existing double-option. If the named option does not exist or is not a double-option, an InvalidArgument is thrown.
[in] | name | The name of the option to return the double-value of |
InvalidArgument | If the option does not exist or is not a double-option |
Definition at line 214 of file OptionsCont.cpp.
References Option::getFloat(), and getSecure().
Referenced by MSRoutingEngine::_initEdgeWeights(), NIImporter_SUMO::_loadNetwork(), NBRailwayTopologyAnalyzer::addBidiEdgesForStops(), NIImporter_SUMO::addConnection(), MSRouteHandler::addPersonTrip(), RORouteHandler::addPersonTrip(), NBEdgeCont::applyOptions(), NBNetBuilder::applyOptions(), NBNode::buildCrossings(), MSTransportableDevice_BTreceiver::buildDevices(), NBEdge::buildInnerEdges(), NIVissimEdge::buildNBEdge(), NGEdge::buildNBEdge(), buildNetwork(), MELoop::buildSegmentsFor(), MSVehicleDevice_BTreceiver::buildVehicleDevices(), MSDevice_Example::buildVehicleDevices(), MSDevice_Routing::buildVehicleDevices(), NBNode::buildWalkingAreas(), MSVehicleType::check(), NBNode::checkCrossing(), MSFrame::checkOptions(), MSDevice_Routing::checkOptions(), NBFrame::checkOptions(), SystemFrame::checkOptions(), NBTrafficLightDefinition::compute(), NBNetBuilder::compute(), NBOwnTLDef::computeLogicAndConts(), NBNodeShapeComputer::computeNodeShapeDefault(), NBNodeTypeComputer::computeNodeTypes(), NBRampsComputer::computeRamps(), computeRoutes(), computeRoutes(), RODFNet::computeRoutesFor(), NIImporter_OpenDrive::computeShapes(), GNENet::createRoundabout(), NIImporter_OpenStreetMap::EdgesHandler::EdgesHandler(), MSDevice::equippedByDefaultAssignmentOptions(), METriggeredCalibrator::execute(), NBEdge::expandableBy(), LIBSUMO_NAMESPACE::Simulation::findIntermodalRoute(), NBPTLineCont::findWay(), RouteCostCalculator< R, E, V >::getCalculator(), HelpersPHEMlight5::getClassByName(), NBNodeShapeComputer::getDefaultRadius(), MSDevice_SSM::getDetectionRange(), MSDevice_SSM::getExtraTime(), MSDevice_SSM::getMDRAC_PRT(), MSNet::getMesoType(), GNEJunction::getPopUpMenu(), NIVissimDistrictConnection::getRealSpeed(), NBNodeCont::guessFringe(), NBRailwaySignalGuesser::guessRailSignals(), NBEdgeCont::guessRoundabouts(), NBNodeCont::guessTLs(), GUIApplicationWindow::handleEvent_SimulationLoaded(), NBNode::indirectLeftShape(), GeoConvHelper::init(), MSLane::initCollisionOptions(), MSPModel_JuPedSim::initialize(), MSRoutingEngine::initRouter(), MSRoutingEngine::initWeightUpdate(), GNEOptionsDialogElements::InputFloat::InputFloat(), NIImporter_OpenStreetMap::insertEdge(), NIImporter_OpenStreetMap::interpretTransportType(), NIImporter_ArcView::load(), NIImporter_OpenStreetMap::load(), NIImporter_Vissim::load(), PCLoaderArcView::load(), PCLoaderVisum::load(), PCLoaderOSM::loadIfSet(), ROLoader::loadNet(), NIImporter_MATSim::loadNetwork(), NIImporter_OpenDrive::loadNetwork(), NIImporter_VISUM::loadNetwork(), PCLoaderDlrNavteq::loadPOIFile(), PCLoaderDlrNavteq::loadPolyFile(), main(), NWWriter_OpenDrive::mapmatchRoadObjects(), MSPModel_Striping::MSPModel_Striping(), MSVehicleControl::MSVehicleControl(), NIImporter_OpenDrive::myStartElement(), PCLoaderXML::myStartElement(), PCNetProjectionLoader::myStartElement(), PCTypeDefHandler::myStartElement(), NBRequest::oppositeLeftTurnConflict(), NIImporter_VISUM::parse_stopPoints(), NIXMLConnectionsHandler::parseLaneBound(), PCTypeMap::PCTypeMap(), NBNodeCont::recheckTLSThreshold(), NIImporter_OpenStreetMap::reconstructLayerElevation(), GNENet::restrictLane(), RouteCostCalculator< R, E, V >::RouteCostCalculator(), MSStageTrip::routeOutput(), PCPolyContainer::save(), MSFrame::setMSGlobals(), startComputation(), SUMOVTypeParameter::SUMOVTypeParameter(), NGNet::toNB(), NBNetBuilder::transformCoordinates(), NIXMLEdgesHandler::tryGetShape(), NIImporter_OpenStreetMap::usableType(), MSFCDExport::write(), NWWriter_SUMO::writeConnection(), RODFDetectorCon::writeEmitters(), NWWriter_SUMO::writeInternalEdges(), NWWriter_MATSim::writeNetwork(), NWWriter_OpenDrive::writeNetwork(), and NWWriter_SUMO::writeNetwork().
const std::string & OptionsCont::getFullName | ( | ) | const |
int OptionsCont::getInt | ( | const std::string & | name | ) | const |
Returns the int-value of the named option (only for Option_Integer)
This method returns the int-value of an existing int-option. If the named option does not exist or is not a int-option, an InvalidArgument is thrown.
[in] | name | The name of the option to return the int-value of |
InvalidArgument | If the option does not exist or is not a int-option |
Definition at line 221 of file OptionsCont.cpp.
References Option::getInt(), and getSecure().
Referenced by MSRoutingEngine::_initEdgeWeights(), NBNetBuilder::applyOptions(), MSTransportableDevice_BTreceiver::buildDevices(), NBEdge::buildInnerEdges(), buildNetwork(), MSVehicleDevice_BTreceiver::buildVehicleDevices(), ROMAFrame::checkOptions(), MSFrame::checkOptions(), MSDevice_Routing::checkOptions(), NBFrame::checkOptions(), ROFrame::checkOptions(), SystemFrame::checkOptions(), NBTrafficLightDefinition::compute(), NBNetBuilder::compute(), NBOwnTLDef::computeLogicAndConts(), NBNodeShapeComputer::computeNodeShapeDefault(), computeRoutes(), computeRoutes(), NBNodeCont::createClusterId(), MSDevice_Emissions::generateOutput(), HelpersPHEMlight5::getClassByName(), MSNet::getIntermodalRouter(), NBNodeCont::guessTLs(), NLBuilder::init(), MsgHandler::initOutputOptions(), RandHelper::initRandGlobal(), MSLane::initRNGs(), MSRoutingEngine::initRouter(), main(), main(), MSNet::MSNet(), MSPModel_Striping::MSPModel_Striping(), MSTransportableControl::MSTransportableControl(), RouteCostCalculator< R, E, V >::RouteCostCalculator(), RONet::saveAndRemoveRoutesUntil(), MSFrame::setMSGlobals(), MSNet::simulationStep(), startComputation(), NGNet::toNB(), NWWriter_SUMO::writeNetwork(), NWWriter_DlrNavteq::writeNodesUnsplitted(), MSNet::writeOutput(), and NWWriter_DlrNavteq::writeTrafficSignals().
const IntVector & OptionsCont::getIntVector | ( | const std::string & | name | ) | const |
Returns the list of integer-value of the named option (only for Option_IntVector)
This method returns the int-vector-value of an existing int-vector-option. If the named option does not exist or is not a int-vector-option, an InvalidArgument is thrown.
[in] | name | The name of the option to return the int-vector-value of |
InvalidArgument | If the option does not exist or is not a int-vector-option |
Definition at line 235 of file OptionsCont.cpp.
References Option::getIntVector(), and getSecure().
Referenced by GNEOptionsDialogElements::InputIntVector::InputIntVector().
|
static |
Retrieves the options.
Definition at line 60 of file OptionsCont.cpp.
References myOptions.
Referenced by MSRoutingEngine::_initEdgeWeights(), MSRoutingEngine::adaptEdgeEfforts(), MSNet::adaptIntermodalRouter(), RONet::adaptIntermodalRouter(), ODMatrix::add(), MSDetectorControl::add(), MSPModel_JuPedSim::add(), MSPModel_Striping::add(), ROMAFrame::addAssignmentOptions(), NBRailwayTopologyAnalyzer::addBidiEdgesForStops(), MSChargingStation::addChargeValueForOutput(), NIImporter_SUMO::addConnection(), MSDetectorControl::addDetectorAndInterval(), NLHandler::addDistrict(), RODUAFrame::addDUAOptions(), NIImporter_SUMO::addEdge(), NLHandler::addEdgeLaneMeanData(), ROLoader::EdgeFloatTimeLineRetriever_EdgeWeight::addEdgeWeight(), ROLoader::EdgeFloatTimeLineRetriever_EdgeTravelTime::addEdgeWeight(), RODUAFrame::addImportOptions(), ROMAFrame::addImportOptions(), NIXMLEdgesHandler::addLane(), NBOwnTLDef::addPedestrianPhases(), NBOwnTLDef::addPedestrianScramble(), MSRouteHandler::addPersonTrip(), RORouteHandler::addPersonTrip(), NLHandler::addPhase(), PCLoaderOSM::addPOI(), PCLoaderOSM::addPolygon(), MSRouteHandler::addRideOrTransport(), NIXMLEdgesHandler::addSplit(), GNEViewNet::aksChangeSupermode(), NBNodeCont::analyzeCluster(), NBEdge::append(), NIImporter_OpenStreetMap::applyLaneUse(), SUMOVehicleParserHelper::beginVTypeParsing(), NLEdgeControlBuilder::build(), NIVisumTL::build(), GNEContour::buildContourEdge(), NBNode::buildCrossings(), NBNode::buildCrossingsAndWalkingAreas(), NLBuilder::buildDefaultMeanData(), GNETLSEditorFrame::TLSPhases::buildDefaultPhase(), MSTransportableDevice_Routing::buildDevices(), MSTransportableDevice_BTreceiver::buildDevices(), MSTransportableDevice_BTsender::buildDevices(), MSTransportableDevice_FCD::buildDevices(), MSTransportableDevice_FCDReplay::buildDevices(), MSDriveWay::buildDriveWay(), NBEdge::buildInnerEdges(), NIVissimEdge::buildNBEdge(), NGEdge::buildNBEdge(), NGNode::buildNBNode(), NBOwnTLDef::buildNemaPhases(), buildNetwork(), GUIGlObject::buildPopupHeader(), MSDevice_FCD::buildShapeFilter(), MSFrame::buildStreams(), NLTriggerBuilder::buildVaporizer(), MSDevice_Bluelight::buildVehicleDevices(), MSVehicleDevice_BTreceiver::buildVehicleDevices(), MSVehicleDevice_BTsender::buildVehicleDevices(), MSDevice_DriverState::buildVehicleDevices(), MSDevice_ElecHybrid::buildVehicleDevices(), MSDevice_Emissions::buildVehicleDevices(), MSDevice_Example::buildVehicleDevices(), MSDevice_FCD::buildVehicleDevices(), MSDevice_FCDReplay::buildVehicleDevices(), MSDevice_Friction::buildVehicleDevices(), MSDevice_GLOSA::buildVehicleDevices(), MSDevice_Routing::buildVehicleDevices(), MSDevice_SSM::buildVehicleDevices(), MSDevice_StationFinder::buildVehicleDevices(), MSDevice_Taxi::buildVehicleDevices(), MSDevice_ToC::buildVehicleDevices(), MSDevice_Tripinfo::buildVehicleDevices(), MSDevice_Vehroutes::buildVehicleDevices(), MSDevice_Battery::buildVehicleDevices(), GNEApplicationWindowHelper::ToolbarsGrip::buildViewParentToolbarsGrips(), NBNode::buildWalkingAreas(), GNEConnection::changeTLIndex(), MSVehicleType::check(), OptionsParser::check(), MSPerson::checkAccess(), NBNode::checkCrossing(), MSStageMoving::checkDepartLane(), GNEAdditionalHandler::checkFriendlyPosSmallLanes(), RODUAFrame::checkOptions(), ROJTRFrame::checkOptions(), ROMAFrame::checkOptions(), MSFrame::checkOptions(), checkOptions(), NGFrame::checkOptions(), MSTransportableControl::checkWaiting(), TraCIServer::cleanup(), SystemFrame::close(), MSRouteHandler::closeFlow(), RORouteHandler::closeFlow(), RORouteHandler::closePersonFlow(), RORouteHandler::closeRoute(), MSNet::closeSimulation(), MSRouteHandler::closeTransportable(), MSRouteHandler::closeTransportableFlow(), MSRouteHandler::closeVehicle(), RORouteHandler::closeVType(), NBTrafficLightDefinition::collectEdges(), ROPerson::computeIntermodal(), GNENet::computeJunction(), NBOwnTLDef::computeLogicAndConts(), GNENet::computeNetwork(), NBNode::computeNodeShape(), NBNodeShapeComputer::computeNodeShapeDefault(), NBNodeTypeComputer::computeNodeTypes(), computeRoutes(), computeRoutes(), RODFNet::computeRoutesFor(), NIImporter_OpenDrive::computeShapes(), RODFDetector::computeSplitProbabilities(), NBOwnTLDef::correctConflicting(), GUIApplicationWindow::create(), GNEApplicationWindow::create(), NBNodeCont::createClusterId(), OutputDevice::createDeviceByOption(), GNENet::createEdge(), GNENet::createJunction(), GNEApplicationWindow::createNewNetwork(), GNENet::createRoundabout(), GNETLSEditorFrame::TLSDefinition::createTLS(), GNEViewNet::doPaintGL(), GNEStoppingPlace::drawSign(), GNEViewNetHelper::TestingMode::drawTestingElements(), GNEViewNet::drawTestsCircle(), NIImporter_OpenStreetMap::EdgesHandler::EdgesHandler(), GNEViewNetHelper::EditModes::EditModes(), MSDevice::equippedByDefaultAssignmentOptions(), MSTransportableControl::erase(), METriggeredCalibrator::execute(), MSDevice_BTreceiver::BTreceiverUpdate::execute(), NBEdge::expandableBy(), GNEAttributeCarrier::fillDemandElements(), GNEAttributeCarrier::fillNetworkElements(), AGFrame::fillOptions(), RODFFrame::fillOptions(), RODUAFrame::fillOptions(), ROJTRFrame::fillOptions(), ROMAFrame::fillOptions(), MSFrame::fillOptions(), fillOptions(), NGFrame::fillOptions(), MSDevice_SSM::filterByConflictType(), LIBSUMO_NAMESPACE::Simulation::findIntermodalRoute(), NBPTLineCont::findWay(), GNENetHelper::AttributeCarriers::generateAdditionalID(), GNENetHelper::AttributeCarriers::generateDemandElementID(), GNENetHelper::AttributeCarriers::generateMeanDataID(), MSDevice_Emissions::generateOutput(), MSDevice_Tripinfo::generateOutputForUnfinished(), MSNet::generateStatistics(), GNEConnection::getAttribute(), GNEEdgeType::getAttribute(), GNELaneType::getAttribute(), NBRailwayTopologyAnalyzer::getBrokenRailNodes(), RouteCostCalculator< R, E, V >::getCalculator(), HelpersPHEMlight::getClassByName(), HelpersPHEMlight5::getClassByName(), PollutantsInterface::Helper::getClassByName(), MSDevice_SSM::getDetectionRange(), OutputDevice::getDevice(), OutputDevice::getDeviceByOption(), NGNet::getDistribution(), LIBSUMO_NAMESPACE::Simulation::getEndTime(), MSDevice_SSM::getExtraTime(), NBEdge::getFinalLength(), NBRequest::getFoesString(), MSNet::getIntermodalRouter(), NBLoadedTLDef::getMaxIndex(), NBOwnTLDef::getMaxIndex(), MSDevice_SSM::getMDRAC_PRT(), MSDevice_SSM::getMeasuresAndThresholds(), MSNet::getMesoType(), MSPModel_Striping::getNextLane(), NWWriter_SUMO::getOppositeInternalID(), LIBSUMO_NAMESPACE::Simulation::getOption(), OptionsIO::getOptions(), MSDevice_SSM::getOutputFilename(), GUINet::getParameterWindow(), GNEJunction::getPopUpMenu(), NIVissimDistrictConnection::getRealSpeed(), NBRequest::getResponseString(), OptionsIO::getRoot(), MSNet::getRouterTT(), GNENetworkElement::getShapeEditedPopUpMenu(), SUMOTrafficObject::getStringParam(), NIImporter_OpenDrive::getTLSSecure(), GNEChange_TLS::GNEChange_TLS(), NBNodeCont::guessFringe(), NBLoadedSUMOTLDef::guessMinMaxDuration(), NBRailwaySignalGuesser::guessRailSignals(), NBEdgeCont::guessRoundabouts(), NBEdgeCont::guessSpecialLanes(), NBNodeCont::guessTLs(), GNEApplicationWindow::handleEvent_NetworkLoaded(), GUIApplicationWindow::handleEvent_SimulationLoaded(), MSRailSignalControl::haveDeadlock(), NBNode::indirectLeftShape(), MSDevice_FCDReplay::init(), MSDevice_Vehroutes::init(), MSStopOut::init(), MSDriveWay::init(), NLBuilder::init(), GUIRunThread::init(), MSActuatedTrafficLightLogic::init(), MSDevice_Taxi::initDispatch(), MSDevice_SSM::initEdgeFilter(), GUINet::initGUIStructures(), NBLoadedSUMOTLDef::initNeedsContRelation(), MSDevice_Emissions::initOnce(), MSDevice_FCD::initOnce(), MsgHandler::initOutputOptions(), RandHelper::initRandGlobal(), NLBuilder::initRandomness(), MSRoutingEngine::initRouter(), GNEViewNetHelper::TestingMode::initTestingMode(), NIXMLTrafficLightsHandler::initTrafficLightLogic(), MSRoutingEngine::initWeightUpdate(), NBEdgeCont::insert(), NIImporter_OpenStreetMap::insertEdge(), NIImporter_OpenStreetMap::insertNodeChecking(), NIImporter_OpenStreetMap::interpretTransportType(), GNEConnection::isAttributeEnabled(), NBLoadedSUMOTLDef::joinLogic(), NBNodeCont::joinNodeCluster(), NBNodeShapeComputer::joinSameDirectionEdges(), NBNodeCont::joinTLS(), NBEdgeCont::joinTramEdges(), NIImporter_ArcView::load(), NIImporter_OpenStreetMap::load(), LIBSUMO_NAMESPACE::Simulation::load(), PHEMCEPHandler::Load(), GNEApplicationWindow::loadAdditionalElements(), OptionsIO::loadConfiguration(), GNEApplicationWindow::loadConfiguration(), GNELoadThread::loadConsoleOptions(), GNEApplicationWindow::loadDataElements(), GNEApplicationWindow::loadDemandElements(), GUINet::loadEdgeData(), PCLoaderOSM::loadIfSet(), GNEApplicationWindow::loadMeanDataElements(), loadNet(), GNEApplicationWindowHelper::GNENeteditConfigHandler::loadNeteditConfig(), NIImporter_OpenDrive::loadNetwork(), GNEApplicationWindow::loadNetwork(), GNEApplicationWindow::loadOptionOnStartup(), GNEApplicationWindow::loadOSM(), PCLoaderDlrNavteq::loadPOIFile(), MSNet::loadState(), GNEApplicationWindowHelper::GNESumoConfigHandler::loadSumoConfig(), main(), main(), NBRailwayTopologyAnalyzer::makeAllBidi(), NWWriter_OpenDrive::mapmatchRoadObjects(), GNEJunction::mirrorXLeftHand(), MSPModel_Striping::PState::moveToNextLane(), MSActuatedTrafficLightLogic::MSActuatedTrafficLightLogic(), MSDelayBasedTrafficLightLogic::MSDelayBasedTrafficLightLogic(), MSDevice_Battery::MSDevice_Battery(), MSDispatch::MSDispatch(), MSNet::MSNet(), MSRailSignal::MSRailSignal(), MSStateHandler::MSStateHandler(), MSTransportableControl::MSTransportableControl(), MSVehicleControl::MSVehicleControl(), NBLoadedTLDef::myCompute(), MSTriggeredRerouter::myEndElement(), SUMORouteHandler::myEndElement(), NIImporter_OpenDrive::myStartElement(), NIImporter_SUMO::myStartElement(), PCNetProjectionLoader::myStartElement(), NEMALogic::NEMALogic(), GNELoadThread::newNetwork(), NIImporter_VISUM::NIImporter_VISUM(), GNEViewNet::onCmdEditCrossingShape(), GNEViewNet::onCmdEditJunctionShape(), GNEViewNet::onCmdEditWalkingAreaShape(), GNEApplicationWindow::onCmdOpenAdditionals(), GNEApplicationWindow::onCmdOpenDataElements(), GNEApplicationWindow::onCmdOpenDemandElements(), GNEApplicationWindow::onCmdOpenEdgeTypes(), GUIApplicationWindow::onCmdOpenInNetedit(), GNEApplicationWindow::onCmdOpenMeanDatas(), GNEApplicationWindow::onCmdOpenNeteditConfig(), GNEApplicationWindow::onCmdOpenOptionsDialog(), GNEApplicationWindow::onCmdOpenSumoConfig(), GNEApplicationWindow::onCmdOpenSUMOGUI(), GNEApplicationWindow::onCmdOpenTLSPrograms(), GNEApplicationWindow::onCmdReloadAdditionals(), GNEApplicationWindow::onCmdReloadDataElements(), GNEApplicationWindow::onCmdReloadDemandElements(), GNEApplicationWindow::onCmdReloadEdgeTypes(), GNEApplicationWindow::onCmdReloadMeanDatas(), GNEApplicationWindow::onCmdReloadNeteditConfig(), GNEApplicationWindow::onCmdReloadNetwork(), GNEApplicationWindow::onCmdReloadSumoConfig(), GNEApplicationWindow::onCmdReloadTLSPrograms(), GNEApplicationWindow::onCmdSaveAdditionals(), GNEApplicationWindow::onCmdSaveAdditionalsAs(), GUIApplicationWindow::onCmdSaveConfig(), GNEApplicationWindow::onCmdSaveDataElements(), GNEApplicationWindow::onCmdSaveDataElementsAs(), GNEApplicationWindow::onCmdSaveDemandElements(), GNEApplicationWindow::onCmdSaveDemandElementsAs(), GNEApplicationWindow::onCmdSaveEdgeTypes(), GNEApplicationWindow::onCmdSaveEdgeTypesAs(), GNEApplicationWindow::onCmdSaveMeanDatas(), GNEApplicationWindow::onCmdSaveMeanDatasAs(), GNEApplicationWindow::onCmdSaveNeteditConfig(), GNEApplicationWindow::onCmdSaveNeteditConfigAs(), GNEApplicationWindow::onCmdSaveNetwork(), GNEApplicationWindow::onCmdSaveNetworkAs(), GNEApplicationWindow::onCmdSaveSumoConfig(), GNEApplicationWindow::onCmdSaveSumoConfigAs(), GNEApplicationWindow::onCmdSaveTLSPrograms(), GNEApplicationWindow::onCmdSaveTLSProgramsAs(), GNETAZFrame::TAZChildDefaultParameters::onCmdSetZeroFringeProbabilities(), GNEApplicationWindow::onCmdSmartReload(), GNEPythonToolDialogElements::AdditionalArgument::onCmdUseCurrentAdditionalFile(), GNEPythonToolDialogElements::DataArgument::onCmdUseCurrentDataFile(), GNEPythonToolDialogElements::NetworkArgument::onCmdUseCurrentNetworkFile(), GNEPythonToolDialogElements::RouteArgument::onCmdUseCurrentRouteFile(), GNEPythonToolDialogElements::SumoConfigArgument::onCmdUseCurrentSumoConfigFile(), GUIApplicationWindow::onUpdNeedsSumoConfig(), GNEApplicationWindow::onUpdReloadAdditionals(), GNEApplicationWindow::onUpdReloadDataElements(), GNEApplicationWindow::onUpdReloadDemandElements(), GNEApplicationWindow::onUpdReloadEdgeTypes(), GNEApplicationWindow::onUpdReloadMeanDatas(), GNEApplicationWindow::onUpdReloadNeteditConfig(), GNEApplicationWindow::onUpdReloadNetwork(), GNEApplicationWindow::onUpdReloadSumoConfig(), GNEApplicationWindow::onUpdReloadTLSPrograms(), GNEApplicationWindow::onUpdSaveNeteditConfig(), GNEApplicationWindow::onUpdSaveSumoConfig(), GNEApplicationWindow::onUpdSmartReload(), GNEPythonToolDialogElements::AdditionalArgument::onUpdUseCurrentAdditionalFile(), GNEPythonToolDialogElements::DataArgument::onUpdUseCurrentDataFile(), GNEPythonToolDialogElements::NetworkArgument::onUpdUseCurrentNetworkFile(), GNEPythonToolDialogElements::RouteArgument::onUpdUseCurrentRouteFile(), GNEPythonToolDialogElements::SumoConfigArgument::onUpdUseCurrentSumoConfigFile(), TraCIServer::openSocket(), NBRequest::oppositeLeftTurnConflict(), NIImporter_VISUM::parse_Connectors_legacy(), NIImporter_VISUM::parse_EdgePolys(), NIImporter_VISUM::parse_Edges(), NIImporter_VISUM::parse_stopPoints(), NIImporter_VISUM::parse_Turns(), MSRouteHandler::parseFromViaTo(), RORouteHandler::parseFromViaTo(), NIXMLConnectionsHandler::parseLaneBound(), MSDevice_FCDReplay::parseNext(), NBLoadedSUMOTLDef::patchIfCrossingsAdded(), NIImporter_Vissim::postLoadBuild(), RORouteDef::preComputeCurrentRoute(), MSStageWalking::proceed(), ROLoader::processRoutes(), NIXMLNodesHandler::processTrafficLightDefinitions(), MSNet::quickReload(), MSDevice_Routing::rebuildRerouteCommand(), NBNodeCont::recheckGuessedTLS(), NBEdgeCont::recheckLanes(), NBEdgeCont::recheckPostProcessConnections(), NBNodeCont::recheckTLSThreshold(), NIImporter_OpenStreetMap::reconstructLayerElevation(), NBLoadedSUMOTLDef::reconstructLogic(), GUINet::registerRenderedObject(), NBEdgeCont::remapIDs(), NBNodeCont::remapIDs(), MSVehicleControl::removePending(), NBNodeCont::removeUnwishedNodes(), RORouteDef::repairCurrentRoute(), NBRailwayTopologyAnalyzer::repairTopology(), NIImporter_DlrNavteq::NodesHandler::report(), NIImporter_DlrNavteq::EdgesHandler::report(), NIImporter_DlrNavteq::TrafficlightsHandler::report(), NIImporter_DlrNavteq::ConnectedLanesHandler::report(), MSDevice_SSM::requestsTrajectories(), GNENet::restrictLane(), RODFNet::RODFNet(), ROMARouteHandler::ROMARouteHandler(), RouteCostCalculator< R, E, V >::RouteCostCalculator(), MSStageDriving::routeOutput(), MSStageTranship::routeOutput(), MSStageTrip::routeOutput(), MSStageWaiting::routeOutput(), MSStageWalking::routeOutput(), MSTransportable::routeOutput(), GUILoadThread::run(), GNELoadThread::run(), NBNetBuilder::runningNetedit(), PCPolyContainer::save(), GNENet::saveAdditionalsConfirmed(), GNENet::saveDataElementsConfirmed(), GNENet::saveDemandElementsConfirmed(), PCPolyContainer::saveDlrTDP(), GNENet::saveJoined(), GNENet::saveMeanDatasConfirmed(), GNENet::saveNetwork(), GNENet::savePlain(), MSStateHandler::saveState(), MSBaseVehicle::saveState(), MSInsertionControl::saveState(), MSRailSignalConstraint::saveState(), MSTransportable::saveState(), GNEViewNet::saveVisualizationSettings(), MSStageDriving::setArrived(), GNEEdge::setAttribute(), GNENetDiffTool::setCurrentValues(), GNEEdge::setGeometry(), GNEApplicationWindow::setInputInSumoOptions(), NLHandler::setLocation(), MSFrame::setMSGlobals(), GNEStoppingPlace::setStoppingPlaceGeometry(), GUIMainWindow::setWindowSizeAndPos(), GUIDialog_EditViewport::show(), signalHandler(), MSNet::simulationStep(), GNEEdge::smoothElevation(), GNEEdge::smoothShape(), NBEdgeCont::splitAt(), GUILane::splitAtSegments(), SUMOVTypeParameter::SUMOVTypeParameter(), GNEViewNetHelper::TimeFormat::switchTimeFormat(), NGNet::toNB(), NBNetBuilder::transformCoordinates(), NIXMLEdgesHandler::tryGetShape(), GNEBusStop::updateGeometry(), GNEChargingStation::updateGeometry(), GNEContainerStop::updateGeometry(), GNEParkingArea::updateGeometry(), GUISUMOAbstractView::updatePositionInformationLabel(), NIImporter_OpenStreetMap::usableType(), MSDevice_SSM::useGeoCoords(), NBNodeTypeComputer::validateRailCrossings(), AGCity::workAllocation(), MSChargingStationExport::write(), MSQueueExport::write(), MSFCDExport::write(), MSEmissionExport::write(), ODMatrix::write(), GNECalibratorFlow::writeAdditional(), NWWriter_SUMO::writeConnection(), ODMatrix::writeDefaultAttrs(), GNEContainer::writeDemandElement(), GNEPerson::writeDemandElement(), GNEVehicle::writeDemandElement(), RODFDetector::writeEmitterDefinition(), RODFDetectorCon::writeEmitters(), PlainXMLFormatter::writeHeader(), NWWriter_SUMO::writeInternalConnections(), NWWriter_SUMO::writeInternalEdges(), NWWriter_SUMO::writeJunction(), MSDevice_SSM::writeLanesPositions(), NBRequest::writeLogic(), NWWriter_SUMO::writeNetwork(), MSNet::writeOutput(), MSDevice_Vehroutes::writeOutput(), MSDevice_SSM::writePositions(), MSNet::writeRailSignalBlocks(), NIImporter_OpenDrive::writeRoadObjects(), MSNet::writeStatistics(), MSNet::writeSubstationOutput(), MSNet::writeSummaryOutput(), and PlainXMLFormatter::writeXMLHeader().
|
private |
Returns the named option.
If the named option does not exist, an InvalidArgument is thrown.
[in] | name | The name of the option to return |
Definition at line 172 of file OptionsCont.cpp.
References myDeprecatedSynonymes, mySubTopicEntries, myValues, TL, TLF, and WRITE_WARNINGF.
Referenced by addDescription(), checkDependingSuboptions(), getBool(), getDescription(), getFloat(), getInt(), getIntVector(), getString(), getStringVector(), getSubTopic(), getSynonymes(), getTypeName(), getValueString(), isBool(), isUsableFileList(), isWriteable(), printHelp(), printHelpOnTopic(), resetDefault(), set(), setDefault(), setFurtherAttributes(), writeConfiguration(), and writeSchema().
std::string OptionsCont::getString | ( | const std::string & | name | ) | const |
Returns the string-value of the named option (only for Option_String)
This method returns the string-value of an existing string-option. If the named option does not exist or is not a string-option, an InvalidArgument is thrown.
[in] | name | The name of the option to return the string-value of |
InvalidArgument | If the option does not exist or is not a string-option |
Definition at line 207 of file OptionsCont.cpp.
References getSecure(), and Option::getString().
Referenced by NIImporter_SUMO::_loadNetwork(), NIXMLEdgesHandler::addEdge(), MSRouteHandler::addPersonTrip(), MSRouteHandler::addRideOrTransport(), NBEdgeCont::applyOptions(), NBNetBuilder::applyOptions(), NLBuilder::build(), NGNode::buildNBNode(), NLBuilder::buildNet(), NLBuilder::buildRouteLoaderControl(), MSPerson::checkAccess(), RODUAFrame::checkOptions(), ROJTRFrame::checkOptions(), ROMAFrame::checkOptions(), MSFrame::checkOptions(), NGFrame::checkOptions(), checkOptions(), MSDevice_Routing::checkOptions(), NBFrame::checkOptions(), NIFrame::checkOptions(), NWFrame::checkOptions(), SystemFrame::checkOptions(), MSNet::closeBuilding(), NBNetBuilder::compute(), NBTrafficLightLogicCont::computeLogics(), computeRoutes(), computeRoutes(), GNENet::createEdge(), GNENet::createJunction(), MSDevice_SSM::filterByConflictType(), RouteCostCalculator< R, E, V >::getCalculator(), HelpersPHEMlight5::getClassByName(), GNENetDiffTool::getCommand(), OutputDevice::getDevice(), OutputDevice::getDeviceByOption(), NGNet::getDistribution(), MSNet::getIntermodalRouter(), MSDevice_SSM::getMeasuresAndThresholds(), MSNet::getMesoType(), MSDevice_SSM::getOutputFilename(), MSNet::getRouterTT(), NBNodeCont::guessTLs(), GUIApplicationWindow::handleEvent_SimulationLoaded(), MSDevice_FCDReplay::init(), NLBuilder::init(), GeoConvHelper::init(), MSLane::initCollisionAction(), MSLane::initCollisionOptions(), MSDevice_Taxi::initDispatch(), MSDevice_SSM::initEdgeFilter(), MSPModel_JuPedSim::initialize(), initNet(), MSDevice_FCD::initOnce(), MsgHandler::initOutputOptions(), MSRoutingEngine::initRouter(), NIXMLTrafficLightsHandler::initTrafficLightLogic(), MSRoutingEngine::initWeightUpdate(), GNEOptionsDialogElements::InputString::InputString(), GNEOptionsDialogElements::InputTime::InputTime(), NIImporter_OpenStreetMap::insertEdge(), NIImporter_ArcView::load(), NIImporter_Vissim::load(), PCLoaderArcView::load(), PCLoaderVisum::load(), PHEMCEPHandler::Load(), OptionsIO::loadConfiguration(), PCLoaderVisum::loadIfSet(), ODMatrix::loadMatrix(), loadNet(), ROLoader::loadNet(), NIImporter_ArcView::loadNetwork(), NIImporter_DlrNavteq::loadNetwork(), NIImporter_VISUM::loadNetwork(), PCLoaderDlrNavteq::loadPOIFile(), PCLoaderDlrNavteq::loadPolyFile(), main(), main(), NBRailwayTopologyAnalyzer::makeAllBidi(), MSNet::MSNet(), MSPModel_JuPedSim::MSPModel_JuPedSim(), MSPModel_Striping::MSPModel_Striping(), MSTransportableControl::MSTransportableControl(), PCLoaderXML::myStartElement(), PCTypeDefHandler::myStartElement(), GUIApplicationWindow::onCmdOpenInNetedit(), GNEApplicationWindow::onCmdReloadAdditionals(), GNEApplicationWindow::onCmdReloadDataElements(), GNEApplicationWindow::onCmdReloadDemandElements(), GNEApplicationWindow::onCmdReloadEdgeTypes(), GNEApplicationWindow::onCmdReloadMeanDatas(), RONet::openOutput(), ROLoader::openRoutes(), PCTypeMap::PCTypeMap(), GNENetDiffTool::postProcessing(), MSStageWalking::proceed(), processMetaOptions(), NIXMLNodesHandler::processTrafficLightDefinitions(), MSNet::quickReload(), readDetectorFlows(), NBNodeCont::removeUnwishedNodes(), MSStageTrip::routeOutput(), GUILoadThread::run(), GNENetDiffTool::setCurrentValues(), MSFrame::setMSGlobals(), startComputation(), SUMOVTypeParameter::SUMOVTypeParameter(), NGNet::toNB(), SUMOVehicleParameter::write(), MSFCDExport::write(), MSEmissionExport::write(), ODMatrix::write(), NWWriter_DlrNavteq::writeConnectedLanes(), ODMatrix::writeDefaultAttrs(), NWWriter_XML::writeDistricts(), NWWriter_XML::writeEdgesAndConnections(), RODFDetector::writeEmitterDefinition(), RODFDetectorCon::writeEmitters(), NWWriter_DlrNavteq::writeHeader(), RONet::writeIntermodal(), NWWriter_DlrNavteq::writeLinksUnsplitted(), NWWriter_XML::writeNetwork(), NWFrame::writeNetwork(), NWWriter_Amitran::writeNetwork(), NWWriter_MATSim::writeNetwork(), NWWriter_OpenDrive::writeNetwork(), NWWriter_SUMO::writeNetwork(), NWWriter_XML::writeNodes(), NWWriter_DlrNavteq::writeNodesUnsplitted(), MSNet::writeOutput(), NWWriter_XML::writeParkingAreas(), NWWriter_DlrNavteq::writeProhibitedManoeuvres(), NWWriter_XML::writePTLines(), NWWriter_XML::writePTStops(), NIImporter_OpenDrive::writeRoadObjects(), NWWriter_XML::writeStreetSigns(), MSNet::writeSummaryOutput(), and NWWriter_DlrNavteq::writeTrafficSignals().
const StringVector & OptionsCont::getStringVector | ( | const std::string & | name | ) | const |
Returns the list of string-value of the named option (only for Option_StringVector)
This method returns the string-vector-value of an existing string-vector-option. If the named option does not exist or is not a string-vector-option, an InvalidArgument is thrown.
If the legacy-divider ';' is found within the string, a warning is generated. The retrieved string is only splitted at ','.
[in] | name | The name of the option to return the string-vector-value of |
InvalidArgument | If the option does not exist or is not a string-vector-option |
Definition at line 241 of file OptionsCont.cpp.
References getSecure(), and Option::getStringVector().
Referenced by NIImporter_SUMO::_loadNetwork(), NBEdgeCont::applyOptions(), NBTrafficLightLogicCont::applyOptions(), NLBuilder::build(), NLBuilder::buildNet(), NLBuilder::buildRouteLoaderControl(), MSDevice_FCD::buildShapeFilter(), MSFrame::checkOptions(), RORouteHandler::closeVType(), NBNetBuilder::compute(), NBRampsComputer::computeRamps(), computeRoutes(), MSDevice::equippedByDefaultAssignmentOptions(), getTurningDefaults(), NBEdgeCont::guessSpecialLanes(), NBNodeCont::guessTLs(), GUIApplicationWindow::handleEvent_SimulationLoaded(), MSDevice_Emissions::initOnce(), MSDevice_FCD::initOnce(), GNEViewNetHelper::TestingMode::initTestingMode(), isInStringVector(), isUsableFileList(), NBNodeCont::joinTLS(), NIImporter_ArcView::load(), NIImporter_OpenStreetMap::load(), PCLoaderArcView::load(), NLBuilder::load(), NILoader::load(), NBHeightMapper::loadIfSet(), PCLoaderArcView::loadIfSet(), PCLoaderOSM::loadIfSet(), PCLoaderVisum::loadIfSet(), PCLoaderXML::loadIfSet(), loadJTRDefinitions(), ODMatrix::loadMatrix(), ROLoader::loadNet(), NIImporter_ITSUMO::loadNetwork(), NIImporter_MATSim::loadNetwork(), NIImporter_OpenDrive::loadNetwork(), PCLoaderDlrNavteq::loadPOIFiles(), PCLoaderDlrNavteq::loadPolyFiles(), ODMatrix::loadRoutes(), ROLoader::loadWeights(), NILoader::loadXML(), main(), MSStateHandler::MSStateHandler(), NIImporter_OpenStreetMap::NodesHandler::NodesHandler(), ROLoader::openTypedRoutes(), SUMOVehicleParserHelper::parseCarWalkTransfer(), MSNet::quickReload(), readDetectorFlows(), readDetectors(), NBNodeCont::removeUnwishedNodes(), RODFNet::RODFNet(), ROMARouteHandler::ROMARouteHandler(), GUILoadThread::run(), GUIMainWindow::setWindowSizeAndPos(), and MSFCDExport::write().
const std::string & OptionsCont::getSubTopic | ( | const std::string & | name | ) | const |
Returns the option category.
[in] | name | The name of the option to return the category of |
InvalidArgument | If the named option does not exist |
Definition at line 310 of file OptionsCont.cpp.
References getSecure(), and Option::getSubTopic().
const std::vector< std::string > & OptionsCont::getSubTopics | ( | ) | const |
return the list of subtopics
Definition at line 720 of file OptionsCont.cpp.
References mySubTopics.
Referenced by GNEOptionsDialog::GNEOptionsDialog(), GNERunNetgenerate::run(), and TemplateHandler::startElement().
std::vector< std::string > OptionsCont::getSubTopicsEntries | ( | const std::string & | subtopic | ) | const |
return the list of entries for the given subtopic
Definition at line 726 of file OptionsCont.cpp.
References mySubTopicEntries.
Referenced by GNEOptionsDialog::GNEOptionsDialog(), and GNERunNetgenerate::run().
std::vector< std::string > OptionsCont::getSynonymes | ( | const std::string & | name | ) | const |
Returns the synonymes of an option name.
The named option is extracted, first. An InvalidArgument is thrown if it does not exist. Otherwise, other names for the named option are searched and returned (the original name is not in the list).
[in] | name | The name of the option to return synonymes of |
InvalidArgument | If the named option does not exist |
Definition at line 291 of file OptionsCont.cpp.
References getSecure(), and myValues.
Referenced by checkDependingSuboptions(), printHelp(), printHelpOnTopic(), reportDoubleSetting(), and writeConfiguration().
std::string OptionsCont::getTypeName | ( | const std::string | name | ) |
return the type name for the given option
Definition at line 736 of file OptionsCont.cpp.
References getSecure(), and Option::getTypeName().
Referenced by GNEOptionsDialog::GNEOptionsDialog().
std::string OptionsCont::getValueString | ( | const std::string & | name | ) | const |
Returns the string-value of the named option (all options)
This method returns the string-value of an existing option. If the named option does not exist, an InvalidArgument is thrown.
[in] | name | The name of the option to return the string-value of |
InvalidArgument | If the option does not exist |
Definition at line 200 of file OptionsCont.cpp.
References getSecure(), and Option::getValueString().
Referenced by NBEdgeCont::applyOptions(), NBFrame::checkOptions(), GNEPythonTool::getDefaultValue(), LIBSUMO_NAMESPACE::Simulation::getOption(), SUMOTrafficObject::getStringParam(), GNEOptionsDialog::GNEOptionsDialog(), GNEApplicationWindow::onCmdNewWindow(), printHelp(), and GNERunNetgenerate::run().
bool OptionsCont::isBool | ( | const std::string & | name | ) | const |
Returns the information whether the option is a boolean option.
The option is retrieved from the container, first, what may cause an InvalidArgument exception if it is not known. Otherwise, this option's isBool-method is called.
[in] | name | The name of the option to check |
InvalidArgument | If the option does not exist |
Definition at line 456 of file OptionsCont.cpp.
References getSecure(), and Option::isBool().
Referenced by OptionsParser::check().
bool OptionsCont::isDefault | ( | const std::string & | name | ) | const |
Returns the information whether the named option has still the default value.
The named option is tried to be retrieved from the container. If it does not exist, an InvalidArgument is thrown. If it could be retrieved, the information whether the option still has the default value is returned.
An option "is default" if no value has been set from the command line / the configuration file.
InvalidArgument | If the named option is not known |
Definition at line 162 of file OptionsCont.cpp.
References myValues.
Referenced by MSRoutingEngine::_initEdgeWeights(), NIImporter_SUMO::addEdge(), NIXMLEdgesHandler::addEdge(), NLBuilder::build(), buildNetwork(), MSDevice_Routing::buildVehicleDevices(), RODUAFrame::checkOptions(), ROJTRFrame::checkOptions(), MSFrame::checkOptions(), MSDevice_Routing::checkOptions(), NBFrame::checkOptions(), NIFrame::checkOptions(), NWFrame::checkOptions(), SystemFrame::checkOptions(), NBTrafficLightDefinition::compute(), NBNetBuilder::compute(), NBTrafficLightLogicCont::computeLogics(), computeRoutes(), computeRoutes(), NIImporter_OpenDrive::computeShapes(), MSDevice_SSM::filterByConflictType(), MSDevice_Emissions::generateOutput(), HelpersPHEMlight5::getClassByName(), MSDevice_SSM::getDetectionRange(), MSDevice_SSM::getExtraTime(), MSDevice_SSM::getMDRAC_PRT(), MSDevice_SSM::getMeasuresAndThresholds(), MSDevice_SSM::getOutputFilename(), GUIApplicationWindow::handleEvent_SimulationLoaded(), NLBuilder::init(), GeoConvHelper::init(), MSPModel_JuPedSim::initialize(), NIImporter_DlrNavteq::loadNetwork(), main(), ROLoader::processRoutes(), NBEdgeCont::remapIDs(), NBNodeCont::remapIDs(), MSDevice_SSM::requestsTrajectories(), GUILoadThread::run(), GNERunNetgenerate::run(), MSFrame::setMSGlobals(), MSDevice_SSM::useGeoCoords(), RODFDetectorCon::writeEmitters(), MSDevice_SSM::writeLanesPositions(), NWWriter_SUMO::writeNetwork(), MSDevice_Vehroutes::writeOutput(), MSDevice_SSM::writePositions(), and NIImporter_OpenDrive::writeRoadObjects().
bool OptionsCont::isEmpty | ( | ) | const |
check if options container is empty
Definition at line 748 of file OptionsCont.cpp.
References myAddresses.
bool OptionsCont::isInStringVector | ( | const std::string & | optionName, |
const std::string & | itemName | ||
) | const |
Returns the named option is a list of string values containing the specified item.
If the named option is not set, false is returned. Otherwise, the string-vector of this option is retrieved using getStringVector what may throw an InvalidArgument exception if the named option is not a string option or not existing at all.
The given itemName is searched in the obtained string-vector and the method returns whether it is stored in the list or not.
[in] | optionName | The name of the option to evaluate entries of |
[in] | itemName | The item to be searched for in the entries of the named option |
InvalidArgument | If the option does not exist or is not a string-option |
Definition at line 1046 of file OptionsCont.cpp.
References getStringVector(), and isSet().
Referenced by NBNodeTypeComputer::computeNodeTypes(), PCLoaderOSM::loadIfSet(), and PCLoaderXML::myStartElement().
bool OptionsCont::isSet | ( | const std::string & | name, |
bool | failOnNonExistant = true |
||
) | const |
Returns the information whether the named option is set.
The named option is tried to be retrieved from the container. If it does not exist, an InvalidArgument is thrown. If it could be retrieved, the information whether the option has a value stored is returned.
An option "is set" if a default value was supplied or a value has been set from the command line / the configuration file.
[in] | name | The name of the option to check |
[in] | failOnNonExistant | Whether asking for an unregistered option should trigger an exception |
InvalidArgument | If the named option is not known |
Definition at line 148 of file OptionsCont.cpp.
Referenced by MSRoutingEngine::adaptEdgeEfforts(), NIImporter_SUMO::addConnection(), NBParkingCont::addEdges2Keep(), NBEdgeCont::applyOptions(), NBTrafficLightLogicCont::applyOptions(), NLBuilder::build(), MSTransportableDevice_FCD::buildDevices(), MSTransportableDevice_FCDReplay::buildDevices(), NGNode::buildNBNode(), NLBuilder::buildNet(), NLBuilder::buildRouteLoaderControl(), MSDevice_FCD::buildShapeFilter(), MSDevice_Emissions::buildVehicleDevices(), MSDevice_FCD::buildVehicleDevices(), MSDevice_FCDReplay::buildVehicleDevices(), MSDevice_Tripinfo::buildVehicleDevices(), MSDevice_Vehroutes::buildVehicleDevices(), RODUAFrame::checkOptions(), ROJTRFrame::checkOptions(), ROMAFrame::checkOptions(), MSFrame::checkOptions(), NGFrame::checkOptions(), checkOptions(), NBFrame::checkOptions(), NIFrame::checkOptions(), NWFrame::checkOptions(), ROFrame::checkOptions(), MSTransportableControl::checkWaiting(), NBNetBuilder::compute(), GNENet::computeAndUpdate(), NBNodeShapeComputer::computeNodeShapeDefault(), NBRampsComputer::computeRamps(), computeRoutes(), computeRoutes(), SUMOVehicleParameter::defaultOptionOverrides(), MSDevice::equippedByDefaultAssignmentOptions(), MSTransportableControl::erase(), MSDevice_BTreceiver::BTreceiverUpdate::execute(), MSDevice_Tripinfo::generateOutputForUnfinished(), SUMOTrafficObject::getStringParam(), NBNodeCont::guessTLs(), MSRailSignalControl::haveDeadlock(), MSDevice_FCDReplay::init(), MSDevice_Vehroutes::init(), MSDriveWay::init(), MSAbstractLaneChangeModel::initGlobalOptions(), GUINet::initGUIStructures(), initNet(), MSDevice_Emissions::initOnce(), MSDevice_FCD::initOnce(), MsgHandler::initOutputOptions(), MSRoutingEngine::initRouter(), NIImporter_OpenStreetMap::insertEdge(), isInStringVector(), NBNodeShapeComputer::joinSameDirectionEdges(), NIImporter_ArcView::load(), NIImporter_OpenStreetMap::load(), NILoader::load(), OptionsIO::loadConfiguration(), NBHeightMapper::loadIfSet(), PCLoaderArcView::loadIfSet(), PCLoaderDlrNavteq::loadIfSet(), PCLoaderOSM::loadIfSet(), PCLoaderVisum::loadIfSet(), PCLoaderXML::loadIfSet(), loadJTRDefinitions(), ROLoader::loadNet(), NIImporter_ArcView::loadNetwork(), NIImporter_DlrNavteq::loadNetwork(), NIImporter_ITSUMO::loadNetwork(), NIImporter_OpenDrive::loadNetwork(), NIImporter_VISUM::loadNetwork(), NIImporter_Vissim::loadNetwork(), main(), MSTransportableControl::MSTransportableControl(), GUIApplicationWindow::onUpdNeedsSumoConfig(), RONet::openOutput(), ROLoader::openTypedRoutes(), processMetaOptions(), readDetectorFlows(), readDetectors(), MSVehicleControl::removePending(), NBNodeCont::removeUnwishedNodes(), GUILoadThread::run(), MSFrame::setMSGlobals(), GUIMainWindow::setWindowSizeAndPos(), startComputation(), SUMOVehicleParameter::write(), MSFCDExport::write(), ODMatrix::write(), ODMatrix::writeDefaultAttrs(), RODFDetector::writeEmitterDefinition(), RONet::writeIntermodal(), NWWriter_XML::writeNetwork(), NWFrame::writeNetwork(), NWWriter_Amitran::writeNetwork(), NWWriter_DlrNavteq::writeNetwork(), NWWriter_MATSim::writeNetwork(), NWWriter_OpenDrive::writeNetwork(), NWWriter_SUMO::writeNetwork(), NWWriter_DlrNavteq::writeNodesUnsplitted(), MSNet::writeOutput(), NWWriter_DlrNavteq::writeProhibitedManoeuvres(), MSNet::writeStatistics(), and MSNet::writeSummaryOutput().
bool OptionsCont::isUsableFileList | ( | const std::string & | name | ) | const |
Checks whether the named option is usable as a file list (with at least a single file)
The method returns true, if the named option is set with entries containing names of accessable files.
Throw an InvalidArgument exception if the option is not known. If the option is not set, false is returned. Also, if the list is empty (conatins delimiters only) or if one of the named files (obtained using getStringVector) does not exist, false is returned. Additionally, an error is sent to MsgHandler in both cases.
In the case two delimiters were placed in the option value directly after each other, a warning is generated.
[in] | name | The name of the option to check |
InvalidArgument | If the option does not exist or is not a string-option |
Definition at line 379 of file OptionsCont.cpp.
References getSecure(), getStringVector(), FileHelpers::isReadable(), Option::isSet(), TL, WRITE_ERRORF, and WRITE_WARNING.
Referenced by NIImporter_SUMO::_loadNetwork(), NLBuilder::build(), MSFrame::checkOptions(), NLBuilder::load(), NIImporter_MATSim::loadNetwork(), NIImporter_OpenDrive::loadNetwork(), ROLoader::loadWeights(), main(), ROLoader::openTypedRoutes(), and GUILoadThread::run().
bool OptionsCont::isWriteable | ( | const std::string & | name | ) |
Returns the information whether the named option may be set.
An option is writable after initialisation, but as soon as it gets set, it is no longer writeable. This method returns whether the named option is writeable. If the named option is not known, an InvalidArgument is thrown.
[in] | name | The name of the option to check |
InvalidArgument | If the option does not exist |
Definition at line 485 of file OptionsCont.cpp.
References getSecure(), and Option::isWriteable().
Referenced by NIImporter_SUMO::_loadNetwork(), NIFrame::checkOptions(), and OptionsLoader::setSecure().
|
privatedelete |
invalid assignment operator
void OptionsCont::printHelp | ( | std::ostream & | os | ) |
Prints the help.
[in] | os | The stream to write the help into |
Definition at line 766 of file OptionsCont.cpp.
References getSecure(), getSynonymes(), Option::getTypeName(), getValueString(), Option::isBool(), myAdditionalMessage, myAppDescription, myAppName, myCallExamples, myDeprecatedSynonymes, mySubTopicEntries, mySubTopics, printHelpOnTopic(), splitLines(), TL, and StringUtils::to_lower_case().
Referenced by processMetaOptions().
void OptionsCont::printHelpOnTopic | ( | const std::string & | topic, |
int | tooLarge, | ||
int | maxSize, | ||
std::ostream & | os | ||
) |
Prints help on the given topic.
[in] | topic | The topic name |
[in] | os | The stream to write the help into |
Definition at line 844 of file OptionsCont.cpp.
References Option::getDescription(), getSecure(), getSynonymes(), Option::getTypeName(), Option::isBool(), myDeprecatedSynonymes, mySubTopicEntries, and splitLines().
Referenced by printHelp().
bool OptionsCont::processMetaOptions | ( | bool | missingOptions | ) |
Checks for help and configuration output, returns whether we should exit.
Returns false if no error was detected and the application may be executed (at least from this point of view). If missingOptions is true, the user is informed that they should be supplied (returns true). Otherwise it is checked whether help shall be printed what is done if so, returning true. Also, it is checked whether the set options shall be printed and the configuration template or the current configuration shall be written.
This method throws a ProcessError if the configuration should be saved, but the file is not accessable. An error message is supplied.
[in] | missingOptions | Whether no options have been given |
ProcessError | If the configuration file could not be saved |
Definition at line 616 of file OptionsCont.cpp.
References getBool(), getString(), isSet(), myCopyrightNotices, myFullName, printHelp(), MsgHandler::setupI18n(), TL, TLF, StringUtils::transcodeToLocal(), WRITE_MESSAGEF, writeConfiguration(), and writeSchema().
Referenced by NLBuilder::init(), main(), and main().
void OptionsCont::relocateFiles | ( | const std::string & | configuration | ) | const |
Modifies file name options according to the configuration path.
If the configuration path given is a relative one all filenames inside are adapted such that they refer to the correct location.
[in] | configuration | The path to the configuration file |
Definition at line 349 of file OptionsCont.cpp.
References FileHelpers::checkForRelativity(), StringTokenizer::getVector(), joinToString(), myAddresses, toString(), StringUtils::urlDecode(), and WRITE_WARNING.
Referenced by OptionsIO::loadConfiguration().
|
private |
Reports an error that the option has already been set.
Using the given option name, an error string is generated and reported to MsgHandler-error instance.
[in] | name | The name of the option that was already set |
Definition at line 429 of file OptionsCont.cpp.
References getSynonymes(), TLF, and WRITE_ERROR.
Referenced by set().
void OptionsCont::resetDefault | ( | ) |
Resets all options to default.
Definition at line 471 of file OptionsCont.cpp.
References myAddresses.
Referenced by TemplateHandler::parseTemplate(), and GNEApplicationWindow::setInputInSumoOptions().
void OptionsCont::resetDefault | ( | const std::string & | name | ) |
Reset specific option to default.
Definition at line 479 of file OptionsCont.cpp.
References getSecure(), and Option::resetDefault().
void OptionsCont::resetWritable | ( | ) |
Resets all options to be writeable.
An option is writable after initialisation, but as soon as it gets set, it is no longer writeable. This method resets the writable-flag of all known options.
Definition at line 463 of file OptionsCont.cpp.
References myAddresses.
Referenced by NBNetBuilder::compute(), OptionsIO::loadConfiguration(), GNEOptionsDialog::loadConfiguration(), GNEPythonTool::loadConfiguration(), GNELoadThread::loadConsoleOptions(), main(), GNEApplicationWindow::onCmdSaveNetwork(), GNEApplicationWindow::onCmdSaveSumoConfig(), GNENetgenerateDialog::onCmdSetGrid(), GNENetgenerateDialog::onCmdSetOutput(), GNENetgenerateDialog::onCmdSetRandom(), GNENetgenerateDialog::onCmdSetRandomGrid(), GNENetgenerateDialog::onCmdSetSpider(), GUILoadThread::run(), GNENet::saveNetwork(), GNEEdge::setAttribute(), GNENetDiffTool::setCurrentValues(), GNELoadThread::setDefaultOptions(), GNEApplicationWindow::setInputInSumoOptions(), GNEViewNetHelper::TimeFormat::switchTimeFormat(), and NWWriter_SUMO::writeNetwork().
bool OptionsCont::set | ( | const std::string & | name, |
const std::string & | value, | ||
const bool | append = false |
||
) |
Sets the given value for the named option.
The option is retrieved from the container, first, what yields in a InvalidArgument exception for not known options.
If the option is not writable (was set before), an error is generated using reportDoubleSetting, and false is returned. Otherwise, the option is told to set the given value using Option::set. Possible problems herein are caught and reported to the error-handler, yielding in returning false.
If the new value could be set, true is returned.
[in] | name | The name of the option to set |
[in] | value | The value to set |
InvalidArgument | If the option does not exist |
Definition at line 248 of file OptionsCont.cpp.
References OptionsIO::getLoadTime(), getSecure(), Option::isWriteable(), reportDoubleSetting(), Option::set(), StringUtils::substituteEnvironment(), and WRITE_ERROR.
Referenced by NIImporter_SUMO::_loadNetwork(), NIImporter_SUMO::addEdge(), NIXMLEdgesHandler::addEdge(), NLBuilder::build(), OptionsParser::check(), RODUAFrame::checkOptions(), NBFrame::checkOptions(), NIFrame::checkOptions(), NBNetBuilder::compute(), main(), GNEApplicationWindow::onCmdSaveNetwork(), GNEApplicationWindow::onCmdSaveSumoConfig(), OptionsParser::processNonBooleanSingleSwitch(), GNEEdge::setAttribute(), setByRootElement(), GNENetDiffTool::setCurrentValues(), setDefault(), GNELoadThread::setDefaultOptions(), GNEApplicationWindow::setInputInSumoOptions(), OptionsLoader::setSecure(), GNEViewNetHelper::TimeFormat::switchTimeFormat(), and NWWriter_SUMO::writeNetwork().
void OptionsCont::setAdditionalHelpMessage | ( | const std::string & | add | ) |
Sets an additional message to be printed at the begin of the help screen.
[in] | example | Some additional information about how to use the application |
Definition at line 560 of file OptionsCont.cpp.
References myAdditionalMessage.
Referenced by fillOptions().
void OptionsCont::setApplicationDescription | ( | const std::string & | appDesc | ) |
Sets the application description.
[in] | appDesc | A description of the application |
Definition at line 548 of file OptionsCont.cpp.
References myAppDescription.
Referenced by main(), and main().
void OptionsCont::setApplicationName | ( | const std::string & | appName, |
const std::string & | fullName | ||
) |
Sets the application name.
[in] | name | The name of the excutable |
[in] | v | The name of the executable with version information |
Definition at line 540 of file OptionsCont.cpp.
References myAppName, and myFullName.
Referenced by LIBSUMO_NAMESPACE::Simulation::load(), main(), and main().
bool OptionsCont::setByRootElement | ( | const std::string & | name, |
const std::string & | value | ||
) |
Sets the given value for the option which can handle the given XML root.
The option is retrieved from the container, which yields in an InvalidArgument exception if no option is registered for the XML root. Then it uses the standard set method.
[in] | root | The name of the XML root element to look for |
[in] | value | The value to set |
InvalidArgument | If the root element was not registered or the value could not be set |
Definition at line 279 of file OptionsCont.cpp.
References myXMLDefaults, and set().
Referenced by GUILoadThread::run().
bool OptionsCont::setDefault | ( | const std::string & | name, |
const std::string & | value | ||
) |
Sets the given value for the named option as new default value.
The option is retrieved from the container, first, what yields in a InvalidArgument exception for not known options.
If the option is not writable (was set before), an error is generated using reportDoubleSetting, and false is returned. Otherwise, the option is told to set the given value using Option::set. Possible problems herein are caught and reported to the error-handler, yielding in returning false.
If the new value could be set, true is returned.
[in] | name | The name of the option to set |
[in] | value | The value to set |
InvalidArgument | If the option does not exist |
Definition at line 268 of file OptionsCont.cpp.
References getSecure(), Option::isWriteable(), Option::resetDefault(), and set().
Referenced by RODUAFrame::checkOptions(), ROJTRFrame::checkOptions(), MSFrame::checkOptions(), NBFrame::checkOptions(), NIFrame::checkOptions(), NWFrame::checkOptions(), SystemFrame::checkOptions(), main(), and GUILoadThread::run().
void OptionsCont::setFurtherAttributes | ( | const std::string & | name, |
const std::string & | subtopic, | ||
bool | required, | ||
bool | positional, | ||
const std::string & | listSep | ||
) |
mark option as required
Tries to retrieve the named option and set as required. Adds the name to the list of option names to be located in the named subtopic.
Throws an InvalidArgument if the option is not known
[in] | name | The option's name |
[in] | subtopic | The subtopic to locate the description within |
InvalidArgument | If none of the synonymes or both synonymes with different options were registered before |
Definition at line 521 of file OptionsCont.cpp.
References getSecure(), mySubTopics, Option::setListSeparator(), Option::setPositional(), and Option::setRequired().
Referenced by TemplateHandler::addOption().
|
private |
Writes the given string 'formatted'.
The given string is split so that no word-wrapping occurs at line ends. The text is wrapped at ';' or ' '.
[in] | os | The stream to write the text into |
[in] | what | The text to write |
[in] | offset | ? |
[in] | nextOffset | ? |
Definition at line 585 of file OptionsCont.cpp.
Referenced by printHelp(), and printHelpOnTopic().
void OptionsCont::writeConfiguration | ( | std::ostream & | os, |
const bool | filled, | ||
const bool | complete, | ||
const bool | addComments, | ||
const std::string & | relativeTo = "" , |
||
const bool | forceRelative = false , |
||
const bool | inComment = false |
||
) | const |
Writes the configuration.
The configuration is written as XML into the given stream, allowing to reload it on a next run.
[in] | os | The stream to write the configuration into |
[in] | filled | Whether only set (and not default) options shall be written |
[in] | complete | Whether all options shall be written |
[in] | addComments | Whether comments (option descriptions) shall be written |
[in] | inComment | Whether – in input shall be converted to -- (semantically equivalent but allowed in XML comments) |
Definition at line 884 of file OptionsCont.cpp.
References StringUtils::escapeXML(), FileHelpers::fixRelative(), getBool(), Option::getDescription(), getSecure(), getSynonymes(), Option::getTypeName(), Option::getValueString(), StringTokenizer::getVector(), Option::isDefault(), Option::isFileName(), Option::isSet(), joinToString(), myAppName, mySubTopicEntries, mySubTopics, StringUtils::startsWith(), StringUtils::to_lower_case(), StringUtils::urlEncode(), and writeXMLHeader().
Referenced by GUIApplicationWindow::onCmdSaveConfig(), GNEOptionsDialog::onCmdSaveOptions(), GNEApplicationWindow::onCmdSaveSumoConfig(), processMetaOptions(), PCPolyContainer::writeDlrTDPHeader(), NWWriter_DlrNavteq::writeHeader(), and writeXMLHeader().
void OptionsCont::writeSchema | ( | std::ostream & | os | ) |
Writes the xml schema for the configuration.
The schema for the configuration is written as XML into the given stream, allowing to validate the configuration against.
[in] | os | The stream to write the schema into |
Definition at line 971 of file OptionsCont.cpp.
References getSecure(), Option::getTypeName(), myAppName, mySubTopicEntries, mySubTopics, StringUtils::to_lower_case(), and writeXMLHeader().
Referenced by processMetaOptions().
void OptionsCont::writeXMLHeader | ( | std::ostream & | os, |
const bool | includeConfig = true |
||
) | const |
Writes a standard XML header, including the configuration.
The header consists of the xml-declaration with encoding as defined by SUMOSAXAttributes::ENCODING, followed by a note which contains the current date and time and the application configuration (set values).
[in] | os | The stream to write the header into |
Definition at line 1018 of file OptionsCont.cpp.
References SUMOSAXAttributes::ENCODING, getBool(), myFullName, and writeConfiguration().
Referenced by writeConfiguration(), PlainXMLFormatter::writeHeader(), writeSchema(), and PlainXMLFormatter::writeXMLHeader().
|
friend |
Output operator.
Generates the output used when current option values shall be printed.
[in] | os | The stream to write into |
[in] | oc | The options to print |
Definition at line 315 of file OptionsCont.cpp.
|
static |
empty option container
Definition at line 96 of file OptionsCont.h.
|
private |
Definition at line 717 of file OptionsCont.h.
Referenced by printHelp(), and setAdditionalHelpMessage().
|
private |
option-adresses
Definition at line 711 of file OptionsCont.h.
Referenced by begin(), clear(), doRegister(), end(), isEmpty(), relocateFiles(), resetDefault(), and resetWritable().
|
private |
Definition at line 717 of file OptionsCont.h.
Referenced by printHelp(), and setApplicationDescription().
|
private |
some information on the application
Definition at line 717 of file OptionsCont.h.
Referenced by printHelp(), setApplicationName(), writeConfiguration(), and writeSchema().
|
private |
list of call examples
Definition at line 720 of file OptionsCont.h.
Referenced by addCallExample(), and printHelp().
|
private |
Definition at line 723 of file OptionsCont.h.
Referenced by addCopyrightNotice(), clearCopyrightNotices(), OptionsCont(), and processMetaOptions().
|
mutableprivate |
A map from deprecated options to a bool indicating whether we warned about deprecation.
Definition at line 732 of file OptionsCont.h.
Referenced by addSynonyme(), getSecure(), printHelp(), and printHelpOnTopic().
|
private |
Definition at line 717 of file OptionsCont.h.
Referenced by getFullName(), processMetaOptions(), setApplicationName(), and writeXMLHeader().
|
staticprivate |
The static options container used.
Definition at line 708 of file OptionsCont.h.
Referenced by getOptions().
|
private |
A map from subtopic to option.
Definition at line 726 of file OptionsCont.h.
Referenced by addDescription(), addOptionSubTopic(), clear(), getSecure(), getSubTopicsEntries(), printHelp(), printHelpOnTopic(), writeConfiguration(), and writeSchema().
|
private |
lists of option subtopics and copyright notices
Definition at line 723 of file OptionsCont.h.
Referenced by addDescription(), addOptionSubTopic(), clear(), getSubTopics(), printHelp(), setFurtherAttributes(), writeConfiguration(), and writeSchema().
|
private |
option maps sorted by name (for adresses AND their synonyms)
Definition at line 714 of file OptionsCont.h.
Referenced by addSynonyme(), checkDependingSuboptions(), clear(), doRegister(), exists(), getSecure(), getSynonymes(), isDefault(), and isSet().
|
private |
A map from XML root element to option.
Definition at line 729 of file OptionsCont.h.
Referenced by addXMLDefault(), and setByRootElement().