|
BDE 4.39.x Production Release
|
#include <bdldfp_decimal.h>
This class template provides the implementation for all possible decimal floating point formatting styles and the parsing of the format specification. The specified t_VALUE template type argument determines the type of decimal floating point value use, while the specified t_CHAR determines both the formatting string and the output's character type.
t_VALUE is one of Decimal32, Decimal64, orDecimal128`, andt_CHARis on ofcharorwchar_t`.See bdldfp_decimal
Public Member Functions | |
| template<class t_FORMAT_CONTEXT > | |
| t_FORMAT_CONTEXT::iterator | format (const t_VALUE &value, t_FORMAT_CONTEXT &formatContext) const |
| template<class t_PARSE_CONTEXT > | |
| BSLS_KEYWORD_CONSTEXPR_CPP20 t_PARSE_CONTEXT::iterator | parse (t_PARSE_CONTEXT &parseContext) |
| t_FORMAT_CONTEXT::iterator bdldfp::Decimal_BslFmtFormatterImpl< t_VALUE, t_CHAR >::format | ( | const t_VALUE & | value, |
| t_FORMAT_CONTEXT & | formatContext | ||
| ) | const |
Create string representation of the specified value, customized in accordance with the requested format and the specified formatContext, and copy it to the output that the output iterator of the formatContext points to.
t_FORMAT_CONTEXT is either std::format_context if that is supported, or otherwise bslfmt::format_context. | BSLS_KEYWORD_CONSTEXPR_CPP20 t_PARSE_CONTEXT::iterator bdldfp::Decimal_BslFmtFormatterImpl< t_VALUE, t_CHAR >::parse | ( | t_PARSE_CONTEXT & | parseContext | ) |
Parse the specified parseContext and return an iterator, pointing to the beginning of the unparsed section of the format string.
t_PARSE_CONTEXT is either std::parse_context if that is supported, or otherwise bslfmt::parse_context.