FEDEM Solver  R8.0
Source code of the dynamics solver
Public Member Functions | List of all members
FFaNumStr Class Reference

Extension of the STL string class converting numbers to a text string. More...

#include <FFaStringExt.H>

Inheritance diagram for FFaNumStr:
Inheritance graph
[legend]
Collaboration diagram for FFaNumStr:
Collaboration graph
[legend]

Public Member Functions

 FFaNumStr (const char *format, int val)
 Constructor converting an integer value with a format string. More...
 
 FFaNumStr (const char *format, size_t val)
 Constructor converting an integer value with a format string. More...
 
 FFaNumStr (const char *format, float val)
 Constructor converting a float value with a format string. More...
 
 FFaNumStr (const char *format, double val)
 Constructor converting a double value with a format string. More...
 
 FFaNumStr (int val)
 Constructor converting an integer value. More...
 
 FFaNumStr (unsigned int val)
 Constructor converting an unsigned integer value. More...
 
 FFaNumStr (long int val)
 Constructor converting a long integer value. More...
 
 FFaNumStr (double val, char f='g', int precision=6)
 Constructs a string from a double value with a given precision. More...
 
 FFaNumStr (double val, int integerDigits, int precision=12, double ceiling=1.0e+7, double floor=1.0e-5, bool useDigitGrouping=false)
 Constructs a string from a double value with a given precision. More...
 

Detailed Description

Extension of the STL string class converting numbers to a text string.

Constructor & Destructor Documentation

◆ FFaNumStr() [1/9]

FFaNumStr::FFaNumStr ( const char *  format,
int  val 
)
inline

Constructor converting an integer value with a format string.

◆ FFaNumStr() [2/9]

FFaNumStr::FFaNumStr ( const char *  format,
size_t  val 
)
inline

Constructor converting an integer value with a format string.

◆ FFaNumStr() [3/9]

FFaNumStr::FFaNumStr ( const char *  format,
float  val 
)
inline

Constructor converting a float value with a format string.

◆ FFaNumStr() [4/9]

FFaNumStr::FFaNumStr ( const char *  format,
double  val 
)
inline

Constructor converting a double value with a format string.

◆ FFaNumStr() [5/9]

FFaNumStr::FFaNumStr ( int  val)
inline

Constructor converting an integer value.

◆ FFaNumStr() [6/9]

FFaNumStr::FFaNumStr ( unsigned int  val)
inline

Constructor converting an unsigned integer value.

◆ FFaNumStr() [7/9]

FFaNumStr::FFaNumStr ( long int  val)
inline

Constructor converting a long integer value.

◆ FFaNumStr() [8/9]

FFaNumStr::FFaNumStr ( double  val,
char  f = 'g',
int  precision = 6 
)

Constructs a string from a double value with a given precision.

This is the default double-to-string method.

Parameters
[in]valThe value to construct the string from
[in]fFormat specifier (typically, 'f' or 'g')
[in]precisionMax number of digits after decimal point

◆ FFaNumStr() [9/9]

FFaNumStr::FFaNumStr ( double  val,
int  integerDigits,
int  precision = 12,
double  ceiling = 1.0e+7,
double  floor = 1.0e-5,
bool  useDigitGrouping = false 
)

Constructs a string from a double value with a given precision.

Parameters
[in]valThe value to construct the string from
[in]integerDigitsNumber of digits after the decimal point when val is an integer value (0, 1, 2...)
[in]precisionMax number of digits after decimal point
[in]ceilingIf the absolute value of val is greater than or equal to this value, scientific notation is used (e.g., 1.98e+09)
[in]floorIf the absolute value of val is less than or equal to this value, scientific notation (e.g., 1.98e-09). If zero, decimal notation is enforced.
[in]useDigitGroupingIf true, any digits before the decimal point are grouped in space-separated triplets

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