convert.h File Reference
#include <cxxtools/api.h>
#include <cxxtools/config.h>
#include <cxxtools/string.h>
#include <cxxtools/stringstream.h>
#include <cxxtools/conversionerror.h>
#include <cxxtools/typetraits.h>
#include <sstream>
#include <string>
#include <typeinfo>
#include <limits>
#include <iterator>
#include <cctype>
#include <cmath>

Go to the source code of this file.

Classes

struct  cxxtools::Convert< T, S >
struct  cxxtools::NumberFormat< CharType >
struct  cxxtools::DecimalFormat< CharType >
struct  cxxtools::OctalFormat< CharType >
struct  cxxtools::HexFormat< CharType >
struct  cxxtools::BinaryFormat< CharType >
struct  cxxtools::FloatFormat< CharType >

Namespaces

namespace  cxxtools

Functions

void cxxtools::convert (String &s, const String &str)
CXXTOOLS_API void cxxtools::convert (String &s, const std::string &value)
CXXTOOLS_API void cxxtools::convert (String &s, bool value)
CXXTOOLS_API void cxxtools::convert (String &s, char value)
CXXTOOLS_API void cxxtools::convert (String &s, wchar_t value)
CXXTOOLS_API void cxxtools::convert (String &s, Char value)
CXXTOOLS_API void cxxtools::convert (String &s, unsigned char value)
CXXTOOLS_API void cxxtools::convert (String &s, signed char value)
CXXTOOLS_API void cxxtools::convert (String &s, short value)
CXXTOOLS_API void cxxtools::convert (String &s, unsigned short value)
CXXTOOLS_API void cxxtools::convert (String &s, int value)
CXXTOOLS_API void cxxtools::convert (String &s, unsigned int value)
CXXTOOLS_API void cxxtools::convert (String &s, long value)
CXXTOOLS_API void cxxtools::convert (String &s, unsigned long value)
CXXTOOLS_API void cxxtools::convert (String &s, float value)
CXXTOOLS_API void cxxtools::convert (String &s, double value)
CXXTOOLS_API void cxxtools::convert (String &s, long double value)
template<typename T >
void cxxtools::convert (String &s, const T &value)
CXXTOOLS_API void cxxtools::convert (bool &n, const String &str)
CXXTOOLS_API void cxxtools::convert (char &n, const String &str)
CXXTOOLS_API void cxxtools::convert (wchar_t &n, const String &str)
CXXTOOLS_API void cxxtools::convert (Char &n, const String &str)
CXXTOOLS_API void cxxtools::convert (unsigned char &n, const String &str)
CXXTOOLS_API void cxxtools::convert (signed char &n, const String &str)
CXXTOOLS_API void cxxtools::convert (short &n, const String &str)
CXXTOOLS_API void cxxtools::convert (unsigned short &n, const String &str)
CXXTOOLS_API void cxxtools::convert (int &n, const String &str)
CXXTOOLS_API void cxxtools::convert (unsigned int &n, const String &str)
CXXTOOLS_API void cxxtools::convert (long &n, const String &str)
CXXTOOLS_API void cxxtools::convert (unsigned long &n, const String &str)
CXXTOOLS_API void cxxtools::convert (float &n, const String &str)
CXXTOOLS_API void cxxtools::convert (double &n, const String &str)
CXXTOOLS_API void cxxtools::convert (long double &n, const String &str)
template<typename T >
void cxxtools::convert (T &t, const String &str)
void cxxtools::convert (std::string &s, const std::string &str)
CXXTOOLS_API void cxxtools::convert (std::string &s, const String &str)
CXXTOOLS_API void cxxtools::convert (std::string &s, bool value)
CXXTOOLS_API void cxxtools::convert (std::string &s, char value)
CXXTOOLS_API void cxxtools::convert (std::string &s, signed char value)
CXXTOOLS_API void cxxtools::convert (std::string &s, unsigned char value)
CXXTOOLS_API void cxxtools::convert (std::string &s, short value)
CXXTOOLS_API void cxxtools::convert (std::string &s, unsigned short value)
CXXTOOLS_API void cxxtools::convert (std::string &s, int value)
CXXTOOLS_API void cxxtools::convert (std::string &s, unsigned int value)
CXXTOOLS_API void cxxtools::convert (std::string &s, long value)
CXXTOOLS_API void cxxtools::convert (std::string &s, unsigned long value)
CXXTOOLS_API void cxxtools::convert (std::string &s, float value)
CXXTOOLS_API void cxxtools::convert (std::string &s, double value)
CXXTOOLS_API void cxxtools::convert (std::string &s, long double value)
template<typename T >
void cxxtools::convert (std::string &s, const T &value)
CXXTOOLS_API void cxxtools::convert (bool &n, const std::string &str)
CXXTOOLS_API void cxxtools::convert (char &n, const std::string &str)
CXXTOOLS_API void cxxtools::convert (signed char &n, const std::string &str)
CXXTOOLS_API void cxxtools::convert (unsigned char &n, const std::string &str)
CXXTOOLS_API void cxxtools::convert (short &n, const std::string &str)
CXXTOOLS_API void cxxtools::convert (unsigned short &n, const std::string &str)
CXXTOOLS_API void cxxtools::convert (int &n, const std::string &str)
CXXTOOLS_API void cxxtools::convert (unsigned int &n, const std::string &str)
CXXTOOLS_API void cxxtools::convert (long &n, const std::string &str)
CXXTOOLS_API void cxxtools::convert (unsigned long &n, const std::string &str)
CXXTOOLS_API void cxxtools::convert (float &n, const std::string &str)
CXXTOOLS_API void cxxtools::convert (double &n, const std::string &str)
CXXTOOLS_API void cxxtools::convert (long double &n, const std::string &str)
template<typename T >
void cxxtools::convert (T &t, const std::string &str)
CXXTOOLS_API void cxxtools::convert (bool &n, const char *str)
CXXTOOLS_API void cxxtools::convert (char &n, const char *str)
CXXTOOLS_API void cxxtools::convert (signed char &n, const char *str)
CXXTOOLS_API void cxxtools::convert (unsigned char &n, const char *str)
CXXTOOLS_API void cxxtools::convert (short &n, const char *str)
CXXTOOLS_API void cxxtools::convert (unsigned short &n, const char *str)
CXXTOOLS_API void cxxtools::convert (int &n, const char *str)
CXXTOOLS_API void cxxtools::convert (unsigned int &n, const char *str)
CXXTOOLS_API void cxxtools::convert (long &n, const char *str)
CXXTOOLS_API void cxxtools::convert (unsigned long &n, const char *str)
CXXTOOLS_API void cxxtools::convert (float &n, const char *str)
CXXTOOLS_API void cxxtools::convert (double &n, const char *str)
CXXTOOLS_API void cxxtools::convert (long double &n, const char *str)
template<typename T , typename S >
void cxxtools::convert (T &to, const S &from)
template<typename T , typename S >
cxxtools::convert (const S &from)
template<typename OutIterT , typename T , typename FormatT >
OutIterT cxxtools::putInt (OutIterT it, T i, const FormatT &fmt)
 Formats an integer in a given format format.
template<typename OutIterT , typename T >
OutIterT cxxtools::putInt (OutIterT it, T i)
 Formats an integer in a decimal format.
template<typename OutIterT , typename T , typename FormatT >
OutIterT cxxtools::putFloat (OutIterT it, T d, const FormatT &fmt, int precision)
 Formats a floating point value in a given format.
template<typename OutIterT , typename T >
OutIterT cxxtools::putFloat (OutIterT it, T d)
 Formats a floating point value in default format.
template<typename InIterT , typename T , typename FormatT >
InIterT cxxtools::getInt (InIterT it, InIterT end, bool &ok, T &n, const FormatT &fmt)
 Parses an integer value in a given format.
template<typename InIterT , typename T >
InIterT cxxtools::getInt (InIterT it, InIterT end, bool &ok, T &n)
 Parses an integer value in decimal format.
template<typename InIterT , typename T , typename FormatT >
InIterT cxxtools::getFloat (InIterT it, InIterT end, bool &ok, T &n, const FormatT &fmt)
 Parses a floating point value in a given format.
template<typename InIterT , typename T >
InIterT cxxtools::getFloat (InIterT it, InIterT end, bool &ok, T &n)
 Parses a floating point value.
unsigned char cxxtools::formatAbs (char i, bool &isNeg)
unsigned char cxxtools::formatAbs (unsigned char i, bool &isNeg)
unsigned short cxxtools::formatAbs (short i, bool &isNeg)
unsigned short cxxtools::formatAbs (unsigned short i, bool &isNeg)
unsigned int cxxtools::formatAbs (int i, bool &isNeg)
unsigned int cxxtools::formatAbs (unsigned int i, bool &isNeg)
unsigned long cxxtools::formatAbs (long i, bool &isNeg)
unsigned long cxxtools::formatAbs (unsigned long i, bool &isNeg)
template<typename CharT , typename T , typename FormatT >
CharT * cxxtools::formatInt (CharT *buf, std::size_t buflen, T si, const FormatT &fmt)
 Formats an integer in a given format.
template<typename CharT , typename T >
CharT * cxxtools::formatInt (CharT *buf, std::size_t buflen, T i, const BinaryFormat< CharT > &fmt)
 Formats an integer in binary format.
template<typename InIterT , typename FormatT >
InIterT cxxtools::getSign (InIterT it, InIterT end, bool &pos, const FormatT &fmt)