Go to the documentation of this file.
36 #ifndef TTA_CONVERSION_HH
37 #define TTA_CONVERSION_HH
42 #include <xercesc/util/XMLString.hpp>
48 #if _XERCES_VERSION >= 20200
49 XERCES_CPP_NAMESPACE_USE
55 static std::string
toString(
const T& source);
56 static std::string
toString(
double source,
unsigned precision);
57 static std::string
toString(
bool source);
60 static XMLCh*
toXMLCh(
const std::string&
string);
63 static int toInt(
const T& source);
68 static int toInt(
const double& source);
79 static double toDouble(
const T& source);
82 static float toFloat(
const T& source);
88 unsigned int stringWidth = 0);
92 T source, std::size_t digits = 0,
bool include0x =
true);
97 const std::string& hexSource,
unsigned char* target);
100 template <
typename SourceType,
typename DestType,
bool destIsNumeric>
101 static void convert(
const SourceType& source, DestType& dest);
static void convert(const SourceType &source, DestType &dest)
static std::string toString(const T &source)
static std::string doubleToHexString(double source, bool include0x=true)
static double toDouble(const T &source)
static std::string toBinary(unsigned int source, unsigned int stringWidth=0)
static XMLCh * toXMLCh(const std::string &string)
static void toRawData(const std::string &hexSource, unsigned char *target)
static std::string toHexString(T source, std::size_t digits=0, bool include0x=true)
static std::string XMLChToString(const XMLCh *source)
static unsigned int toUnsignedInt(const T &source)
static std::string toBinString(int source)
static SLongWord toLong(const T &source)
static int toInt(const T &source)
static bool restWhiteSpace(std::istream &str)
static std::string floatToHexString(float source, bool include0x=true)
static ULongWord toUnsignedLong(const T &source)
static float toFloat(const T &source)