|
SUMO - Simulation of Urban MObility
|
#include <TplConvert.h>
Static Public Member Functions | |
| static bool | _2bool (const E *const data) |
| static bool | _2bool (const E *const data, unsigned length) |
| static char * | _2charp (const E *const data) |
| static char * | _2charp (const E *const data, int length) |
| static int | _2int (const E *const data, unsigned length) |
| static int | _2int (const E *const data) |
| static long | _2long (const E *const data, unsigned length) |
| static long | _2long (const E *const data) |
| static std::string | _2str (const E *const data) |
| static std::string | _2str (const E *const data, unsigned length) |
| static SUMOReal | _2SUMOReal (const E *const data) |
| static SUMOReal | _2SUMOReal (const E *const data, unsigned length) |
| 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 48 of file TplConvert.h.
| static bool TplConvert< E >::_2bool | ( | const E *const | data | ) | [inline, static] |
converts a 0-terminated char-type array into the SUMOReal value described by it returns true when the first char is one of the following: '1', 'x', 't', 'T' throws an EmptyData - exception if the given string is empty
Definition at line 93 of file TplConvert.h.
Referenced by SUMOSAXAttributesImpl_Xerces::getBool(), NIImporter_VISUM::getWeightedBool(), and GUISettingsHandler::myStartElement().
| static bool TplConvert< E >::_2bool | ( | const E *const | data, |
| unsigned | length | ||
| ) | [inline, static] |
converts a char-type array into the SUMOReal value described by it considering the given length returns true when the first char is one of the following: '1', 'x', 't', 'T' throws an EmptyData - exception if the given string is empty
Definition at line 279 of file TplConvert.h.
| static char* TplConvert< E >::_2charp | ( | const E *const | data | ) | [inline, static] |
converts a 0-terminated char-type array into a 0-terminated 0-terminated c-char-string throws an EmptyData - exception if the given string is empty
Definition at line 101 of file TplConvert.h.
References TplConvert< E >::getLength().
| static char* TplConvert< E >::_2charp | ( | const E *const | data, |
| int | length | ||
| ) | [inline, static] |
converts a char-type array into a 0-terminated 0-terminated c-char-string considering the given length throws an EmptyData - exception if the given string is empty
Definition at line 297 of file TplConvert.h.
| static int TplConvert< E >::_2int | ( | const E *const | data, |
| unsigned | length | ||
| ) | [inline, static] |
converts a char-type array into the integer value described by it considering the given length 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.
| static int TplConvert< E >::_2int | ( | const E *const | data | ) | [inline, static] |
converts a 0-terminated 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 63 of file TplConvert.h.
Referenced by TplConvert< E >::_2SUMOReal(), SUMOVehicleParameter::arrivallaneValidate(), SUMOVehicleParameter::departlaneValidate(), OutputDevice::getDevice(), SUMOSAXAttributesImpl_Xerces::getInt(), NINavTeqHelper::getLaneNumber(), NINavTeqHelper::getSpeed(), getVehicleEmissionTypeID(), PCLoaderVisum::load(), GUISettingsHandler::myStartElement(), SUMOVehicleParserHelper::parseCommonAttributes(), parseSingleTime(), parseTimeLine(), RODFDetFlowLoader::read(), readO(), and readV().
| static long TplConvert< E >::_2long | ( | const E *const | data, |
| unsigned | length | ||
| ) | [inline, static] |
converts a char-type array into the long value described by it considering the given length 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 172 of file TplConvert.h.
| static long TplConvert< E >::_2long | ( | const E *const | data | ) | [inline, static] |
converts a 0-terminated 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 73 of file TplConvert.h.
Referenced by PCLoaderVisum::load().
| static std::string TplConvert< E >::_2str | ( | const E *const | data | ) | [inline, static] |
converts a 0-terminated char-type array into std::string throws an EmptyData - exception if the given string is empty
Definition at line 53 of file TplConvert.h.
References TplConvert< E >::getLength().
Referenced by SUMOSAXAttributesImpl_Xerces::getString().
| static std::string TplConvert< E >::_2str | ( | const E *const | data, |
| unsigned | length | ||
| ) | [inline, static] |
converts a char-type array into std::string considering the given length throws an EmptyData - exception if the given string is empty
Definition at line 110 of file TplConvert.h.
| static SUMOReal TplConvert< E >::_2SUMOReal | ( | const E *const | data | ) | [inline, static] |
converts a 0-terminated 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 83 of file TplConvert.h.
Referenced by SUMOVehicleParameter::arrivalposValidate(), SUMOVehicleParameter::arrivalspeedValidate(), SUMOVehicleParameter::departposValidate(), SUMOVehicleParameter::departspeedValidate(), SUMOSAXAttributesImpl_Xerces::getFloat(), NIImporter_VISUM::getNamedFloat(), getTurningDefaults(), NIImporter_VISUM::getWeightedFloat(), PCLoaderVisum::load(), PCLoaderDlrNavteq::loadPolyFile(), GUISettingsHandler::myStartElement(), GeomConvHelper::parseBoundaryReporting(), RGBColor::parseColor(), SUMOVehicleParserHelper::parseCommonAttributes(), GeomConvHelper::parseShapeReporting(), parseTimeLine(), RODFDetFlowLoader::read(), readFactor(), readO(), and readV().
| static SUMOReal TplConvert< E >::_2SUMOReal | ( | const E *const | data, |
| unsigned | length | ||
| ) | [inline, static] |
converts a char-type array into the SUMOReal value described by it considering the given length 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 206 of file TplConvert.h.
References TplConvert< E >::_2int(), and SUMOReal.
| static unsigned TplConvert< E >::getLength | ( | const E *const | data | ) | [inline, static] |
returns the length of the string (the position of the 0-character)
Definition at line 312 of file TplConvert.h.
Referenced by TplConvert< E >::_2charp(), and TplConvert< E >::_2str().