SYNOPSIS

Inherits std::locale::facet.

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)

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

Static Protected Member Functions

static __c_locale _S_clone_c_locale (__c_locale &__cloc) throw ()

static void _S_create_c_locale (__c_locale &__cloc, const char *__s, __c_locale __old=0)

static void _S_destroy_c_locale (__c_locale &__cloc)

static __c_locale _S_get_c_locale ()

static const char * _S_get_c_name () throw ()

static __c_locale _S_lc_ctype_c_locale (__c_locale __cloc, const char *__s)

Detailed Description

template<typename _CharT, typename _OutIter>singleton std::money_put< _CharT, _OutIter >

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 1521 of file locale_facets_nonio.h.

Member Typedef Documentation

template<typename _CharT , typename _OutIter > typedef _CharT \fBstd::money_put\fP< _CharT, _OutIter >::\fBchar_type\fP

Public typedefs.

Definition at line 1526 of file locale_facets_nonio.h.

template<typename _CharT , typename _OutIter > typedef _OutIter \fBstd::money_put\fP< _CharT, _OutIter >::\fBiter_type\fP

Public typedefs.

Definition at line 1527 of file locale_facets_nonio.h.

template<typename _CharT , typename _OutIter > typedef \fBbasic_string\fP<_CharT> \fBstd::money_put\fP< _CharT, _OutIter >::\fBstring_type\fP

Public typedefs.

Definition at line 1528 of file locale_facets_nonio.h.

Constructor & Destructor Documentation

template<typename _CharT , typename _OutIter > \fBstd::money_put\fP< _CharT, _OutIter >::\fBmoney_put\fP (size_t__refs = \fC0\fP)\fC [inline]\fP, \fC [explicit]\fP

Constructor performs initialization. This is the constructor provided by the standard.

Parameters:

__refs Passed to the base facet class.

Definition at line 1542 of file locale_facets_nonio.h.

template<typename _CharT , typename _OutIter > virtual \fBstd::money_put\fP< _CharT, _OutIter >::~\fBmoney_put\fP ()\fC [inline]\fP, \fC [protected]\fP, \fC [virtual]\fP

Destructor.

Definition at line 1592 of file locale_facets_nonio.h.

Member Function Documentation

template<typename _CharT , typename _OutIter > virtual \fBiter_type\fP \fBstd::money_put\fP< _CharT, _OutIter >::do_put (\fBiter_type\fP__s, bool__intl, \fBios_base\fP &__io, \fBchar_type\fP__fill, long double__units) const\fC [protected]\fP, \fC [virtual]\fP

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.

See also:

put().

Parameters:

__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.

Returns:

Iterator after writing.

Referenced by std::money_put< _CharT, _OutIter >::put().

template<typename _CharT , typename _OutIter > virtual \fBiter_type\fP \fBstd::money_put\fP< _CharT, _OutIter >::do_put (\fBiter_type\fP__s, bool__intl, \fBios_base\fP &__io, \fBchar_type\fP__fill, const \fBstring_type\fP &__digits) const\fC [protected]\fP, \fC [virtual]\fP

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.

See also:

put().

Parameters:

__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.

Returns:

Iterator after writing.

template<typename _CharT , typename _OutIter > \fBiter_type\fP \fBstd::money_put\fP< _CharT, _OutIter >::put (\fBiter_type\fP__s, bool__intl, \fBios_base\fP &__io, \fBchar_type\fP__fill, long double__units) const\fC [inline]\fP

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().

Parameters:

__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.

Returns:

Iterator after writing.

Definition at line 1562 of file locale_facets_nonio.h.

References std::money_put< _CharT, _OutIter >::do_put().

template<typename _CharT , typename _OutIter > \fBiter_type\fP \fBstd::money_put\fP< _CharT, _OutIter >::put (\fBiter_type\fP__s, bool__intl, \fBios_base\fP &__io, \fBchar_type\fP__fill, const \fBstring_type\fP &__digits) const\fC [inline]\fP

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().

Parameters:

__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.

Returns:

Iterator after writing.

Definition at line 1585 of file locale_facets_nonio.h.

References std::money_put< _CharT, _OutIter >::do_put().

Member Data Documentation

template<typename _CharT , typename _OutIter > \fBlocale::id\fP \fBstd::money_put\fP< _CharT, _OutIter >::id\fC [static]\fP

Numpunct facet id.

Definition at line 1532 of file locale_facets_nonio.h.

Author

Generated automatically by Doxygen for libstdc++ from the source code.