rapidcsv::Converter

Search for usage in LXR

rapidcsv::Converter< T > Class Template Reference

#include <rapidcsv.h>

Public Member Functions

 Converter (const ConverterParams &pConverterParams)
 
void ToStr (const std::string &pVal, std::string &pStr) const
 
void ToStr (const T &pVal, std::string &pStr) const
 
void ToVal (const std::string &pStr, QString &pVal) const
 
void ToVal (const std::string &pStr, std::string &pVal) const
 
void ToVal (const std::string &pStr, T &pVal) const
 
void ToVal (const std::string &pStr, typed_dms< coord_unit::deg > &pVal) const
 
void ToVal (const std::string &pStr, typed_dms< coord_unit::hours > &pVal) const
 

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 95 of file rapidcsv.h.

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 103 of file rapidcsv.h.

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 237 of file rapidcsv.h.

◆ 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 113 of file rapidcsv.h.

◆ 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 249 of file rapidcsv.h.

◆ 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 137 of file rapidcsv.h.


The documentation for this class was generated from the following file:
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Tue Aug 9 2022 04:06:12 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.