cphot 0.1
A C++ tool for computing photometry from spectra.
rapidcsv::Converter< T > Class Template Reference

Class providing conversion to/from numerical datatypes and strings. More...

#include <rapidcsv.hpp>

Public Member Functions

 Converter (const ConverterParams &pConverterParams)
 Constructor. More...
 
void ToStr (const T &pVal, std::string &pStr) const
 Converts numerical value to string representation. More...
 
void ToVal (const std::string &pStr, T &pVal) const
 Converts string holding a numerical value to numerical datatype representation. More...
 
void ToStr (const std::string &pVal, std::string &pStr) const
 Specialized implementation handling string to string conversion. More...
 
void ToVal (const std::string &pStr, std::string &pVal) const
 Specialized implementation handling string to string conversion. More...
 

Detailed Description

template<typename T>
class rapidcsv::Converter< T >

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.

Definition at line 107 of file rapidcsv.hpp.

Constructor & Destructor Documentation

◆ Converter()

template<typename T >
rapidcsv::Converter< T >::Converter ( const ConverterParams pConverterParams)
inline

Constructor.

Parameters
pConverterParamsspecifies how conversion of non-numerical values to numerical datatype shall be handled.

Definition at line 115 of file rapidcsv.hpp.

Member Function Documentation

◆ ToStr() [1/2]

void rapidcsv::Converter< std::string >::ToStr ( const std::string &  pVal,
std::string &  pStr 
) const
inline

Specialized implementation handling string to string conversion.

Parameters
pValstring
pStrstring

Definition at line 253 of file rapidcsv.hpp.

◆ ToStr() [2/2]

template<typename T >
void rapidcsv::Converter< T >::ToStr ( const T &  pVal,
std::string &  pStr 
) const
inline

Converts numerical value to string representation.

Parameters
pValnumerical value
pStroutput string

Definition at line 125 of file rapidcsv.hpp.

◆ ToVal() [1/2]

void rapidcsv::Converter< std::string >::ToVal ( const std::string &  pStr,
std::string &  pVal 
) const
inline

Specialized implementation handling string to string conversion.

Parameters
pValstring
pStrstring

Definition at line 264 of file rapidcsv.hpp.

◆ ToVal() [2/2]

template<typename T >
void rapidcsv::Converter< T >::ToVal ( const std::string &  pStr,
T &  pVal 
) const
inline

Converts string holding a numerical value to numerical datatype representation.

Parameters
pValnumerical value
pStroutput string

Definition at line 153 of file rapidcsv.hpp.


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