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/5]

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

Definition at line 65 of file catalogcsvimport.h.

◆ ToVal() [2/5]

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() [3/5]

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.

◆ ToVal() [4/5]

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

Definition at line 48 of file catalogcsvimport.h.

◆ ToVal() [5/5]

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

Definition at line 57 of file catalogcsvimport.h.


The documentation for this class was generated from the following file:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:19:05 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.