Class providing conversion to/from numerical datatypes and strings. Only intended for rapidcsv internal usage, but exposed externally to allow specialization for custom datatype conversions.
template<typename T> Converter (const ConverterParams & pConverterParams)
Constructor.
Parameters
pConverterParams
specifies how conversion of non-numerical values to numerical datatype shall be handled.
template<typename T> void ToStr (const T & pVal, std::string & pStr)
Converts numerical value to string representation.
Parameters
pVal
numerical valuepStr
output string
template<> void Converter< std::string >::ToStr (const std::string & pVal, std::string & pStr)
Specialized implementation handling string to string conversion.
Parameters
pVal
stringpStr
string
template<typename T> void ToVal (const std::string & pStr, T & pVal)
Converts string holding a numerical value to numerical datatype representation.
Parameters
pVal
numerical valuepStr
output string
template<> void Converter< std::string >::ToVal (const std::string & pStr, std::string & pVal)
Specialized implementation handling string to string conversion.
Parameters
pVal
stringpStr
string