⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 numpunct.htm

📁 使用C++开发过程中
💻 HTM
字号:
<html>
<head>
<title>numpunct</title>
<head>

<body bgcolor="#FFFFFF">

<a name="here"></a>

<img src="numban.gif">


<pre>

<font size=5>Class Name</font>            numpunct

<font size=5>Header File</font>          &lt;locale&gt;

<font size=5>Classification</font>      abstract data type

</pre>

<a href="numpunct.htm#crd">Class Relationship Diagram</a><br> 
<br>
<a href="numpunct.htm#class-descrip">Class Description</a>


<h1>Member Classes</h1>
<a href="numpunct.htm#id">locale::id</a>


<h1>Methods</h1>
<pre>
<a href="numpunct.htm#decimal-point">
char_type decimal_point() const;</a> 

<a href="numpunct.htm#do-decimal-point">
virtual char_type do_decimal_point() const;</a> 

<a href="numpunct.htm#do-falsename">
virtual string_type do_falsename() const;</a>

<a href="numpunct.htm#do-grouping">
virtual string do_grouping() const;</a>

<a href="numpunct.htm#do-thousands-sep">
virtual char_type do_thousands_sep() const;</a> 

<a href="numpunct.htm#do-truename">
virtual string_type do_truename() const;</a> 

<a href="numpunct.htm#falsename">
string_type falsename() const;</a>

<a href="numpunct.htm#grouping">
string grouping() const;</a> 

<a href="numpunct.htm#numpunct">
explicit numpunct(size_t refs = 0);</a> 

<a href="numpunct.htm#~numpunct">
~numpunct();</a> 

<a href="numpunct.htm#thousands-sep">
char_type thousands_sep() const;</a> 

<a href="numpunct.htm#truename">
string_type truename() const;</a>

</pre>

<hr>

<a name="class-descrip"><h3>Class Description</h3></a>
<p>
The numpunct class describes a class used to specify the numeric punctuation by 
providing the classic "C" numeric formats.<br>
<br>
The syntax for the number formats are as follows:<br>
<br>
Integer values have this format:
</p>
<pre>
     integer       : : = [sign} units

     sign          : : = plusminus [whitespace]

     units         : : = digits [thousands-sep units]

     digits        : : = digit [digits]
</pre>
<p>
<em>digit</em> represents the radix set specified by <em>fmtflags</em> argument value. 
<em>whitespace</em> is determined by the facet ctype&lt;charT&gt;. <em>thousands-sep</em>
amd <em>decimal-point</em> are the results of the corresponding numpunct&lt;charT&gt; members.<br>
<br>
The floating-point values have:
</p>
<pre>
     floatval      : : = [sign] units [decimal-point [digits]] [e [sign] digits] |
                         [sign]        decimal-point  digits   [e [sign] digits] 

     e             : : = 'e' | 'E'
</pre>
<p>
The number of digits between <em>thousands-seps</em> is as specified by <em>do_grouping()</em>.
For parsing, if the <em>digits</em> portion contains no thousands-separators then no grouping constraint is used.
</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="decimal-point">
Method             decimal_point()</a>

Access             Public

Classification     Accessor

Syntax             char_type decimal_point() const;

Parameters         None

Returns            This method returns the decimal radix separator.

</pre>

<h3>Description</h3>
<p>
The decimal_point() member function returns do_decimal_point().
</p>
<hr>

<pre>
<a name="do-decimal-point">
Method             do_decimal_point()</a>

Access             Protected

Classification     Accessor

Syntax             char_type do_decimal_point() const;

Parameters         None

Return Type        char_type

</pre>

</p>

<h3>Description</h3>
<p>
The do_decimal_point() method returns a
a locale-specific character used as the decimal radix separator.
</p>
<hr>

<pre>
<a name="do-falsename">
Method             do_falsename()</a>

Access             Protected

Classification     Accessor

Syntax             string_type do_falsename() const;

Parameters         None

Return Type        string_type

</pre>

<h3>Description</h3>
<p>
The do_falsename() method returns a
locale-specific sequence that is used as text to represent the boolean
value of false.
</p>
<hr>

<pre>
<a name="do-grouping">
Method             do_grouping()</a>

Access             Protected

Classification     Accessor

Syntax             string do_grouping() const;

Parameters         None

Return Type        string

</pre>

<h3>Description</h3>
<p>
The do_grouping() method returns a locale-specific
basic_string&lt;char&gt; vec that is vector of integer values. Each element of the
vector is used to represent the number of digits in a grouping starting at position
0 as the rightmost group.
</p>
<hr>

<pre>
<a name="do-thousands-sep">
Method             do_thousands_sep()</a>

Access             Protected

Classification     Accessor

Syntax             string_type do_thousands_sep() const;

Parameters         None

Return Type        string_type

</pre>

<h3>Description</h3>
<p>
The do_thousands_sep() method returns a locale-specific
character used to as a digit group separator.
</p>
<hr>

<pre>
<a name="do-truename">
Method             do_truename()</a>

Access             Protected

Classification     Accessor

Syntax             string_type do_truename() const;

Parameters         None

Return Type        string_type

</pre>

<h3>Description</h3>
<p>
The do_truename() method returns a
locale-specific sequence that is used as text to represent the boolean
value of true.
</p>
<hr>

<pre>
<a name="falsename">
Method             falsename()</a>

Access             Public

Classification     Accessor

Syntax             string_type falsename() const;

Parameters         None

Returns            This method returns a sequence to represent the 
                   boolean value of false.

</pre>

<h3>Description</h3>
<p>
The falsename() method returns do_falsename().
</p>
<hr>

<pre>
<a name="grouping">
Method             grouping()</a>

Access             Public

Classification     Accessor

Syntax             string grouping() const;

Parameters         None

Returns            This method returns a vector in which each element 
                   is an integer value used to represent the number 
                   of digits in a grouping starting at position
                   0 as the rightmost group.

</pre>

<h3>Description</h3>
<p>
The grouping() method returns do_grouping().
</p>
<hr>

<pre>
<a name="numpunct">
Method             numpunct()</a>

Access             Public

Classification     Constructor

Syntax             explicit numpunct(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 numpunct facet object.
</p>
<hr>

<pre>
<a name="~numpunct">
Method             numpunct()</a>

Access             Public

Classification     Destructor

Syntax             ~numpunct();

Parameters         None

Returns            None

</pre>

<h3>Description</h3>
<p>
The destructor destroys a numpunct facet object.
</p>
<hr>

<pre>
<a name="thousands-sep">
Method             thousands_sep()</a>

Access             Protected

Classification     Accessor

Syntax             char_type thousands_sep() const;

Parameters         None

Returns            This method returns a character used to as a digit 
                   group separator.

</pre>

<h3>Description</h3>
<p>
The thousands_sep() member function returns do_thousands_sep();
</p>
<hr>

<pre>
<a name="truename">
Method             truename()</a>

Access             Public

Classification     Accessor

Syntax             string_type truename() const;

Parameters         None

Returns            This method returns a sequence to represent the
                   boolean value of true.

</pre>

<h3>Description</h3>
<p>
The truename() member function returns do_truename().
</p>
<hr>

<a name="crd"><h2>The Class Relationship Diagram for numpunct</h2></a>
<img src="numpunct.gif">
<hr>
</html>



⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -