Eclipse SUMO - Simulation of Urban MObility
|
An upper class for objects with additional parameters. More...
#include <Parameterised.h>
Inherited by GNEAccess, GNECalibrator, GNEDataInterval, GNEDataSet, GNEDetector, GNEEdgeType, GNEGenericData, GNELaneType, GNEMultiEntryExitDetector, GNEOverheadWire, GNEParkingSpace, GNEPersonTrip, GNERerouter, GNERide, GNERoute, GNERouteProbe, GNEStopPlan, GNEStoppingPlace, GNETAZSourceSink, GNETractionSubstation, GNETranship, GNETransport, GNEVaporizer, GNEVariableSpeedSign, GNEWalk, MSDetectorFileOutput, MSDispatch, MSEdge, MSJunction, MSLane, MSNet, MSRailSignalConstraint, MSRoute, MSSOTLPolicy, MSSOTLPolicyDesirability, MSStage, MSStoppingPlace, MSTrafficLightLogic, NBEdge, NBEdge::Connection, NBEdge::Lane, NBNode, NBNode::Crossing, NBPTStop, NBTrafficLightDefinition, NBTrafficLightLogic, NIImporter_OpenStreetMap::Edge, NIImporter_OpenStreetMap::NIOSMNode, NIImporter_SUMO::Connection, NIImporter_SUMO::Crossing, NIImporter_SUMO::EdgeAttrs, NIImporter_SUMO::LaneAttrs, NLDetectorBuilder::E3DetectorDefinition, PointOfInterest, ROEdge, ROPerson::PlanItem, SUMOPolygon, SUMOVTypeParameter, SUMOVehicleParameter, and SUMOVehicleParameter::Stop.
Public Types | |
typedef std::map< std::string, std::string > | Map |
parameters map | |
Public Member Functions | |
void | clearParameter () |
Clears the parameter map. | |
double | getDouble (const std::string &key, const double defaultValue) const |
Returns the value for a given key converted to a double. | |
std::vector< double > | getDoubles (const std::string &key, std::vector< double > defaultValue=std::vector< double >()) const |
Returns the value for a given key converted to a list of doubles. | |
virtual const std::string | getParameter (const std::string &key, const std::string defaultValue="") const |
Returns the value for a given key. | |
const Parameterised::Map & | getParametersMap () const |
Returns the inner key/value map. | |
std::string | getParametersStr (const std::string kvsep="=", const std::string sep="|") const |
Returns the inner key/value map in string format "key1=value1|key2=value2|...|keyN=valueN". | |
bool | hasParameter (const std::string &key) const |
Returns whether the parameter is set. | |
void | mergeParameters (const Parameterised::Map &mapArg, const std::string separator=" ", bool uniqueValues=true) |
Adds or appends all given parameters from the map. | |
Parameterised () | |
Default constructor. | |
Parameterised (const Parameterised::Map &mapArg) | |
Constructor with parameters (for Strings) | |
virtual void | setParameter (const std::string &key, const std::string &value) |
Sets a parameter. | |
void | setParameters (const Parameterised ¶ms) |
set the inner key/value map in map<string, string> format | |
void | setParametersStr (const std::string ¶msString, const std::string kvsep="=", const std::string sep="|") |
set the inner key/value map in string format "key1=value1|key2=value2|...|keyN=valueN" | |
void | unsetParameter (const std::string &key) |
Removes a parameter. | |
void | updateParameters (const Parameterised::Map &mapArg) |
Adds or updates all given parameters from the map. | |
void | writeParams (OutputDevice &device) const |
write Params in the given outputdevice | |
virtual | ~Parameterised () |
Destructor. | |
Static Public Member Functions | |
static bool | areAttributesValid (const std::string &value, bool report=false, const std::string kvsep="=", const std::string sep="|") |
check if given string can be parsed to an attributes map "key1=value1|key2=value2|...|keyN=valueN" (used in generic datas) | |
static bool | areParametersValid (const std::string &value, bool report=false, const std::string kvsep="=", const std::string sep="|") |
check if given string can be parsed to a parameters map "key1=value1|key2=value2|...|keyN=valueN" | |
Static Private Member Functions | |
static bool | isParameterValid (const std::string &value, const std::string &kvsep, const std::string &sep) |
check if given string can be parsed to a parameter of type "key=value" | |
Private Attributes | |
Parameterised::Map | myMap |
The key->value map. | |
An upper class for objects with additional parameters.
Definition at line 41 of file Parameterised.h.
typedef std::map<std::string, std::string> Parameterised::Map |
parameters map
Definition at line 45 of file Parameterised.h.
Parameterised::Parameterised | ( | ) |
Default constructor.
Definition at line 33 of file Parameterised.cpp.
Parameterised::Parameterised | ( | const Parameterised::Map & | mapArg | ) |
Constructor with parameters (for Strings)
[in] | mapArg | Pre-given parameter |
Definition at line 36 of file Parameterised.cpp.
|
virtual |
Destructor.
Definition at line 41 of file Parameterised.cpp.
|
static |
check if given string can be parsed to an attributes map "key1=value1|key2=value2|...|keyN=valueN" (used in generic datas)
Definition at line 219 of file Parameterised.cpp.
References StringTokenizer::getVector(), isParameterValid(), TL, and WRITE_WARNINGF.
Referenced by GNEFrameAttributeModules::GenericDataAttributes::areAttributesValid(), GNEEdgeData::isValid(), GNEEdgeRelData::isValid(), and GNETAZRelData::isValid().
|
static |
check if given string can be parsed to a parameters map "key1=value1|key2=value2|...|keyN=valueN"
Definition at line 200 of file Parameterised.cpp.
References StringTokenizer::getVector(), isParameterValid(), TL, and WRITE_WARNINGF.
Referenced by GNEDetector::isDetectorValid(), GNEAccess::isValid(), GNEBusStop::isValid(), GNECalibrator::isValid(), GNECalibratorFlow::isValid(), GNEChargingStation::isValid(), GNEContainerStop::isValid(), GNEMultiEntryExitDetector::isValid(), GNEOverheadWire::isValid(), GNEParkingArea::isValid(), GNEParkingSpace::isValid(), GNERerouter::isValid(), GNERouteProbe::isValid(), GNETAZ::isValid(), GNETAZSourceSink::isValid(), GNETractionSubstation::isValid(), GNEVaporizer::isValid(), GNEVariableSpeedSign::isValid(), GNEContainer::isValid(), GNEPerson::isValid(), GNERoute::isValid(), GNEStop::isValid(), GNEVehicle::isValid(), GNEVType::isValid(), GNEConnection::isValid(), GNECrossing::isValid(), GNEEdge::isValid(), GNEEdgeType::isValid(), GNEJunction::isValid(), GNELane::isValid(), GNELaneType::isValid(), GNEPOI::isValid(), GNEPoly::isValid(), GNETLSEditorFrame::TLSAttributes::isValidParameters(), and GNEFrameAttributeModules::GenericDataAttributes::onCmdSetParameters().
void Parameterised::clearParameter | ( | ) |
Clears the parameter map.
Definition at line 139 of file Parameterised.cpp.
References myMap.
Referenced by NLHandler::beginEdgeParsing(), and GNESingleParametersDialog::onCmdAccept().
double Parameterised::getDouble | ( | const std::string & | key, |
const double | defaultValue | ||
) | const |
Returns the value for a given key converted to a double.
[in] | key | The key to ask for |
[in] | defaultValue | The default value to return if no value is stored under the key |
Definition at line 100 of file Parameterised.cpp.
References myMap, TL, StringUtils::toDouble(), WRITE_WARNING, and WRITE_WARNINGF.
Referenced by MSPModel_JuPedSim::add(), MSVehicleType::build(), MSVehicleType::check(), EnergyParams::EnergyParams(), MSSOTLPolicy5DStimulus::getStimCox(), MSSOTLPolicy5DStimulus::getStimCoxExpDispersionIn(), MSSOTLPolicy5DStimulus::getStimCoxExpDispersionOut(), MSSOTLPolicy5DStimulus::getStimCoxExpIn(), MSSOTLPolicy5DStimulus::getStimCoxExpOut(), MSSOTLPolicy5DStimulus::getStimDivisorDispersionIn(), MSSOTLPolicy5DStimulus::getStimDivisorDispersionOut(), MSSOTLPolicy5DStimulus::getStimDivisorIn(), MSSOTLPolicy5DStimulus::getStimDivisorOut(), MSSOTLPolicy5DStimulus::getStimOffsetDispersionIn(), MSSOTLPolicy5DStimulus::getStimOffsetDispersionOut(), MSSOTLPolicy5DStimulus::getStimOffsetIn(), MSSOTLPolicy5DStimulus::getStimOffsetOut(), MSActuatedTrafficLightLogic::init(), MSDevice_ElecHybrid::MSDevice_ElecHybrid(), MSSOTLPolicy5DFamilyStimulus::MSSOTLPolicy5DFamilyStimulus(), and MSDevice_Battery::readParameterValue().
std::vector< double > Parameterised::getDoubles | ( | const std::string & | key, |
std::vector< double > | defaultValue = std::vector<double>() |
||
) | const |
Returns the value for a given key converted to a list of doubles.
[in] | key | The key to ask for |
[in] | defaultValue | The default value to return if no value is stored under the key |
Definition at line 118 of file Parameterised.cpp.
References StringTokenizer::getVector(), myMap, TL, StringUtils::toDouble(), WRITE_WARNING, and WRITE_WARNINGF.
Referenced by EnergyParams::EnergyParams().
|
virtual |
Returns the value for a given key.
[in] | key | The key to ask for |
[in] | defaultValue | The default value to return if no value is stored under the key |
Reimplemented in MSActuatedTrafficLightLogic, MSSimpleTrafficLightLogic, and NEMALogic.
Definition at line 90 of file Parameterised.cpp.
References myMap.
Referenced by MSPModel_JuPedSim::add(), NBRailwayTopologyAnalyzer::addBidiEdge(), NBEdge::addRestrictedLane(), FareModul::addStop(), GUIInductLoop::buildDetectorGUIRepresentation(), MSDevice_ElecHybrid::buildVehicleDevices(), MSDevice_Example::buildVehicleDevices(), ROEdge::cacheParamRestrictions(), SUMOVTypeParameter::cacheParamRestrictions(), MSVehicleType::check(), MSRailSignal::constraintsAllow(), GUINet::createTLWrapper(), GNEEdge::drawEdgeName(), GNEConnection::drawEdgeValues(), GNEGenericData::drawFilteredAttribute(), GUIEdge::drawGL(), EnergyParams::EnergyParams(), MSDevice_SSM::filterByConflictType(), LIBSUMO_NAMESPACE::TrafficLight::findConstraintsDeadLocks(), LIBSUMO_NAMESPACE::Simulation::findIntermodalRoute(), GUIVehicle::getColorValue(), GNEEdgeData::getColorValue(), GNEEdgeRelData::getColorValue(), GNETAZRelData::getColorValue(), GNELane::getColorValue(), GUIEdge::getColorValue(), GUILane::getColorValue(), MSDevice_SSM::getDetectionRange(), MSDevice_SSM::getExtraTime(), LIBSUMO_NAMESPACE::TrafficLight::getFutureTripIds(), MSTLLogicControl::WAUTSwitchProcedure::getGSPTime(), RORoutable::getMaxSpeed(), MSDevice_SSM::getMDRAC_PRT(), MSDevice_SSM::getMeasuresAndThresholds(), MSSOTLRequestPolicy::getMinDecisionalPhaseDuration(), GUIBaseVehicle::getOptionalName(), GUITrafficLightLogicWrapper::getOptionalName(), MSDevice_SSM::getOutputFilename(), MSSimpleTrafficLightLogic::getParameter(), NEMALogic::getParameter(), LIBSUMO_NAMESPACE::Simulation::getParameter(), MSBaseVehicle::getPrefixedParameter(), GUIBaseVehicle::getScaleValue(), LIBSUMO_NAMESPACE::Vehicle::getStopParameter(), SUMOTrafficObject::getStringParam(), MSRailSignalConstraint::getVeh(), LIBSUMO_NAMESPACE::TrafficLight::getVehicleByTripId(), MSStoppingPlaceRerouter::getWeight(), MSRailSignal::hasInsertionConstraint(), MSRailSignalControl::haveDeadlock(), MSLink::ignoreFoe(), MSSOTLPhasePolicy::init(), MSStageDriving::init(), PushButtonLogic::init(), SigmoidLogic::init(), SUMOVTypeParameter::initRailVisualizationParameters(), NIImporter_OpenStreetMap::insertNodeChecking(), MSAbstractLaneChangeModel::laneChangeOutput(), NWWriter_OpenDrive::mapmatchRoadObjects(), mergeParameters(), MSSimpleTrafficLightLogic::MSSimpleTrafficLightLogic(), MSSOTLPolicy::MSSOTLPolicy(), MSSOTLPolicy5DFamilyStimulus::MSSOTLPolicy5DFamilyStimulus(), MSDevice_GLOSA::notifyEnter(), MSRailSignalConstraint_Predecessor::PassedTracker::notifyEnter(), GNEVType::overwriteVType(), NWWriter_OpenDrive::parseTrafficSign(), NBTrafficLightDefinition::railSignalUncontrolled(), MSDevice_Battery::readParameterValue(), MSDevice_SSM::requestsTrajectories(), MSDevice_Bluelight::resetVehicle(), GNEEdgeData::setColor(), GNEEdgeRelData::setColor(), NBTrafficLightLogicCont::setOpenDriveSignalParameters(), NBEdge::setOrigID(), MSVehicle::slowDownForSchedule(), NBEdgeCont::splitAt(), LIBSUMO_NAMESPACE::TrafficLight::swapParameters(), LIBSUMO_NAMESPACE::TrafficLight::updateConstraints(), MSDevice_SSM::useGeoCoords(), MSTLLogicControl::WAUTSwitchProcedure_Stretch::WAUTSwitchProcedure_Stretch(), MSDevice_SSM::writeLanesPositions(), NWWriter_DlrNavteq::writeLinksUnsplitted(), MSDevice_SSM::writePositions(), NWWriter_OpenDrive::writeRoadObjectPOI(), NWWriter_OpenDrive::writeRoadObjectPoly(), NWWriter_OpenDrive::writeRoadObjects(), and NWWriter_OpenDrive::writeSignals().
const Parameterised::Map & Parameterised::getParametersMap | ( | ) | const |
Returns the inner key/value map.
Definition at line 145 of file Parameterised.cpp.
References myMap.
Referenced by NIImporter_SUMO::_loadNetwork(), NBNode::addCrossing(), NBEdge::addLane(), NBEdge::append(), LIBSUMO_NAMESPACE::TrafficLight::buildConstraint(), GUIParameterTableWindow::closeBuilding(), NLHandler::closeEdge(), NBTrafficLightDefinition::compute(), GNEGenericData::drawAttribute(), GNEGenericData::drawFilteredAttribute(), NLDetectorBuilder::endE3Detector(), GNEAccess::getACParametersMap(), GNECalibrator::getACParametersMap(), GNEDetector::getACParametersMap(), GNEMultiEntryExitDetector::getACParametersMap(), GNEOverheadWire::getACParametersMap(), GNEParkingSpace::getACParametersMap(), GNERerouter::getACParametersMap(), GNERouteProbe::getACParametersMap(), GNEStoppingPlace::getACParametersMap(), GNETAZ::getACParametersMap(), GNEVaporizer::getACParametersMap(), GNEVariableSpeedSign::getACParametersMap(), GNEDataInterval::getACParametersMap(), GNEDataSet::getACParametersMap(), GNEGenericData::getACParametersMap(), GNEContainer::getACParametersMap(), GNEPerson::getACParametersMap(), GNEPersonTrip::getACParametersMap(), GNERide::getACParametersMap(), GNERoute::getACParametersMap(), GNEStop::getACParametersMap(), GNEStopPlan::getACParametersMap(), GNETranship::getACParametersMap(), GNETransport::getACParametersMap(), GNEVehicle::getACParametersMap(), GNEVType::getACParametersMap(), GNEWalk::getACParametersMap(), GNEConnection::getACParametersMap(), GNECrossing::getACParametersMap(), GNEEdge::getACParametersMap(), GNEEdgeType::getACParametersMap(), GNEJunction::getACParametersMap(), GNELane::getACParametersMap(), GNELaneType::getACParametersMap(), GNEPOI::getACParametersMap(), GNEPoly::getACParametersMap(), MSRailSignalConstraint_Predecessor::getDescription(), NWWriter_OpenDrive::getDividerType(), GUILane::getParameterWindow(), GNESingleParametersDialog::GNESingleParametersDialog(), MSRailCrossing::init(), MSActuatedTrafficLightLogic::init(), MSDevice_Taxi::initDispatch(), MSPModel_JuPedSim::initialize(), MSBaseVehicle::initTransientModelParams(), NIImporter_OpenStreetMap::insertEdge(), NIImporter_OpenStreetMap::insertNodeChecking(), GNEEdgeData::isGenericDataVisible(), GNEEdgeRelData::isGenericDataVisible(), GNETAZRelData::isGenericDataVisible(), GNEGenericData::isVisibleInspectDeleteSelect(), NBEdge::NBEdge(), NBLoadedSUMOTLDef::NBLoadedSUMOTLDef(), NBTrafficLightLogic::NBTrafficLightLogic(), GUIParameterTableWindow::numParams(), GNESingleParametersDialog::onCmdReset(), GNEVType::overwriteVType(), TraCIServerAPI_TrafficLight::processGet(), setParameters(), LIBSUMO_NAMESPACE::TrafficLight::swapConstraints(), GNEEdgeData::writeGenericData(), GNEEdgeRelData::writeGenericData(), and GNETAZRelData::writeGenericData().
std::string Parameterised::getParametersStr | ( | const std::string | kvsep = "=" , |
const std::string | sep = "|" |
||
) | const |
Returns the inner key/value map in string format "key1=value1|key2=value2|...|keyN=valueN".
Definition at line 151 of file Parameterised.cpp.
References myMap.
Referenced by GNEAccess::getAttribute(), GNEBusStop::getAttribute(), GNECalibrator::getAttribute(), GNECalibratorFlow::getAttribute(), GNEChargingStation::getAttribute(), GNEContainerStop::getAttribute(), GNEMultiEntryExitDetector::getAttribute(), GNEOverheadWire::getAttribute(), GNEParkingArea::getAttribute(), GNEParkingSpace::getAttribute(), GNERerouter::getAttribute(), GNERouteProbe::getAttribute(), GNETAZ::getAttribute(), GNETAZSourceSink::getAttribute(), GNETractionSubstation::getAttribute(), GNEVaporizer::getAttribute(), GNEVariableSpeedSign::getAttribute(), GNEEdgeData::getAttribute(), GNEEdgeRelData::getAttribute(), GNETAZRelData::getAttribute(), GNEContainer::getAttribute(), GNEPerson::getAttribute(), GNERoute::getAttribute(), GNEStop::getAttribute(), GNEVehicle::getAttribute(), GNEVType::getAttribute(), GNEConnection::getAttribute(), GNEEdge::getAttribute(), GNEEdgeType::getAttribute(), GNEJunction::getAttribute(), GNELane::getAttribute(), GNELaneType::getAttribute(), GNEPOI::getAttribute(), GNEPoly::getAttribute(), and GNEDetector::getDetectorAttribute().
bool Parameterised::hasParameter | ( | const std::string & | key | ) | const |
Returns whether the parameter is set.
[in] | key | The key to ask for |
Definition at line 84 of file Parameterised.cpp.
References myMap.
Referenced by MSStageWalking::activateEntryReminders(), NBEdge::append(), MSVehicleType::build(), GUIInductLoop::buildDetectorGUIRepresentation(), MSDevice_ElecHybrid::buildVehicleDevices(), MSDevice_Example::buildVehicleDevices(), GUINet::createTLWrapper(), EnergyParams::EnergyParams(), MSDevice_SSM::filterByConflictType(), NWWriter_DlrNavteq::getBrunnelType(), GNEEdgeData::getColorValue(), GNEEdgeRelData::getColorValue(), GNETAZRelData::getColorValue(), GNELane::getColorValue(), GUILane::getColorValue(), MSDevice_SSM::getDetectionRange(), MSDevice_SSM::getExtraTime(), MSDevice_SSM::getMDRAC_PRT(), MSDevice_SSM::getMeasuresAndThresholds(), MSDevice_SSM::getOutputFilename(), LIBSUMO_NAMESPACE::Simulation::getParameter(), MSStoppingPlaceRerouter::getWeight(), MSStageDriving::init(), SUMOVTypeParameter::initRailVisualizationParameters(), MSEdge::insertVehicle(), NIImporter_OpenStreetMap::load(), NWWriter_OpenDrive::mapmatchRoadObjects(), mergeParameters(), MSActuatedTrafficLightLogic::MSActuatedTrafficLightLogic(), MSSimpleTrafficLightLogic::MSSimpleTrafficLightLogic(), GNEVType::overwriteVType(), NWWriter_OpenDrive::parseTrafficSign(), NBTrafficLightDefinition::railSignalUncontrolled(), MSDevice_Battery::readParameterValue(), MSDevice_SSM::requestsTrajectories(), NBTrafficLightLogicCont::setOpenDriveSignalParameters(), MSVehicle::slowDownForSchedule(), MSDevice_SSM::useGeoCoords(), MSTLLogicControl::WAUTSwitchProcedure_Stretch::WAUTSwitchProcedure_Stretch(), MSDevice_SSM::writeLanesPositions(), MSDevice_SSM::writePositions(), NWWriter_OpenDrive::writeRoadObjectPoly(), NWWriter_OpenDrive::writeRoadObjects(), and NWWriter_OpenDrive::writeSignals().
|
staticprivate |
check if given string can be parsed to a parameter of type "key=value"
Definition at line 254 of file Parameterised.cpp.
References StringTokenizer::getVector(), and SUMOXMLDefinitions::isValidParameterKey().
Referenced by areAttributesValid(), and areParametersValid().
void Parameterised::mergeParameters | ( | const Parameterised::Map & | mapArg, |
const std::string | separator = " " , |
||
bool | uniqueValues = true |
||
) |
Adds or appends all given parameters from the map.
[in] | mapArg | The keys/values to insert |
Definition at line 65 of file Parameterised.cpp.
References getParameter(), hasParameter(), and setParameter().
Referenced by NBEdge::append().
|
virtual |
Sets a parameter.
[in] | key | The parameter's name |
[in] | value | The parameter's value |
Reimplemented in MSRailCrossing, MSActuatedTrafficLightLogic, MSRailSignal, MSSimpleTrafficLightLogic, and NEMALogic.
Definition at line 45 of file Parameterised.cpp.
References myMap.
Referenced by NBRailwayTopologyAnalyzer::addBidiEdge(), NLHandler::addDistrict(), RONetHandler::addParam(), ShapeHandler::addPOI(), NBOwnTLDef::buildNemaPhases(), MSParkingArea::enter(), NIImporter_MATSim::EdgesHandler::insertEdge(), NIImporter_OpenStreetMap::insertEdge(), NIImporter_OpenStreetMap::insertNodeChecking(), MSLane::isInsertionSuccess(), NBNodeCont::joinNodeCluster(), NBEdge::Lane::Lane(), NWWriter_OpenDrive::mapmatchRoadObjects(), mergeParameters(), MSStateHandler::myStartElement(), NIXMLConnectionsHandler::myStartElement(), NIXMLNodesHandler::myStartElement(), NIXMLTrafficLightsHandler::myStartElement(), ShapeHandler::myStartElement(), MSDevice_Bluelight::notifyMove(), GNESingleParametersDialog::onCmdAccept(), NBRailwayTopologyAnalyzer::reverseEdges(), GNEVType::setAttribute(), NBEdge::setJunctionPriority(), NIImporter_OpenDrive::setLaneAttributes(), MSRailCrossing::setParameter(), MSActuatedTrafficLightLogic::setParameter(), MSRailSignal::setParameter(), MSSimpleTrafficLightLogic::setParameter(), NEMALogic::setParameter(), LIBSUMO_NAMESPACE::Simulation::setParameter(), setParametersStr(), LIBSUMO_NAMESPACE::Vehicle::setStopParameter(), LIBSUMO_NAMESPACE::TrafficLight::swapParameters(), updateParameters(), NWWriter_OpenDrive::writeNetwork(), and NIImporter_OpenDrive::writeRoadObjects().
void Parameterised::setParameters | ( | const Parameterised & | params | ) |
set the inner key/value map in map<string, string> format
Definition at line 167 of file Parameterised.cpp.
References getParametersMap(), and myMap.
Referenced by MSStageDriving::clone(), MSStageTranship::clone(), MSStageTrip::clone(), MSStageWaiting::clone(), MSStageWalking::clone(), and MSStageTrip::reroute().
void Parameterised::setParametersStr | ( | const std::string & | paramsString, |
const std::string | kvsep = "=" , |
||
const std::string | sep = "|" |
||
) |
set the inner key/value map in string format "key1=value1|key2=value2|...|keyN=valueN"
[in] | paramsString | A serialized key-value map |
[in] | kvsep | The separater between key and value |
[in] | sep | The separater between map entries |
Definition at line 173 of file Parameterised.cpp.
References StringTokenizer::getVector(), myMap, and setParameter().
Referenced by MSDevice_Taxi::initDispatch(), GNEAccess::setAttribute(), GNEBusStop::setAttribute(), GNECalibrator::setAttribute(), GNECalibratorFlow::setAttribute(), GNEChargingStation::setAttribute(), GNEContainerStop::setAttribute(), GNEMultiEntryExitDetector::setAttribute(), GNEOverheadWire::setAttribute(), GNEParkingArea::setAttribute(), GNEParkingSpace::setAttribute(), GNERerouter::setAttribute(), GNERouteProbe::setAttribute(), GNETAZ::setAttribute(), GNETAZSourceSink::setAttribute(), GNETractionSubstation::setAttribute(), GNEVaporizer::setAttribute(), GNEVariableSpeedSign::setAttribute(), GNEEdgeData::setAttribute(), GNEEdgeRelData::setAttribute(), GNETAZRelData::setAttribute(), GNEContainer::setAttribute(), GNEPerson::setAttribute(), GNERoute::setAttribute(), GNEStop::setAttribute(), GNEVehicle::setAttribute(), GNEVType::setAttribute(), GNEConnection::setAttribute(), GNEEdge::setAttribute(), GNEEdgeType::setAttribute(), GNEJunction::setAttribute(), GNELane::setAttribute(), GNELaneType::setAttribute(), GNEPOI::setAttribute(), GNEPoly::setAttribute(), and GNEDetector::setDetectorAttribute().
void Parameterised::unsetParameter | ( | const std::string & | key | ) |
Removes a parameter.
[in] | key | The parameter's name |
Definition at line 51 of file Parameterised.cpp.
References myMap.
Referenced by NIImporter_OpenStreetMap::insertEdge(), MSLane::isInsertionSuccess(), NIImporter_OpenStreetMap::load(), GNEVType::setAttribute(), and LIBSUMO_NAMESPACE::TrafficLight::swapParameters().
void Parameterised::updateParameters | ( | const Parameterised::Map & | mapArg | ) |
Adds or updates all given parameters from the map.
[in] | mapArg | The keys/values to insert |
Definition at line 57 of file Parameterised.cpp.
References setParameter().
Referenced by NIImporter_SUMO::_loadNetwork(), NBNode::addCrossing(), PCLoaderOSM::addPOI(), PCLoaderOSM::addPolygon(), NLHandler::closeEdge(), NLJunctionControlBuilder::closeJunction(), NLJunctionControlBuilder::closeTrafficLightLogic(), NBTrafficLightDefinition::compute(), NLDetectorBuilder::endE3Detector(), NIImporter_OpenStreetMap::insertEdge(), NIImporter_OpenStreetMap::insertNodeChecking(), NBEdge::NBEdge(), NBLoadedSUMOTLDef::NBLoadedSUMOTLDef(), NBTrafficLightLogic::NBTrafficLightLogic(), and LIBSUMO_NAMESPACE::TrafficLight::swapConstraints().
void Parameterised::writeParams | ( | OutputDevice & | device | ) | const |
write Params in the given outputdevice
Definition at line 188 of file Parameterised.cpp.
References OutputDevice::closeTag(), StringUtils::escapeXML(), myMap, OutputDevice::openTag(), SUMO_ATTR_KEY, SUMO_ATTR_VALUE, SUMO_TAG_PARAM, and OutputDevice::writeAttr().
Referenced by MSStageWaiting::routeOutput(), MSTransportable::routeOutput(), ROPerson::saveAsXML(), ROVehicle::saveAsXML(), MEVehicle::saveState(), MSVehicle::saveState(), MSStop::write(), SUMOVTypeParameter::write(), SUMOVehicleParameter::Stop::write(), NBPTStop::write(), MSRailSignalConstraint_Predecessor::write(), GNEBusStop::writeAdditional(), GNECalibrator::writeAdditional(), GNECalibratorFlow::writeAdditional(), GNEChargingStation::writeAdditional(), GNEContainerStop::writeAdditional(), GNEEntryExitDetector::writeAdditional(), GNEInductionLoopDetector::writeAdditional(), GNEInstantInductionLoopDetector::writeAdditional(), GNELaneAreaDetector::writeAdditional(), GNEMultiEntryExitDetector::writeAdditional(), GNEOverheadWire::writeAdditional(), GNEParkingArea::writeAdditional(), GNEParkingSpace::writeAdditional(), GNERerouter::writeAdditional(), GNERouteProbe::writeAdditional(), GNETAZ::writeAdditional(), GNETractionSubstation::writeAdditional(), GNEVaporizer::writeAdditional(), GNEVariableSpeedSign::writeAdditional(), NWWriter_SUMO::writeConnection(), GNEContainer::writeDemandElement(), GNEPerson::writeDemandElement(), GNERoute::writeDemandElement(), GNEVehicle::writeDemandElement(), NWWriter_SUMO::writeEdge(), NWWriter_XML::writeEdgesAndConnections(), NWWriter_SUMO::writeJunction(), NWWriter_SUMO::writeLane(), NWWriter_XML::writeNodes(), MSDevice_Vehroutes::writeOutput(), NWWriter_SUMO::writeTrafficLight(), SUMOPolygon::writeXML(), and PointOfInterest::writeXML().
|
private |
The key->value map.
Definition at line 139 of file Parameterised.h.
Referenced by clearParameter(), getDouble(), getDoubles(), getParameter(), getParametersMap(), getParametersStr(), hasParameter(), setParameter(), setParameters(), setParametersStr(), unsetParameter(), and writeParams().