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 SUMOLong | _2long (const E *const data) |
template<class E > | |
static SUMOLong | _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 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 222 of file TplConvert.h.
References _2str().
Referenced by _2boolSec(), SUMOSAXAttributesImpl_Xerces::getBool(), NIImporter_VISUM::getWeightedBool(), GUISettingsHandler::myStartElement(), NIImporter_VISUM::parse_Edges(), NIImporter_VISUM::parse_TrafficLights(), GUISettingsHandler::parseTextSettings(), and Option_Bool::set().
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 292 of file TplConvert.h.
References _2bool().
Referenced by SUMOSAXAttributesImpl_Xerces::getBoolSecure().
|
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, min, and SUMOLong.
Referenced by _2intSec(), _2SUMOReal(), NIXMLEdgesHandler::addSplit(), MFXAddEditTypedTable::getControlForItem(), OutputDevice::getDevice(), MSTLLogicControl::WAUTSwitchProcedure::getGSPValue(), SUMOSAXAttributesImpl_Xerces::getInt(), NINavTeqHelper::getLaneNumber(), NINavTeqHelper::getSpeed(), getVehicleEmissionTypeID(), NIImporter_SUMO::interpretLaneID(), PCLoaderVisum::load(), MSAgentbasedTrafficLightLogic::MSAgentbasedTrafficLightLogic(), 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(), SUMOVehicleParameter::parseDepartLane(), NIVissimSingleTypeParser_Querverkehrsstoerungsdefinition::parsePos(), parseSingleTime(), parseTimeLine(), RODFDetFlowLoader::read(), NIImporter_Vissim::VissimSingleTypeParser::readExtEdgePointDef(), readO(), readV(), NIImporter_DlrNavteq::EdgesHandler::report(), Option_Integer::set(), Option_IntVector::set(), and RODFDetector::writeEmitterDefinition().
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 252 of file TplConvert.h.
References _2int().
Referenced by SUMOSAXAttributesImpl_Xerces::getIntSecure(), 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 128 of file TplConvert.h.
References SUMOLong.
Referenced by _2int(), _2longSec(), SUMOSAXAttributesImpl_Xerces::getLong(), PCLoaderVisum::load(), 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 264 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(), MSTriggeredXMLReader::myInit(), 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 242 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 304 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 163 of file TplConvert.h.
References _2int(), SUMOLong, and SUMOReal.
Referenced by _2SUMORealSec(), MSTLLogicControl::WAUTSwitchProcedure_Stretch::adaptLogic(), NBEdgeCont::applyOptions(), SUMOSAXAttributesImpl_Xerces::getBoundaryReporting(), MFXAddEditTypedTable::getControlForItem(), SUMOSAXAttributesImpl_Xerces::getFloat(), SUMOSAXAttributesImpl_Binary::getFloat(), NIImporter_VISUM::getNamedFloat(), SUMOSAXAttributesImpl_Xerces::getShapeReporting(), MSTLLogicControl::WAUTSwitchProcedure_Stretch::getStretchBereichDef(), getTurningDefaults(), NIImporter_VISUM::getWeightedFloat(), MSActuatedTrafficLightLogic::init(), MSAgentbasedTrafficLightLogic::init(), PCLoaderVisum::load(), PCLoaderDlrNavteq::loadPolyFile(), MSActuatedTrafficLightLogic::MSActuatedTrafficLightLogic(), MSAgentbasedTrafficLightLogic::MSAgentbasedTrafficLightLogic(), NIImporter_ITSUMO::Handler::myEndElement(), GUISettingsHandler::myStartElement(), NIImporter_OpenStreetMap::EdgesHandler::myStartElement(), GUIDialog_ViewSettings::onCmdEditTable(), NIVissimSingleTypeParser_Geschwindigkeitsverteilungsdefinition::parse(), NIVissimSingleTypeParser_Laengenverteilungsdefinition::parse(), NIVissimSingleTypeParser_Simdauer::parse(), NIVissimSingleTypeParser_Streckendefinition::parse(), NIVissimSingleTypeParser_Zeitenverteilungsdefinition::parse(), NIVissimSingleTypeParser_Zuflussdefinition::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::parseTextSettings(), parseTimeLine(), RODFDetFlowLoader::read(), readFactor(), readO(), readV(), NIImporter_DlrNavteq::EdgesHandler::report(), Option_Float::set(), and MSTLLogicControl::WAUTSwitchProcedure_Stretch::stretchLogic().
|
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 276 of file TplConvert.h.
References _2SUMOReal().
Referenced by SUMOSAXAttributesImpl_Xerces::getFloatSecure(), MSRouteHandler::openRouteDistribution(), and NIImporter_VISUM::parse_Edges().
|
inlinestatic |
returns the length of the string (the position of the 0-character)
Definition at line 315 of file TplConvert.h.
Referenced by _2str(), and _2strSec().