template<class CHARTYPE, class OUTPUTITERATOR = bsl::ostreambuf_iterator<CHARTYPE>>
class bdldfp::DecimalNumPut< CHARTYPE, OUTPUTITERATOR >
A facet type (mechanism) used in writing decimal floating-point types. Note that this type does not follow BDE conventions because its content is dictated by the C++ standard and native standard library implementations. See ISO/IEC TR 24733 3.10.3 for details.
See bdldfp_decimal
template<class CHARTYPE , class OUTPUTITERATOR = bsl::ostreambuf_iterator<CHARTYPE>>
Write characters (of char_type ) that represent the specified value
to the output stream determined by the specified out
output iterator. Use the bsl::ctype
and the bsl::numpunct
facets imbued to the specified stream-base ios_format as well as the formatting flags of the ios_format (bsl.flags()
) to generate the properly localized output. The specified fill
character will be used as a placeholder character in padded output. For further, more detailed information please consult the section [lib.facet.num.put.virtuals] of the C++ Standard noting that the length modifiers "H", "D" and "DD" are added to the conversion specifiers of for the types Decimal32, 64 and 128, respectively. Also note that these (possibly overridden) do_put
virtual function are used by every formatted C++ stream output operator call (out << aDecNumber
). Note that currently, only the width, capitalization, justification, fixed and scientific formatting flags are supported, and the operators only support code pages that include the ASCII sub-range. Because of potential future improvements to support additional formatting flags, the operations should not be used for serialization.
template<class CHARTYPE , class OUTPUTITERATOR = bsl::ostreambuf_iterator<CHARTYPE>>
template<class DECIMAL >
Write characters that represent the specified value
into a string of the specified char_type , and output the represented decimal number to the specified out
, adjusting for the formatting flags in the specified ios_format and using the specified fill
character. Currently, formatting for the formatting flags of justification, width, uppercase, showpos, fixed and scientific are supported.
template<class CHARTYPE , class OUTPUTITERATOR = bsl::ostreambuf_iterator<CHARTYPE>>
Forward to, and return using the specified out
, str
, fill
, and value
, the results of this->do_put(out, str, fill, value)
.