📄 mnypunct.htm
字号:
<html>
<head>
<title>moneypunct</title>
<head>
<body bgcolor="#FFFFFF">
<a name="here"></a>
<img src="monyban.gif">
<pre>
<font size=5>Class Name</font> moneypunct
<font size=5>Header File</font> <locale>
<font size=5>Classification</font> abstract data type
</pre>
<a href="mnypunct.htm#crd">Class Relationship Diagram</a><br>
<br>
<a href="mnypunct.htm#class-descrip">Class Description</a>
<h1>Member Classes</h1>
<a href="mnypunct.htm#id">locale::id</a>
<h1>Methods</h1>
<pre>
<a href="mnypunct.htm#curr-symbol">
string_type curr_symbol() const;</a>
<a href="mnypunct.htm#decimal-point">
charT decimal_point() const;</a>
<a href="mnypunct.htm#do-curr-symbol">
virtual string_type do_curr_symbol() const;</a>
<a href="mnypunct.htm#do-decimal-point">
virtual charT do_decimal_point() const;</a>
<a href="mnypunct.htm#do-frac-digits">
virtual int do_frac_digits() const;</a>
<a href="mnypunct.htm#do-grouping">
virtual string do_grouping() const;</a>
<a href="mnypunct.htm#do-neg-format">
virtual pattern do_neg_format() const;</a>
<a href="mnypunct.htm#do-negative-sign">
virtual string_type do_negative_sign() const;</a>
<a href="mnypunct.htm#do-pos-format">
virtual pattern do_pos_format() const;</a>
<a href="mnypunct.htm#do-positive-sign">
virtual string_type do_positive_sign() const;</a>
<a href="mnypunct.htm#do-thousands-sep">
virtual charT do_thousands_sep() const;</a>
<a href="mnypunct.htm#frac-digits">
int frac_digits() const;</a>
<a href="mnypunct.htm#grouping">
string grouping() const;</a>
<a href="mnypunct.htm#moneypunct">
explicit moneypunct(size_t refs = 0);</a>
<a href="mnypunct.htm#~moneypunct">
~moneypunct();</a>
<a href="mnypunct.htm#neg-format">
pattern neg_format() const;</a>
<a href="mnypunct.htm#negative-sign">
string_type negative_sign() const;</a>
<a href="mnypunct.htm#pos-format">
pattern pos_format() const;</a>
<a href="mnypunct.htm#positive-sign">
string_type positive_sign() const;</a>
<a href="mnypunct.htm#thousands-sep">
charT thousands_sep() const;</a>
</pre>
<hr>
<a name="class-descrip"><h3>Class Description</h3></a>
<p>
The moneypunct class describes a class used to provide money punctuation.
</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="curr-symbol">
Method curr_symbol()</a>
Access Public
Classification Accessor
Syntax string_type curr_symbol() const;
Parameters None
Returns This method returns a string_type used as the
currency symbol.
</pre>
<h3>Description</h3>
<p>
The curr_symbol() method returns do_curr_symbol().
</p>
<hr>
<pre>
<a name="decimal-point">
Method decimal_point()</a>
Access Public
Classification Accessor
Syntax charT decimal_point() const;
Parameters None
Returns This method returns a charT used as the decimal
point.
</pre>
<h3>Description</h3>
<p>
The decimal_point() method returns do_decimal_point().
</p>
<hr>
<pre>
<a name="do-curr-symbol">
Method do_curr_symbol()</a>
Access Protected
Classification Accessor
Syntax virtual string_type do_curr_symbol() const;
Parameters None
Returns This method returns a string_type used as the
currency symbol.
</pre>
<h3>Description</h3>
<p>
The do_curr_symbol() method returns a sequence of elements used as the currency symbol.
</p>
<hr>
<pre>
<a name="do-decimal-point">
Method do_decimal_point()</a>
Access Protected
Classification Accessor
Syntax virtual charT do_decimal_point() const;
Parameters None
Returns This method returns a charT used as the decimal point.
</pre>
<h3>Description</h3>
<p>
The do_decimal_point() method returns a character used as the decimal point.
</p>
<hr>
<pre>
<a name="do-frac-digits">
Method do_frac_digits()</a>
Access Protected
Classification Accessor
Syntax virtual int do_frac_digits() const;
Parameters None
Return Type int
</pre>
<h3>Description</h3>
<p>
The do_frac_digits() method returns the number of digits in the fractional part
(displayed to the right of the decimal point) of the monetary value.
</p>
<hr>
<pre>
<a name="do-grouping">
Method do_grouping()</a>
Access Protected
Classification Accessor
Syntax virtual string do_grouping() const;
Parameters None
Returns This method returns a string used as a pattern of
the number of digits in a particular grouping.
</pre>
<h3>Description</h3>
<p>
The do_grouping() method returns a string in which each character of the string
is used as an integer value which represents the number of digits in a particular
grouping, starting with the rightmost group. A group is the digits between the
adjacent thousands' separators. The returned value has the same result as the
numpunct<charT>::do_grouping().
</p>
<hr>
<pre>
<a name="do-neg-format">
Method do_neg_format()</a>
Access Protected
Classification Accessor
Syntax virtual pattern do_neg_format() const;
Parameters None
Returns This method returns a pattern which is a four
element array that specifies the order in which
syntactic elements appear in the monetary format.
</pre>
<h3>Description</h3>
<p>
The do_neg_format() method returns a pattern that is a four element array. The
array specifies the order in which syntactic elements appear in the monetary format.
Each enumeration value in the array (<a href="mnypunct.htm#Table1">symbol</a>,
<a href="mnypunct.htm#Table1">sign</a>, <a href="mnypunct.htm#Table1">value</a>,
and either <a href="mnypunct.htm#Table1">space</a> or <a href="mnypunct.htm#Table1">none</a>)
appears only once. <a href="mnypunct.htm#Table1">none</a>, if present, will never occupy the
first position. <a href="mnypunct.htm#Table1">space</a>,
if present, will not appear in the first or last position. Otherwise, the elements
may appear in any order.
</p>
<hr>
<pre>
<a name="do-negative-sign">
Method do_negative_sign()</a>
Access Protected
Classification Accessor
Syntax virtual string_type do_negative_sign() const;
Parameters None
Return This method returns a string_type that is used to
indicate a negative monetary value.
</pre>
<h3>Description</h3>
<p>
The do_negative_sign() methods returns a sequence of elements used as a negative sign.
</p>
<hr>
<pre>
<a name="do-pos-format">
Method do_pos_format()</a>
Access Protected
Classification Accessor
Syntax virtual pattern do_pos_format() const;
Parameters None
Returns This method returns a pattern that is a four element
array which specifies the order in which syntactic
elements appear in the monetary format.
</pre>
<h3>Description</h3>
<p>
The do_pos_format() method returns a pattern that is a four element array. The
array specifies the order in which syntactic elements appear in the monetary format.
Each enumeration value in the array (<a href="mnypunct.htm#Table1">symbol</a>, <a href="mnypunct.htm#Table1">sign</a>,
<a href="mnypunct.htm#Table1">value</a>, and either <a href="mnypunct.htm#Table1">space</a> or
<a href="mnypunct.htm#Table1">none</a>)
appears only once. <a href="mnypunct.htm#Table1">none</a>, if present, will never occupy the
first position. <a href="mnypunct.htm#Table1">space</a>,
if present, will not appear in the first or last position. Otherwise, the elements
may appear in any order.
</p>
<hr>
<pre>
<a name="do-positive-sign">
Method do_positive_sign()</a>
Access Protected
Classification Accessor
Syntax string_type do_positive_sign() const;
Parameters None
Returns This method returns a string_type that is used to
indicate a positive monetary value.
</pre>
<h3>Description</h3>
<p>
The do_postive_sign() methods returns a sequence of elements used as a positive sign.
</p>
<hr>
<pre>
<a name="do-thousands-sep">
Method do_thousands_sep()</a>
Access Protected
Classification Accessor
Syntax virtual charT do_thousands_sep() const;
Parameters None
Returns This method returns a charT used as a digit group
separator.
</pre>
<h3>Description</h3>
<p>
The do_thousands_sep() method returns an element to use as a group separator to the
left of any decimal point. It is used when the do_grouping() method specifies a
digit grouping pattern.
</p>
<hr>
<pre>
<a name="frac-digits">
Method frac_digits()</a>
Access Public
Classification Accessor
Syntax int frac_digits() const;
Parameters None
Returns This method returns the number of digits in the
fractional part (displayed to the right of the
decimal point) of the monetary value.
</pre>
<h3>Description</h3>
<p>
The frac_digits() method returns do_frac_digits().
</p>
<hr>
<pre>
<a name="grouping">
Method grouping()</a>
Access Public
Classification Accessor
Syntax string grouping() const;
Parameters None
Returns This method returns a string that is used as a
pattern of the number of digits in a particular
grouping.
</pre>
<h3>Description</h3>
<p>
The grouping() method returns do_grouping().
</p>
<hr>
<pre>
<a name="moneypunct">
Method moneypunct()</a>
Access Public
Classification Constructor
Syntax explicit moneypunct(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 moneypunct facet object.
</p>
<hr>
<pre>
<a name="~moneypunct">
Method moneypunct()</a>
Access Public
Classification Destructor
Syntax ~moneypunct();
Parameters None
Returns None
</pre>
<h3>Description</h3>
<p>
The destructor destroys a moneypunct facet object.
</p>
<hr>
<pre>
<a name="neg-format">
Method neg_format()</a>
Access Public
Classification Accessor
Syntax pattern neg_format() const;
Parameters None
Returns This method returns pattern that is a four element
array that specifies the order in which syntactic
elements appear in the monetary format.
</pre>
<h3>Description</h3>
<p>
The neg_format() method returns do_neg_format().
</p>
<hr>
<pre>
<a name="negative-sign">
Method negative_sign()</a>
Access Public
Classification Accessor
Syntax string_type negative_sign() const;
Parameters None
Returns This method returns a string_type that is used to
indicate a negative monetary value.
</pre>
<h3>Description</h3>
<p>
The negative_sign() methods returns do_negative_sign().
</p>
<hr>
<pre>
<a name="pos-format">
Method pos_format()</a>
Access Public
Classification Accessor
Syntax pattern pos_format() const;
Parameters None
Returns This method returns a pattern that is a four element
array that specifies the order in which syntactic
elements appear in the monetary format.
</pre>
<h3>Description</h3>
<p>
The pos_format() method returns do_pos_format().
</p>
<hr>
<pre>
<a name="positive-sign">
Method positive_sign()</a>
Access Public
Classification Accessor
Syntax string_type positive_sign() const;
Parameters None
Returns This method returns a string_type that is used to
indicate a positive monetary value.
</pre>
<h3>Description</h3>
<p>
The postive_sign() methods returns do_positive_sign().
</p>
<hr>
<pre>
<a name="thousands-sep">
Method thousands_sep()</a>
Access Public
Classification Accessor
Syntax charT thousands_sep() const;
Parameters None
Returns This method returns a charT that is used as a
digit group separator.
</pre>
<h3>Description</h3>
<p>
The thousands_sep() method returns do_thousands_sep().
</p>
<hr>
<a name="Table1"><h4>TABLE 1:</h4></a>
<p>
The meaning of the elements are:
</p>
<hr>
<pre>
value To match or generate a monetary value.
none To match zero or more spaces or generate nothing.
sign To match or generate a negative or postive sign.
space To match zero or more spaces or generate a space.
symbol To match or generate a currency symbol.
</pre>
<hr>
<a name="crd"><h2>The Class Relationship Diagram for moneypunct</h2></a>
<img src="mnypunct.gif">
<hr>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -