std::money_put(3)

NAME
std::money_put -

SYNOPSIS

Inherits locale::facet.

Detailed Description

  template<typename _CharT, typename _OutIter> class std::money_put< _CharT, _OutIter >
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 4104 of file locale_facets.h.

  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, const string_type &__digits) const
iter_type put (iter_type __s, bool __intl, ios_base &__io, char_type __fill, long double __units) const

  Static Public Attributes
static locale::id id

  Protected Member Functions
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, 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 ~money_put ()

  Static Protected Member Functions
static __c_locale _S_clone_c_locale (__c_locale &__cloc)
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 ()

  Friends
class locale::_Impl

Member Typedef Documentation

  typedef _CharT char_type

Public typedefs.

Definition at line 4109 of file locale_facets.h.

  typedef _OutIter iter_type

Public typedefs.

Definition at line 4110 of file locale_facets.h.

  typedef basic_string<_CharT> string_type

Public typedefs.

Definition at line 4111 of file locale_facets.h.

Constructor & Destructor Documentation

  money_put (size_t __refs = 0) [inline, explicit]

Constructor performs initialization.

This is the constructor provided by the standard.

Parameters:
    refs Passed to the base facet class.

Definition at line 4125 of file locale_facets.h.

  virtual ~money_put () [inline, protected, virtual]

Destructor.

Definition at line 4174 of file locale_facets.h.

Member Function Documentation

  _OutIter do_put (iter_type __s, bool __intl, ios_base & __io, char_type __fill, const string_type & __digits) const [protected, virtual]

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.
    units Place to store result of parsing.

Returns:
    Iterator after writing.

Definition at line 1724 of file locale_facets.tcc.

  _OutIter do_put (iter_type __s, bool __intl, ios_base & __io, char_type __fill, long double __units) const [protected, virtual]

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.

Definition at line 1685 of file locale_facets.tcc.

References std::__convert_from_v(), ios_base::getloc(), and __ctype_abstract_base::widen().

Referenced by money_put::put().

  iter_type put (iter_type __s, bool __intl, ios_base & __io, char_type __fill, const string_type & __digits) const [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().

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 4167 of file locale_facets.h.

References money_put::do_put().

  iter_type put (iter_type __s, bool __intl, ios_base & __io, char_type __fill, long double __units) const [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().

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 4145 of file locale_facets.h.

References money_put::do_put().

Member Data Documentation

  locale::id id [static]

Numpunct facet id.

Definition at line 4115 of file locale_facets.h.

Author

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