![]() |
SUMO - Simulation of Urban MObility
|
#include <TplConvert.h>
Static Public Member Functions | |
template<class E > | |
static bool | _2bool (const E *const data) |
template<class E > | |
static bool | _2boolSec (const E *const data, bool def) |
template<class E > | |
static int | _2int (const E *const data) |
template<class E > | |
static int | _2intSec (const E *const data, int def) |
template<class E > | |
static long long int | _2long (const E *const data) |
template<class E > | |
static long long int | _2longSec (const E *const data, long def) |
template<class E > | |
static std::string | _2str (const E *const data) |
static std::string | _2str (const char *const data) |
template<class E > | |
static std::string | _2str (const E *const data, unsigned length) |
static std::string | _2str (const char *const data, unsigned length) |
template<class E > | |
static std::string | _2strSec (const E *const data, const std::string &def) |
template<class E > | |
static std::string | _2strSec (const E *const data, int length, const std::string &def) |
template<class E > | |
static SUMOReal | _2SUMOReal (const E *const data) |
template<class E > | |
static SUMOReal | _2SUMORealSec (const E *const data, SUMOReal def) |
template<class E > | |
static int | _hex2int (const E *const data) |
template<class E > | |
static long long int | _hex2long (const E *const data) |
static int | _str2int (const std::string &sData) |
static SUMOReal | _str2SUMOReal (const std::string &sData) |
static int | _strHex2int (const std::string &sData) |
template<class E > | |
static unsigned | getLength (const E *const data) |
TplConvert Some methods that convert 0-terminated char-arrays of any type into other values (numerical/boolean) or into std::strings
Definition at line 51 of file TplConvert.h.
|
inlinestatic |
converts a 0-terminated char-type array into the boolean value described by it returns true if the data* is one of the following (case insensitive): '1', 'x', 'true', 'yes', 'on' returns false if the data* is one of the following (case insensitive): '0', '-', 'false', 'no', 'off' throws an EmptyData - exception if the given string is empty or 0 pointer throws a BoolFormatException in any other case
Definition at line 311 of file TplConvert.h.
References _2str().
Referenced by _2boolSec(), MSDevice::equippedByDefaultAssignmentOptions(), SUMOSAXAttributesImpl_Xerces::getBool(), NIImporter_VISUM::getWeightedBool(), MSActuatedTrafficLightLogic::MSActuatedTrafficLightLogic(), GUISettingsHandler::myStartElement(), NIImporter_VISUM::parse_Edges(), NIImporter_VISUM::parse_TrafficLights(), GUISettingsHandler::parseSizeSettings(), GUISettingsHandler::parseTextSettings(), and Option_Bool::set().
|
inlinestatic |
converts a 0-terminated char-type array into the SUMOReal value described by it returns true if the data* is one of the following (case insensitive): '1', 'x', 'true', 'yes', 'on' returns false if the data* is one of the following (case insensitive): '0', '-', 'false', 'no', 'off' returns the default value if the data is empty
Definition at line 381 of file TplConvert.h.
References _2bool().
|
inlinestatic |
converts a char-type array into the integer value described by it throws an EmptyData - exception if the given string is empty throws a NumberFormatException - exception when the string does not contain an integer
Definition at line 114 of file TplConvert.h.
References _2long(), max, and min.
Referenced by _2intSec(), _2SUMOReal(), _str2int(), NIXMLEdgesHandler::addSplit(), MFXAddEditTypedTable::getControlForItem(), OutputDevice::getDevice(), MSTLLogicControl::WAUTSwitchProcedure::getGSPValue(), SUMOSAXAttributesImpl_Xerces::getInt(), NINavTeqHelper::getLaneNumber(), NINavTeqHelper::getSpeed(), NIImporter_SUMO::interpretLaneID(), PCLoaderVisum::load(), NIImporter_ITSUMO::Handler::myEndElement(), GUISettingsHandler::myStartElement(), NIImporter_MATSim::EdgesHandler::myStartElement(), NIImporter_OpenStreetMap::EdgesHandler::myStartElement(), NIVissimSingleTypeParser_Knotendefinition::parse(), NIVissimSingleTypeParser_Kantensperrung::parse(), NIVissimSingleTypeParser_Streckendefinition::parse(), NIVissimSingleTypeParser_VWunschentscheidungsdefinition::parse(), NIVissimSingleTypeParser_Fahrzeugklassendefinition::parse(), NIVissimSingleTypeParser_Fahrzeugtypdefinition::parse(), NIVissimSingleTypeParser_Verbindungsdefinition::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(), ODMatrix::parseTimeLine(), NIImporter_Vissim::VissimSingleTypeParser::readExtEdgePointDef(), ODMatrix::readO(), ODMatrix::readV(), NIImporter_DlrNavteq::EdgesHandler::report(), Option_Integer::set(), Option_IntVector::set(), GNENet::splitEdge(), and RODFDetector::writeEmitterDefinition().
|
inlinestatic |
converts a 0-terminated char-type array into the integer value described by it returns the default value if the data is empty
Definition at line 341 of file TplConvert.h.
References _2int().
Referenced by GNEApplicationWindow::GNEShapeHandler::getLanePos(), RODFDetectorHandler::myStartElement(), NIImporter_VISUM::parse_Edges(), and NIXMLConnectionsHandler::parseDeprecatedLaneDefinition().
|
inlinestatic |
converts a char-type array into the long value described by it throws an EmptyData - exception if the given string is empty throws a NumberFormatException - exception when the string does not contain a long
Definition at line 161 of file TplConvert.h.
Referenced by _2int(), _2longSec(), 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 returns the default value if the data is empty
Definition at line 353 of file TplConvert.h.
References _2long().
|
inlinestatic |
converts a 0-terminated char-type array into std::string throws an EmptyData - exception if the given pointer is 0
Definition at line 56 of file TplConvert.h.
References getLength().
Referenced by _2bool(), _2strSec(), OptionsLoader::characters(), GenericSAXHandler::characters(), GenericSAXHandler::endElement(), OptionsLoader::error(), OptionsLoader::fatalError(), SUMOSAXAttributesImpl_Xerces::getString(), XMLSubSys::init(), OptionsIO::loadConfiguration(), NILoader::loadXMLType(), main(), SUMOSAXReader::LocalSchemaResolver::resolveEntity(), SUMOSAXAttributesImpl_Xerces::serialize(), OptionsLoader::startElement(), GenericSAXHandler::startElement(), and OptionsLoader::warning().
|
inlinestatic |
converts a 0-terminated char array into std::string throws an EmptyData - exception if the given pointer is 0
Definition at line 63 of file TplConvert.h.
|
inlinestatic |
converts a char-type array into std::string considering the given length throws an EmptyData - exception if the given pointer is 0
Definition at line 75 of file TplConvert.h.
|
inlinestatic |
converts a char array into std::string considering the given length throws an EmptyData - exception if the given pointer is 0
Definition at line 101 of file TplConvert.h.
|
inlinestatic |
converts a 0-terminated char-type array into std::string returns the default value if the data is empty
Definition at line 331 of file TplConvert.h.
References getLength().
Referenced by SUMOSAXAttributesImpl_Xerces::getStringSecure().
|
inlinestatic |
converts a char-type array into std::string considering the given length returns the default value if the data is empty
Definition at line 393 of file TplConvert.h.
References _2str().
|
inlinestatic |
converts a char-type array into the SUMOReal value described by it throws an EmptyData - exception if the given string is empty throws a NumberFormatException - exception when the string does not contain a SUMOReal
Definition at line 242 of file TplConvert.h.
References _2int(), and SUMOReal.
Referenced by _2SUMORealSec(), _str2SUMOReal(), MSTLLogicControl::WAUTSwitchProcedure_Stretch::adaptLogic(), NBEdgeCont::applyOptions(), MSDevice_Example::buildVehicleDevices(), MSDevice_Battery::buildVehicleDevices(), SUMOSAXAttributesImpl_Xerces::getBoundary(), MFXAddEditTypedTable::getControlForItem(), SUMOSAXAttributesImpl_Xerces::getFloat(), SUMOSAXAttributesImpl_Binary::getFloat(), NIImporter_VISUM::getNamedFloat(), SUMOSAXAttributesImpl_Xerces::getShape(), MSTLLogicControl::WAUTSwitchProcedure_Stretch::getStretchBereichDef(), getTurningDefaults(), NIImporter_VISUM::getWeightedFloat(), PCLoaderVisum::load(), PCLoaderDlrNavteq::loadPolyFile(), MSActuatedTrafficLightLogic::MSActuatedTrafficLightLogic(), 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::parseArrivalSpeed(), GeomConvHelper::parseBoundaryReporting(), RGBColor::parseColor(), SUMOVehicleParameter::parseDepartPos(), SUMOVehicleParameter::parseDepartSpeed(), GeomConvHelper::parseShapeReporting(), GUISettingsHandler::parseSizeSettings(), GUISettingsHandler::parseTextSettings(), ODMatrix::parseTimeLine(), RODFDetFlowLoader::read(), ODMatrix::readFactor(), ODMatrix::readO(), ODMatrix::readV(), NIImporter_DlrNavteq::EdgesHandler::report(), Option_Float::set(), MSTLLogicControl::WAUTSwitchProcedure_Stretch::stretchLogic(), and RODFDetector::writeEmitterDefinition().
|
inlinestatic |
converts a 0-terminated char-type array into the SUMOReal value described by it returns the default value if the data is empty
Definition at line 365 of file TplConvert.h.
References _2SUMOReal().
Referenced by MSRouteHandler::openRouteDistribution(), and NIImporter_VISUM::parse_Edges().
|
inlinestatic |
converts a char-type array with a hex value into the integer value described by it throws an EmptyData - exception if the given string is empty throws a NumberFormatException - exception when the string does not contain an integer
Definition at line 138 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 throws an EmptyData - exception if the given string is empty throws a NumberFormatException - exception when the string does not contain a long
Definition at line 196 of file TplConvert.h.
Referenced by _hex2int().
|
inlinestatic |
converts a string into the integer value described by it by calling the char-type converter, which throws an EmptyData - exception if the given string is empty throws a NumberFormatException - exception when the string does not contain an integer
Definition at line 128 of file TplConvert.h.
References _2int().
Referenced by NIImporter_Vissim::NIVissimXMLHandler_Streckendefinition::myEndElement(), NIImporter_Vissim::NIVissimXMLHandler_Fahrzeugklassendefinition::myEndElement(), and NIVissimConflictArea::setPriorityRegulation().
|
inlinestatic |
converts a string into the SUMOReal value described by it by calling the char-type converter, which throws an EmptyData - exception if the given string is empty throws a NumberFormatException - exception when the string does not contain a SUMOReal
Definition at line 296 of file TplConvert.h.
References _2SUMOReal().
Referenced by NIImporter_Vissim::NIVissimXMLHandler_Streckendefinition::myEndElement(), and NIImporter_Vissim::NIVissimXMLHandler_Geschwindigkeitsverteilungsdefinition::myEndElement().
|
inlinestatic |
converts a string with a hex value into the integer value described by it by calling the char-type converter, which throws an EmptyData - exception if the given string is empty throws a NumberFormatException - exception when the string does not contain an integer
Definition at line 151 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 404 of file TplConvert.h.
Referenced by _2str(), and _2strSec().