ITK  4.4.0
Insight Segmentation and Registration Toolkit
Public Member Functions | Private Member Functions | Private Attributes | List of all members
itk::NumberToString< TValueType > Class Template Reference

#include <itkNumberToString.h>

Detailed Description

template<typename TValueType>
class itk::NumberToString< TValueType >

Convert floating and fixed point numbers to strings.

This class uses the double-conversion library to floating point and fixed point numbers to ASCII versions that are represented without numerical precision errors.

Typical use: #include "itkNumberToStrong.h" NumberToString<float> convert; float a = 1.0f/3.0f; std::cout << convert(a) << std::endl;

Definition at line 43 of file itkNumberToString.h.

Public Member Functions

 NumberToString ()
 
std::string operator() (TValueType val)
 
template<>
ITKCommon_EXPORT std::string operator() (double val)
 
template<>
ITKCommon_EXPORT std::string operator() (float val)
 

Private Member Functions

NumberToStringoperator= (const NumberToString &)
 

Private Attributes

const
double_conversion::DoubleToStringConverter & 
m_DoubleToStringConverter
 

Constructor & Destructor Documentation

template<typename TValueType>
itk::NumberToString< TValueType >::NumberToString ( )
inline

Definition at line 46 of file itkNumberToString.h.

Member Function Documentation

template<typename TValueType>
std::string itk::NumberToString< TValueType >::operator() ( TValueType  val)
template<>
ITKCommon_EXPORT std::string itk::NumberToString< double >::operator() ( double  val)
template<>
ITKCommon_EXPORT std::string itk::NumberToString< float >::operator() ( float  val)
template<typename TValueType>
NumberToString& itk::NumberToString< TValueType >::operator= ( const NumberToString< TValueType > &  )
private

Member Data Documentation

template<typename TValueType>
const double_conversion::DoubleToStringConverter& itk::NumberToString< TValueType >::m_DoubleToStringConverter
private

Definition at line 54 of file itkNumberToString.h.


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