![]() |
SUMO - Simulation of Urban MObility
|
#include <TplConvert.h>
Static Public Member Functions | |
template<class E > | |
static int | getLength (const E *const data) |
returns the length of the string (the position of the 0-character) More... | |
Conversion of basic types and data arrays to String | |
static std::string | _2str (const int var) |
convert int to string More... | |
static std::string | _2str (const double var) |
convert double to string More... | |
static std::string | _2str (const bool var) |
convert bool to string More... | |
template<class E > | |
static std::string | _2str (const E *const data) |
converts a 0-terminated char-type array into std::string More... | |
static std::string | _2str (const char *const data) |
converts a 0-terminated char array into std::string More... | |
template<class E > | |
static std::string | _2str (const E *const data, int length) |
converts a char-type array into std::string considering the given length More... | |
*static std::string | _2str (const char *const data, int length) |
converts a char array into std::string considering the given length More... | |
template<class E > | |
static std::string | _2strSec (const E *const data, const std::string &def) |
converts a 0-terminated char-type array into std::string More... | |
template<class E > | |
static std::string | _2strSec (const E *const data, int length, const std::string &def) |
converts a char-type array into std::string considering the given length More... | |
Conversion to basic type int | |
template<class E > | |
static int | _2int (const E *const data) |
converts a char-type array into the integer value described by it More... | |
static int | _str2int (const std::string &sData) |
converts a string into the integer value described by it by calling the char-type converter, which More... | |
template<class E > | |
static int | _hex2int (const E *const data) |
converts a char-type array with a hex value into the integer value described by it More... | |
static int | _strHex2int (const std::string &sData) |
converts a string with a hex value into the integer value described by it by calling the char-type converter More... | |
template<class E > | |
static int | _2intSec (const E *const data, int def) |
converts a 0-terminated char-type array into the integer value described by it More... | |
Conversion to basic type long integer (at least 64 bit) | |
template<class E > | |
static long long int | _2long (const E *const data) |
converts a char-type array into the long value described by it More... | |
static long long int | _str2long (const std::string &sData) |
converts a string into the long value described by it by calling the char-type converter, which More... | |
template<class E > | |
static long long int | _hex2long (const E *const data) |
converts a char-type array with a hex value into the long value described by it More... | |
template<class E > | |
static long long int | _2longSec (const E *const data, long def) |
converts a 0-terminated char-type array into the long value described by it More... | |
Conversion to basic type double (Double) | |
template<class E > | |
static double | _2double (const E *const data) |
converts a char-type array into the double value described by it More... | |
static double | _str2double (const std::string &sData) |
converts a string into the double value described by it by calling the char-type converter More... | |
template<class E > | |
static double | _2doubleSec (const E *const data, double def) |
converts a 0-terminated char-type array into the double value described by it More... | |
Conversion to basic type bool | |
template<class E > | |
static bool | _2bool (const E *const data) |
converts a 0-terminated char-type array into the boolean value described by it More... | |
static bool | _str2Bool (const std::string &sData) |
converts a string into the bool value described by it by calling the char-type converter More... | |
template<class E > | |
*static bool | _2boolSec (const E *const data, bool def) |
converts a 0-terminated char-type array into the double value described by it More... | |
TplConvert Some methods that convert 0-terminated char-arrays of any type into other values (numerical/boolean) or into std::strings Also convert strings into any type of values (double, int, bool...)
Definition at line 52 of file TplConvert.h.
|
inlinestatic |
converts a 0-terminated char-type array into the boolean value described by it
an | EmptyData - exception if the given string is empty or 0 pointer |
a | BoolFormatException in any other case |
Definition at line 371 of file TplConvert.h.
References _2str().
Referenced by _2boolSec(), _str2Bool(), MSDevice::equippedByDefaultAssignmentOptions(), SUMOSAXAttributesImpl_Cached::getBool(), SUMOSAXAttributesImpl_Xerces::getBool(), NIImporter_VISUM::getWeightedBool(), MSSOTLTrafficLightLogic::isDecayThresholdActivated(), MSActuatedTrafficLightLogic::MSActuatedTrafficLightLogic(), MSDelayBasedTrafficLightLogic::MSDelayBasedTrafficLightLogic(), GUISettingsHandler::myStartElement(), GUIDialog_ViewSettings::onCmdEditTable(), NIImporter_VISUM::parse_Edges(), NIImporter_VISUM::parse_TrafficLights(), GUISettingsHandler::parseSizeSettings(), GUISettingsHandler::parseTextSettings(), MSDevice_SSM::requestsTrajectories(), Option_Bool::set(), and TraCI_Vehicle::setParameter().
|
inlinestatic |
converts a 0-terminated char-type array into the double value described by it
Definition at line 398 of file TplConvert.h.
References _2bool().
|
inlinestatic |
converts a char-type array into the double value described by it
an | EmptyData - exception if the given string is empty |
a | NumberFormatException - exception when the string does not contain a double |
Definition at line 297 of file TplConvert.h.
References _2int().
Referenced by _2doubleSec(), _str2double(), MSTLLogicControl::WAUTSwitchProcedure_Stretch::adaptLogic(), NBEdgeCont::applyOptions(), MSDevice_Battery::buildVehicleDevices(), MSDevice_Example::buildVehicleDevices(), MSSwarmTrafficLightLogic::getBetaNo(), MSSwarmTrafficLightLogic::getBetaSp(), SUMOSAXAttributesImpl_Cached::getBoundary(), SUMOSAXAttributesImpl_Xerces::getBoundary(), MSSwarmTrafficLightLogic::getChangePlanProbability(), MFXAddEditTypedTable::getControlForItem(), MSSOTLTrafficLightLogic::getDecayConstant(), MSDevice_SSM::getDetectionRange(), Parameterised::getDouble(), SUMOSAXAttributesImpl_Cached::getFloat(), SUMOSAXAttributesImpl_Binary::getFloat(), SUMOSAXAttributesImpl_Xerces::getFloat(), MSSwarmTrafficLightLogic::getForgettingCox(), MSSwarmTrafficLightLogic::getGammaNo(), MSSwarmTrafficLightLogic::getGammaSp(), MSSOTLTrafficLightLogic::getInputSensorsLength(), MSSwarmTrafficLightLogic::getLearningCox(), MSDevice_SSM::getLoggingFrequency(), MSDevice_SSM::getMeasuresAndThresholds(), NIImporter_VISUM::getNamedFloat(), MSSOTLTrafficLightLogic::getOutputSensorsLength(), MSSwarmTrafficLightLogic::getPheroMaxVal(), SUMOSAXAttributesImpl_Cached::getShape(), SUMOSAXAttributesImpl_Xerces::getShape(), MSSOTLTrafficLightLogic::getSpeedThreshold(), MSTLLogicControl::WAUTSwitchProcedure_Stretch::getStretchBereichDef(), MSSwarmTrafficLightLogic::getThetaInit(), MSSwarmTrafficLightLogic::getThetaMax(), MSSwarmTrafficLightLogic::getThetaMin(), getTurningDefaults(), MSTriggeredRerouter::getWeight(), NIImporter_VISUM::getWeightedFloat(), PushButtonLogic::init(), SigmoidLogic::init(), MSSwarmTrafficLightLogic::init(), PCLoaderVisum::load(), PCLoaderDlrNavteq::loadPolyFile(), MSActuatedTrafficLightLogic::MSActuatedTrafficLightLogic(), MSDelayBasedTrafficLightLogic::MSDelayBasedTrafficLightLogic(), MSSOTLPolicy::MSSOTLPolicy(), NIImporter_ITSUMO::Handler::myEndElement(), GUISettingsHandler::myStartElement(), NIImporter_OpenStreetMap::NodesHandler::myStartElement(), NIImporter_OpenStreetMap::EdgesHandler::myStartElement(), GUIDialog_ViewSettings::onCmdEditTable(), NIVissimSingleTypeParser_Streckendefinition::parse(), NIVissimSingleTypeParser_Geschwindigkeitsverteilungsdefinition::parse(), NIVissimSingleTypeParser_Laengenverteilungsdefinition::parse(), NIVissimSingleTypeParser_Simdauer::parse(), NIVissimSingleTypeParser_Zeitenverteilungsdefinition::parse(), NIVissimSingleTypeParser_Verbindungsdefinition::parse(), NIImporter_VISUM::parse_Lanes(), NIImporter_VISUM::parse_Point(), SUMOVehicleParameter::parseArrivalPos(), SUMOVehicleParameter::parseArrivalPosLat(), SUMOVehicleParameter::parseArrivalSpeed(), GeomConvHelper::parseBoundaryReporting(), RGBColor::parseColor(), SUMOVehicleParameter::parseDepartPos(), SUMOVehicleParameter::parseDepartPosLat(), SUMOVehicleParameter::parseDepartSpeed(), GeomConvHelper::parseShapeReporting(), GUISettingsHandler::parseSizeSettings(), GUISettingsHandler::parseTextSettings(), ODMatrix::parseTimeLine(), RODFDetFlowLoader::read(), ODMatrix::readFactor(), ODMatrix::readO(), ODMatrix::readV(), NIImporter_DlrNavteq::readVersion(), Option_Float::set(), MSDevice_Battery::setParameter(), MSLCM_LC2013::setParameter(), MSLCM_SL2015::setParameter(), MSDevice_Example::setParameter(), MSTLLogicControl::WAUTSwitchProcedure_Stretch::stretchLogic(), and RODFDetector::writeEmitterDefinition().
|
inlinestatic |
converts a 0-terminated char-type array into the double value described by it
Definition at line 355 of file TplConvert.h.
References _2double().
Referenced by MSRouteHandler::openRouteDistribution(), NIImporter_VISUM::parse_Edges(), and MSSOTLPolicyDesirability::readParameter().
|
inlinestatic |
converts a char-type array into the integer value described by it
an | EmptyData - exception if the given string is empty |
a | NumberFormatException - exception when the string does not contain an integer |
Definition at line 149 of file TplConvert.h.
References _2long(), max, and min.
Referenced by _2double(), _2intSec(), _str2int(), NIXMLEdgesHandler::addSplit(), MFXAddEditTypedTable::getControlForItem(), OutputDevice::getDevice(), MSTLLogicControl::WAUTSwitchProcedure::getGSPValue(), SUMOSAXAttributesImpl_Cached::getInt(), SUMOSAXAttributesImpl_Xerces::getInt(), NINavTeqHelper::getLaneNumber(), MSSwarmTrafficLightLogic::getMaxCongestionDuration(), MSSOTLRequestPolicy::getMinDecisionalPhaseDuration(), MSSOTLRequestTrafficLightLogic::getMinDecisionalPhaseDuration(), MSSOTLTrafficLightLogic::getMode(), MSSwarmTrafficLightLogic::getReinforcementMode(), NINavTeqHelper::getSpeed(), MSSOTLTrafficLightLogic::getThreshold(), MSSwarmTrafficLightLogic::init(), NIImporter_SUMO::interpretLaneID(), PCLoaderVisum::load(), NIImporter_ITSUMO::Handler::myEndElement(), GUISettingsHandler::myStartElement(), NIImporter_MATSim::EdgesHandler::myStartElement(), NIImporter_OpenStreetMap::EdgesHandler::myStartElement(), NIVissimSingleTypeParser_VWunschentscheidungsdefinition::parse(), NIVissimSingleTypeParser_Kantensperrung::parse(), NIVissimSingleTypeParser_Knotendefinition::parse(), NIVissimSingleTypeParser_Streckendefinition::parse(), NIVissimSingleTypeParser_Verbindungsdefinition::parse(), NIVissimSingleTypeParser_Fahrzeugklassendefinition::parse(), NIVissimSingleTypeParser_Fahrzeugtypdefinition::parse(), NIImporter_VISUM::parse_EdgePolys(), NIImporter_VISUM::parse_Lanes(), NIImporter_VISUM::parse_LanesConnections(), NIImporter_VISUM::parse_Types(), SUMOVehicleParameter::parseArrivalLane(), NIImporter_Vissim::VissimSingleTypeParser::parseAssignedVehicleTypes(), RGBColor::parseColor(), SUMOVehicleParameter::parseDepartLane(), NIVissimSingleTypeParser_Querverkehrsstoerungsdefinition::parsePos(), ODMatrix::parseSingleTime(), NIImporter_Vissim::VissimSingleTypeParser::readExtEdgePointDef(), ODMatrix::readO(), ODMatrix::readV(), NIImporter_DlrNavteq::EdgesHandler::report(), NIImporter_DlrNavteq::ConnectedLanesHandler::report(), Option_Integer::set(), Option_IntVector::set(), MSSOTLE2Sensors::setVehicleWeigths(), and RODFDetector::writeEmitterDefinition().
|
inlinestatic |
converts a 0-terminated char-type array into the integer value described by it
Definition at line 186 of file TplConvert.h.
References _2int().
Referenced by RODFDetectorHandler::myStartElement(), NIImporter_VISUM::parse_Edges(), and NIXMLConnectionsHandler::parseDeprecatedLaneDefinition().
|
inlinestatic |
converts a char-type array into the long value described by it
an | EmptyData - exception if the given string is empty |
a | NumberFormatException - exception when the string does not contain a long |
Definition at line 200 of file TplConvert.h.
Referenced by _2int(), _2longSec(), _str2long(), SUMOSAXAttributesImpl_Cached::getLong(), SUMOSAXAttributesImpl_Xerces::getLong(), PCLoaderVisum::load(), MSStateHandler::myStartElement(), NIImporter_VISUM::parse_AreaSubPartElement(), NIImporter_VISUM::parse_Districts(), NIImporter_VISUM::parse_Kante(), NIImporter_VISUM::parse_PartOfArea(), and NIImporter_VISUM::parse_Point().
|
inlinestatic |
converts a 0-terminated char-type array into the long value described by it
Definition at line 283 of file TplConvert.h.
References _2long().
|
inlinestatic |
convert int to string
Definition at line 57 of file TplConvert.h.
Referenced by _2bool(), _2str(), _2strSec(), OptionsLoader::characters(), GenericSAXHandler::characters(), SUMOSAXAttributesImpl_Xerces::clone(), GenericSAXHandler::endElement(), OptionsLoader::error(), OptionsLoader::fatalError(), OptionsIO::getRoot(), SUMOSAXAttributesImpl_Xerces::getString(), XMLSubSys::init(), OptionsIO::loadConfiguration(), NILoader::loadXMLType(), main(), SUMOSAXReader::LocalSchemaResolver::resolveEntity(), SUMOSAXAttributesImpl_Xerces::serialize(), OptionsLoader::startElement(), GenericSAXHandler::startElement(), and OptionsLoader::warning().
|
inlinestatic |
convert double to string
Definition at line 64 of file TplConvert.h.
|
inlinestatic |
convert bool to string
Definition at line 71 of file TplConvert.h.
|
inlinestatic |
converts a 0-terminated char-type array into std::string
an | EmptyData - exception if the given pointer is 0 |
Definition at line 78 of file TplConvert.h.
References _2str(), and getLength().
|
inlinestatic |
converts a 0-terminated char array into std::string
an | EmptyData - exception if the given pointer is 0 |
Definition at line 84 of file TplConvert.h.
|
inlinestatic |
converts a char-type array into std::string considering the given length
an | EmptyData - exception if the given pointer is 0 |
Definition at line 94 of file TplConvert.h.
|
inlinestatic |
converts a char array into std::string considering the given length
an | EmptyData - exception if the given pointer is 0 |
Definition at line 118 of file TplConvert.h.
|
inlinestatic |
converts a 0-terminated char-type array into std::string
Definition at line 128 of file TplConvert.h.
References getLength().
Referenced by SUMOSAXAttributesImpl_Xerces::getStringSecure().
|
inlinestatic |
converts a char-type array into std::string considering the given length
Definition at line 135 of file TplConvert.h.
References _2str().
|
inlinestatic |
converts a char-type array with a hex value into the integer value described by it
an | EmptyData - exception if the given string is empty |
a | NumberFormatException - exception when the string does not contain an integer |
Definition at line 168 of file TplConvert.h.
References _hex2long(), max, and min.
Referenced by _strHex2int(), and RGBColor::parseColor().
|
inlinestatic |
converts a char-type array with a hex value into the long value described by it
an | EmptyData - exception if the given string is empty |
a | NumberFormatException - exception when the string does not contain a long |
Definition at line 240 of file TplConvert.h.
Referenced by _hex2int().
|
inlinestatic |
converts a string into the bool value described by it by calling the char-type converter
an | EmptyData - exception if the given string is empty |
a | NumberFormatException - exception when the string does not contain a bool |
Definition at line 389 of file TplConvert.h.
References _2bool().
Referenced by GNEAttributeCarrier::parse().
|
inlinestatic |
converts a string into the double value described by it by calling the char-type converter
an | EmptyData - exception if the given string is empty |
a | NumberFormatException - exception when the string does not contain a double |
Definition at line 348 of file TplConvert.h.
References _2double().
Referenced by Distribution_Parameterized::Distribution_Parameterized(), SUMOVTypeParameter::getCFParam(), SUMOVTypeParameter::getLCParam(), NIImporter_Vissim::NIVissimXMLHandler_Streckendefinition::myEndElement(), NIImporter_Vissim::NIVissimXMLHandler_Geschwindigkeitsverteilungsdefinition::myEndElement(), and GNEAttributeCarrier::parse().
|
inlinestatic |
converts a string into the integer value described by it by calling the char-type converter, which
an | EmptyData - exception if the given string is empty |
NumberFormatException | - exception when the string does not contain an integer |
Definition at line 160 of file TplConvert.h.
References _2int().
Referenced by NIImporter_Vissim::NIVissimXMLHandler_Streckendefinition::myEndElement(), NIImporter_Vissim::NIVissimXMLHandler_Fahrzeugklassendefinition::myEndElement(), GNEAttributeCarrier::parse(), NIImporter_DlrNavteq::readDate(), NIVissimConflictArea::setPriorityRegulation(), and GUIMainWindow::setWindowSizeAndPos().
|
inlinestatic |
converts a string into the long value described by it by calling the char-type converter, which
an | EmptyData - exception if the given string is empty |
NumberFormatException | - exception when the string does not contain a long integer |
Definition at line 232 of file TplConvert.h.
References _2long().
Referenced by NBNodeCont::remapIDs(), and NBEdgeCont::remapIDs().
|
inlinestatic |
converts a string with a hex value into the integer value described by it by calling the char-type converter
an | EmptyData - exception if the given string is empty |
a | NumberFormatException - exception when the string does not contain an integer |
Definition at line 179 of file TplConvert.h.
References _hex2int().
Referenced by NIImporter_Vissim::NIVissimXMLHandler_Fahrzeugklassendefinition::myEndElement().
|
inlinestatic |
returns the length of the string (the position of the 0-character)
Definition at line 408 of file TplConvert.h.
Referenced by _2str(), and _2strSec().