📄 moneyput.htm
字号:
<html>
<head>
<title>money_put</title>
</head>
<body bgcolor="#FFFFFF">
<a name="here"></a>
<img src="monyban.gif">
<pre>
<font size=5>Class Name</font> money_put
<font size=5>Header File</font> <locale>
<font size=5>Classification</font> abstract data type
</pre>
<a href="moneyput.htm#crd">Class Relationship Diagram</a><br>
<br>
<a href="moneyput.htm#class-descrip">Class Description</a>
<h1>Member Classes</h1>
<a href="moneyput.htm#id">locale::id</a>
<h1>Methods</h1>
<pre>
<a href="moneyput.htm#do-put">
virtual iter_type do_put(iter_type, bool, ios_base&, char_type fill,
long double units) const;</a>
<a href="moneyput.htm#do-put">
virtual iter_type do_put(iter_type, bool, ios_base&, char_type fill,
const string_type& digits) const;</a>
<a href="moneyput.htm#money-put">
explicit money_put(size_t refs = 0);</a>
<a href="moneyput.htm#~money-put">
~money_put();</a>
<a href="moneyput.htm#put">
iter_type put(iter_type s, bool intl, ios_base& f, char_type fill,
long double units) const;</a>
<a href="moneyput.htm#put">
iter_type put(iter_type s, bool intl, ios_base& f, char_type fill,
const string_type& digits) const;</a>
</pre>
<hr>
<a name="class-descrip"><h3>Class Description</h3></a>
<p>
The money_put class describes a class used to take a sequence of digits and writes
out a formatted representation of the monetary value.
</p>
<hr>
<a name="id"><h3>locale::id</h3></a>
<p>
<em>locale::id</em> is a class used to provide an identification of a locale facet interfaces used as
an index for lookup and to encapsulate initialization.
</p>
<hr>
<pre>
<a name="do-put">
Method do_put()</a>
Access Protected
Classification Accessor
Syntax virtual iter_type do_put(iter_type s, bool intl,
ios_base& str,
char_type fill,
string_type& digits) const;
virtual iter_type do_put(iter_type s, bool intl,
ios_base& str,
char_type fill,
long double units) const;
Parameters <em>s</em> is an iterator pointing to the character buffer
used for output.
<em>intl</em> is set to true or false for international
formatting.
<em>str</em> is the reference of ios_base object used for
formatting information.
<em>fill</em> is the character used for padding.
<em>units/digits</em> contains the monetary value.
Returns The methods return an iterator that points to the
character past the last character produced.
</pre>
<h3>Description</h3>
<p>
The do_put() method generates a monetary value contained in
the parameter <em>units</em> or <em>digits</em>. It writes out a character string that is placed character buffer
pointed to by <em>s</em>. The character sequence is formatted according to the format specified by
str.flags() and the moneypunct<charT, true> or moneypunct<charT, false> facet of <em>loc</em>. This will
depend on whether <em>intl</em> is true or false. Since the monetary value stored in the arguments <em>units</em>
or <em>digits</em> is the smallest possible unit of currency, any fractional portions <em>units</em>
and any characters in <em>digits</em> beyond the optional leading '-' and immediately contiguous
digits are ignored. The currency symbol is generated only if (str.flags() & ios_base::showbase)
is true. If ((str.flags() & ios_base:adjustfield) == ios_base::internal) then the
<em>fill</em> argument will be placed where none or space appears in the formatting pattern. The methods
return an iterator that points to the character past the last character produced.
</p>
<hr>
<pre>
<a name="put">
Method put()</a>
Access Public
Classification Accessor
Syntax iter_type put(iter_type s, bool intl, ios_base& f,
char_type fill,
string_type& quant) const;
iter_type put(iter_type s, bool intl, ios_base& f,
char_type fill,
long double quant) const;
Parameters <em>s</em> is an iterator pointing to the character buffer
used for output.
<em>intl</em> is set to true or false for international
formatting.
<em>f</em> is the reference of ios_base object used for
formatting information.
<em>fill</em> is the character used for padding.
<em>quant</em> contains the monetary value.
Returns The methods return an iterator that points to the
character past the last character produced.
</pre>
<h3>Description</h3>
<p>
The put() member functions return do_put(s, intl, f, fill, quant).
</p>
<hr>
<pre>
<a name="money-put">
Method money_put()</a>
Access Public
Classification Constructor
Syntax explicit money_put(size_t refs = 0);
Parameters <em>refs</em>, if the refs argument = 0 then the destruction
of the object is delegated to the locale or locales
which contain it. If refs = 1 then the object must
be explicitly deleted. The locale will not delete
it. The object can then be maintained across the
lifetime of multiple locales.
Returns None
</pre>
<h3>Description</h3>
<p>
The constructor constructs a money_put facet object.
</p>
<hr>
<pre>
<a name="~money-put">
Method money_put()</a>
Access Protected
Classification Destructor
Syntax ~money_put();
Parameters None
Returns None
</pre>
<h3>Description</h3>
<p>
The destructor destroys a money_put facet object.
</p>
<hr>
<a name="crd"><h2>The Class Relationship Diagram for money_put</h2></a>
<img src="moneyput.gif">
<hr>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -