#include <TxqSciNumberFormat.h>
Public Methods | |
| TxqSciNumberFormat (TxqSciNumberPattern p) | |
| The constructor requires a SciNumberPattern. More... | |
| ~TxqSciNumberFormat () | |
| The destructor does nothing. More... | |
| QString | format (double d) |
| format does all the work of converting a double to the TxqSciNumberPattern format. More... | |
Private Attributes | |
| TxqSciNumberPattern | pattern |
| The class data TxqSciNumberPattern from the constructor. More... | |
To make the task a bit easier, implementation makes use of TxqFloatingDecimal class which breaks a double down into usable components. Given a double value, TxqFloatingDecimal class provides the following data 1. indicates if value is NaN or infinite by setting isExceptional to true (not yet implemented) 2. indicates if value is negative 3. can retrieve all needed digits in a digit array called digits[] and interprets them as an integer 4. nDigits indicates the number of digits in digit array. So, for example, if we need these number of digits value = 123.456 digits[] = {'1','2','3','4','5','6'}; or value = 12345.6 digits[] = {'1','2','3','4','5','6'};
Definition at line 51 of file TxqSciNumberFormat.h.
|
|
The constructor requires a SciNumberPattern.
Definition at line 60 of file TxqSciNumberFormat.h. |
|
|
The destructor does nothing.
Definition at line 68 of file TxqSciNumberFormat.h. |
|
|
format does all the work of converting a double to the TxqSciNumberPattern format.
Definition at line 75 of file TxqSciNumberFormat.h. |
|
|
The class data TxqSciNumberPattern from the constructor.
Definition at line 222 of file TxqSciNumberFormat.h. |
Copyright Tech-X Corporation, all rights reserved.