Conversions Namespace Reference

Various conversion functions for common usage. More...


Typedefs

typedef char * PtrToChar

Functions

template<typename T>
std::string ToString (const T &value)
 Converts selected value into string.
template<>
std::string ToString< bool > (const bool &value)
 Specialization for bool.
template<>
std::string ToString< double > (const double &value)
 Specialization for double.
template<>
std::string ToString< float > (const float &value)
 Specialization for float.
template<>
std::string ToString< long double > (const long double &value)
 Specialization for long double.
template<>
std::string ToString< std::string > (const std::string &value)
 Specialization for std::string.
template<>
std::string ToString< PtrToChar > (const PtrToChar &value)
 Specialization for char *.
template<>
std::string ToString< char > (const char &value)
 Specialization for char.
template<typename N>
bool StringToNumber (const std::string &str, N &number, std::ios_base &(*format)(std::ios_base &)=std::dec)
 Converts selected string into number.
wxString string2wxString (const std::string &str)
 Converts std::string into wxString.
std::string wxString2string (const wxString &str)
 Converts wxString into std::string.


Detailed Description

Various conversion functions for common usage.

Typedef Documentation

typedef char* Conversions::PtrToChar


Function Documentation

template<typename T>
std::string Conversions::ToString ( const T &  value  )  [inline]

Converts selected value into string.

Parameters:
value Value that should be converted into string

template<>
std::string Conversions::ToString< bool > ( const bool &  value  )  [inline]

Specialization for bool.

template<>
std::string Conversions::ToString< double > ( const double &  value  )  [inline]

Specialization for double.

template<>
std::string Conversions::ToString< float > ( const float &  value  )  [inline]

Specialization for float.

template<>
std::string Conversions::ToString< long double > ( const long double &  value  )  [inline]

Specialization for long double.

template<>
std::string Conversions::ToString< std::string > ( const std::string &  value  )  [inline]

Specialization for std::string.

template<>
std::string Conversions::ToString< PtrToChar > ( const PtrToChar value  )  [inline]

Specialization for char *.

template<>
std::string Conversions::ToString< char > ( const char &  value  )  [inline]

Specialization for char.

template<typename N>
bool Conversions::StringToNumber ( const std::string &  str,
N &  number,
std::ios_base &(*)(std::ios_base &)  format = std::dec 
) [inline]

Converts selected string into number.

Parameters:
str String that should be converted into number
number Into this parameter the result number will be saved
format Number format (e.g. std::dec, std::hex)
Returns:
Returns true if the conversion went OK, false otherwise
If the conversion fails, number value will be left unchanged.

wxString Conversions::string2wxString ( const std::string &  str  )  [inline]

Converts std::string into wxString.

Parameters:
str String to be converted
Used encoding: UTF8

std::string Conversions::wxString2string ( const wxString &  str  )  [inline]

Converts wxString into std::string.

Parameters:
str String to be converted


Generated on Sun Apr 29 11:46:11 2007 for IPP/ICP2007 by  doxygen 1.4.7