libstdc++
|
Public Types | |
typedef _CharT | char_type |
typedef _OutIter | iter_type |
typedef basic_string< _CharT > | string_type |
Public Member Functions | |
money_put (size_t __refs=0) | |
template<bool _Intl> | |
_OutIter | _M_insert (iter_type __s, ios_base &__io, char_type __fill, const string_type &__digits) const |
iter_type | put (iter_type __s, bool __intl, ios_base &__io, char_type __fill, long double __units) const |
iter_type | put (iter_type __s, bool __intl, ios_base &__io, char_type __fill, const string_type &__digits) const |
Static Public Attributes | |
static locale::id | id |
Protected Member Functions | |
virtual | ~money_put () |
template<bool _Intl> | |
iter_type | _M_insert (iter_type __s, ios_base &__io, char_type __fill, const string_type &__digits) const |
virtual iter_type | do_put (iter_type __s, bool __intl, ios_base &__io, char_type __fill, long double __units) const |
virtual iter_type | do_put (iter_type __s, bool __intl, ios_base &__io, char_type __fill, const string_type &__digits) const |
Primary class template money_put.
This facet encapsulates the code to format and output a monetary amount.
The money_put template uses protected virtual functions to provide the actual results. The public accessors forward the call to the virtual functions. These virtual functions are hooks for developers to implement the behavior they require from the money_put facet.
Definition at line 1621 of file locale_facets_nonio.h.
typedef _CharT std::money_put< _CharT, _OutIter >::char_type |
Public typedefs.
Definition at line 1626 of file locale_facets_nonio.h.
typedef _OutIter std::money_put< _CharT, _OutIter >::iter_type |
Public typedefs.
Definition at line 1627 of file locale_facets_nonio.h.
typedef basic_string<_CharT> std::money_put< _CharT, _OutIter >::string_type |
Public typedefs.
Definition at line 1628 of file locale_facets_nonio.h.
|
inlineexplicit |
Constructor performs initialization.
This is the constructor provided by the standard.
__refs | Passed to the base facet class. |
Definition at line 1642 of file locale_facets_nonio.h.
|
inlineprotectedvirtual |
Destructor.
Definition at line 1692 of file locale_facets_nonio.h.
|
protectedvirtual |
Format and output a monetary value.
This function formats units as a monetary value according to moneypunct and ctype facets retrieved from io.getloc(), and writes the resulting characters to __s. For example, the value 1001 in a US locale would write $10.01
to __s.
This function is a hook for derived classes to change the value returned.
__s | The stream to write to. |
__intl | Parameter to use_facet<moneypunct<CharT,intl> >. |
__io | Source of facets and io state. |
__fill | char_type to use for padding. |
__units | Place to store result of parsing. |
Definition at line 577 of file locale_facets_nonio.tcc.
References std::ios_base::getloc(), and std::__ctype_abstract_base< _CharT >::widen().
Referenced by std::money_put< _CharT, _OutIter >::put().
|
protectedvirtual |
Format and output a monetary value.
This function formats digits as a monetary value according to moneypunct and ctype facets retrieved from io.getloc(), and writes the resulting characters to __s. For example, the string 1001
in a US locale would write $10.01
to __s.
This function is a hook for derived classes to change the value returned.
__s | The stream to write to. |
__intl | Parameter to use_facet<moneypunct<CharT,intl> >. |
__io | Source of facets and io state. |
__fill | char_type to use for padding. |
__digits | Place to store result of parsing. |
Definition at line 615 of file locale_facets_nonio.tcc.
|
inline |
Format and output a monetary value.
This function formats units as a monetary value according to moneypunct and ctype facets retrieved from io.getloc(), and writes the resulting characters to __s. For example, the value 1001 in a US locale would write $10.01
to __s.
This function works by returning the result of do_put().
__s | The stream to write to. |
__intl | Parameter to use_facet<moneypunct<CharT,intl> >. |
__io | Source of facets and io state. |
__fill | char_type to use for padding. |
__units | Place to store result of parsing. |
Definition at line 1662 of file locale_facets_nonio.h.
References std::money_put< _CharT, _OutIter >::do_put().
|
inline |
Format and output a monetary value.
This function formats digits as a monetary value according to moneypunct and ctype facets retrieved from io.getloc(), and writes the resulting characters to __s. For example, the string 1001
in a US locale would write $10.01
to __s.
This function works by returning the result of do_put().
__s | The stream to write to. |
__intl | Parameter to use_facet<moneypunct<CharT,intl> >. |
__io | Source of facets and io state. |
__fill | char_type to use for padding. |
__digits | Place to store result of parsing. |
Definition at line 1685 of file locale_facets_nonio.h.
References std::money_put< _CharT, _OutIter >::do_put().
|
static |
Numpunct facet id.
Definition at line 1632 of file locale_facets_nonio.h.