VTK
Classes | Public Member Functions | List of all members
vtkNumberToString Class Reference

Convert floating and fixed point numbers to strings. More...

#include <vtkNumberToString.h>

Classes

struct  TagDouble
 
struct  TagFloat
 

Public Member Functions

template<typename T >
const T & operator() (const T &val) const
 
const TagDouble operator() (const double &val) const
 
const TagFloat operator() (const float &val) const
 

Detailed Description

Convert floating and fixed point numbers to strings.

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

Typical use:

float a = 1.0f/3.0f;
std::cout << convert(a) << std::endl;

Definition at line 41 of file vtkNumberToString.h.

Member Function Documentation

template<typename T >
const T& vtkNumberToString::operator() ( const T &  val) const
inline

Definition at line 57 of file vtkNumberToString.h.

const TagDouble vtkNumberToString::operator() ( const double val) const
inline

Definition at line 61 of file vtkNumberToString.h.

const TagFloat vtkNumberToString::operator() ( const float val) const
inline

Definition at line 62 of file vtkNumberToString.h.


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