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 4147 of file locale_facets.h.
typedef _CharT char_type |
typedef _OutIter iter_type |
typedef basic_string<_CharT> string_type |
money_put | ( | size_t | __refs = 0 |
) | [inline, explicit] |
Constructor performs initialization.
This is the constructor provided by the standard.
refs | Passed to the base facet class. |
Definition at line 4168 of file locale_facets.h.
virtual ~money_put | ( | ) | [inline, protected, virtual] |
_OutIter do_put | ( | iter_type | __s, | |
bool | __intl, | |||
ios_base & | __io, | |||
char_type | __fill, | |||
const string_type & | __digits | |||
) | const [inline, 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.
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 1785 of file locale_facets.tcc.
_OutIter do_put | ( | iter_type | __s, | |
bool | __intl, | |||
ios_base & | __io, | |||
char_type | __fill, | |||
long double | __units | |||
) | const [inline, 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.
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 1746 of file locale_facets.tcc.
References 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().
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 4210 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().
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 4188 of file locale_facets.h.
References money_put::do_put().
locale::id id [inline, static] |