49#ifndef vtkNumberToString_h
50#define vtkNumberToString_h
52#include "vtkCommonCoreModule.h"
58VTK_ABI_NAMESPACE_BEGIN
132 template <
typename T>
135 return std::to_string(val);
157 template <
typename T>
164 int LowExponent = -6;
165 int HighExponent = 20;
166 int Notation = Mixed;
Convert floating and fixed point numbers to strings.
const T & operator()(const T &val) const
int GetHighExponent()
Set/Get the HighExponent for string conversion.
void SetNotation(int notation)
Set/Get the notation used for string conversion.
int GetLowExponent()
Set/Get the LowExponent for string conversion.
int GetNotation()
Set/Get the notation used for string conversion.
void SetLowExponent(int lowExponent)
Set/Get the LowExponent for string conversion.
std::string Convert(float val)
Convert a number to an accurate string representation of that number.
void SetHighExponent(int highExponent)
Set/Get the HighExponent for string conversion.
std::string Convert(const T &val)
Convert a number to an accurate string representation of that number.
void SetPrecision(int precision)
Set/Get the floating-point precision used for string conversion.
std::string Convert(double val)
Convert a number to an accurate string representation of that number.
int GetPrecision()
Set/Get the floating-point precision used for string conversion.
TagDouble(const double &value)
TagFloat(const float &value)
VTKCOMMONCORE_EXPORT ostream & operator<<(ostream &stream, const vtkNumberToString::TagDouble &tag)