money_put Class Template Reference

#include <locale_facets.h>

Inheritance diagram for money_put:

Inheritance graph
Collaboration diagram for money_put:

Collaboration graph
List of all members.

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

Public Types

Public Member Functions

Static Public Attributes

Protected Member Functions

Static Protected Member Functions


Member Typedef Documentation

typedef CharT char_type
 

Public typedefs.

Definition at line 4108 of file locale_facets.h.

Referenced by money_put::do_put().

typedef OutIter iter_type
 

Public typedefs.

Definition at line 4109 of file locale_facets.h.

Referenced by money_put::do_put().

typedef basic_string<CharT> string_type
 

Public typedefs.

Definition at line 4110 of file locale_facets.h.

Referenced by money_put::do_put(), and money_put::put().


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

virtual ~money_put  )  [inline, protected, virtual]
 

Destructor.

Definition at line 4173 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 1717 of file locale_facets.tcc.

References money_put::char_type, money_put::iter_type, and money_put::string_type.

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 1678 of file locale_facets.tcc.

References money_put::char_type, ios_base::getloc(), money_put::iter_type, money_put::string_type, 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 4166 of file locale_facets.h.

References money_put::do_put(), and money_put::string_type.

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

References money_put::do_put().


Member Data Documentation

locale::id id [static]
 

Numpunct facet id.

Definition at line 4226 of file locale_facets.h.


The documentation for this class was generated from the following files:
Generated on Sun Sep 12 15:50:23 2004 for libstdc++ source by doxygen 1.3.8