SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TplConvertSec< E > Class Template Reference

#include <TplConvertSec.h>

Static Public Member Functions

static bool _2boolSec (const E *const data, bool def)
static bool _2boolSec (const E *const data, int length, bool def)
static char * _2charpSec (const E *const data, char *def)
static char * _2charpSec (const E *const data, int length, char *def)
static int _2intSec (const E *const data, int def)
static int _2intSec (const E *const data, int length, int def)
static long _2longSec (const E *const data, long def)
static long _2longSec (const E *const data, int length, long def)
static std::string _2strSec (const E *const data, const std::string &def)
static std::string _2strSec (const E *const data, int length, const std::string &def)
static SUMOReal _2SUMORealSec (const E *const data, SUMOReal def)
static SUMOReal _2SUMORealSec (const E *const data, int length, SUMOReal def)

Detailed Description

template<class E>
class TplConvertSec< E >

TplConvertSec The same as TplConvert, but more secure, meaning throwing less exceptions as methods do retrieve a value that is used when nothing to convert is supplied. Still, some methods do throw exceptions when f.e. something that should be a number is not.

Definition at line 49 of file TplConvertSec.h.


Member Function Documentation

template<class E>
static bool TplConvertSec< E >::_2boolSec ( const E *const  data,
bool  def 
)
inlinestatic

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' returns the default value if the data is empty

Definition at line 88 of file TplConvertSec.h.

Referenced by SUMOSAXAttributesImpl_Xerces::getBoolSecure().

template<class E>
static bool TplConvertSec< E >::_2boolSec ( const E *const  data,
int  length,
bool  def 
)
inlinestatic

converts a char-type array into the SUMOReal value described by it considering the given length returns the default value if the data is empty

Definition at line 150 of file TplConvertSec.h.

template<class E>
static char* TplConvertSec< E >::_2charpSec ( const E *const  data,
char *  def 
)
inlinestatic

converts a 0-terminated char-type array into a 0-terminated 0-terminated c-char-string returns the default value if the data is empty

Definition at line 96 of file TplConvertSec.h.

template<class E>
static char* TplConvertSec< E >::_2charpSec ( const E *const  data,
int  length,
char *  def 
)
inlinestatic

converts a char-type array into a 0-terminated 0-terminated c-char-string considering the given length returns the default value if the data is empty

Definition at line 161 of file TplConvertSec.h.

template<class E>
static int TplConvertSec< E >::_2intSec ( const E *const  data,
int  def 
)
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 63 of file TplConvertSec.h.

Referenced by SUMOSAXAttributesImpl_Xerces::getIntSecure().

template<class E>
static int TplConvertSec< E >::_2intSec ( const E *const  data,
int  length,
int  def 
)
inlinestatic

converts a char-type array into the integer value described by it considering the given length returns the default value if the data is empty

Definition at line 117 of file TplConvertSec.h.

template<class E>
static long TplConvertSec< E >::_2longSec ( const E *const  data,
long  def 
)
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 71 of file TplConvertSec.h.

template<class E>
static long TplConvertSec< E >::_2longSec ( const E *const  data,
int  length,
long  def 
)
inlinestatic

converts a char-type array into the long value described by it considering the given length returns the default value if the data is empty

Definition at line 128 of file TplConvertSec.h.

template<class E>
static std::string TplConvertSec< E >::_2strSec ( const E *const  data,
const std::string &  def 
)
inlinestatic

converts a 0-terminated char-type array into std::string returns the default value if the data is empty

Definition at line 54 of file TplConvertSec.h.

Referenced by SUMOSAXAttributesImpl_Xerces::getStringSecure().

template<class E>
static std::string TplConvertSec< E >::_2strSec ( const E *const  data,
int  length,
const std::string &  def 
)
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 105 of file TplConvertSec.h.

template<class E>
static SUMOReal TplConvertSec< E >::_2SUMORealSec ( const E *const  data,
SUMOReal  def 
)
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 79 of file TplConvertSec.h.

Referenced by SUMOSAXAttributesImpl_Xerces::getFloatSecure().

template<class E>
static SUMOReal TplConvertSec< E >::_2SUMORealSec ( const E *const  data,
int  length,
SUMOReal  def 
)
inlinestatic

converts a char-type array into the SUMOReal value described by it considering the given length returns the default value if the data is empty

Definition at line 139 of file TplConvertSec.h.


The documentation for this class was generated from the following file: