|
cgv
|
A class to store number formatting specification and allow converting numbers to strings. More...
#include <number_format.h>
Public Member Functions | |
| std::string | convert (float value) const |
| void | precision_from_range (float first, float last) |
Public Attributes | |
| unsigned | precision = 0 |
| bool | decimal_integers = false |
| bool | fixed = true |
| bool | trailing_zeros = true |
| int | group_size = 3 |
| std::string | group_separator = "," |
| bool | grouping = false |
A class to store number formatting specification and allow converting numbers to strings.
Definition at line 11 of file number_format.h.
| std::string cgv::utils::number_format::convert | ( | float | value | ) | const |
Definition at line 11 of file number_format.cxx.
| void cgv::utils::number_format::precision_from_range | ( | float | first, |
| float | last | ||
| ) |
Definition at line 44 of file number_format.cxx.
| bool cgv::utils::number_format::decimal_integers = false |
Definition at line 18 of file number_format.h.
| bool cgv::utils::number_format::fixed = true |
Definition at line 19 of file number_format.h.
| std::string cgv::utils::number_format::group_separator = "," |
Definition at line 22 of file number_format.h.
| int cgv::utils::number_format::group_size = 3 |
Definition at line 21 of file number_format.h.
| bool cgv::utils::number_format::grouping = false |
Definition at line 23 of file number_format.h.
| unsigned cgv::utils::number_format::precision = 0 |
Definition at line 17 of file number_format.h.
| bool cgv::utils::number_format::trailing_zeros = true |
Definition at line 20 of file number_format.h.