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

📄 tmgetnam.htm

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

<body bgcolor="#FFFFFF">

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

<img src="timeban.gif">

<pre>

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

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

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

</pre>

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

<h1>Member Classes</h1>
<p>
None
</p>

<h1>Methods</h1>
<pre>

<a href="tmgetnam.htm#do-date-order">
virtual dateorder do_date_order() const;</a> 

<a href="tmgetnam.htm#do-get-date">
virtual iter_type do_get_date(iter_type s, iter_type end, 
ios_base&, ios_base::iostate& err, tm* t) const;</a>

<a href="tmgetnam.htm#do-get-monthname">
virtual iter_type do_get_monthname(iter_type s, iter_type end, 
ios_base&, ios_base::iostate& err, tm* t) const;</a> 

<a href="tmgetnam.htm#do-get-time">
virtual iter_type do_get_time(iter_type s, iter_type end, 
ios_base&, ios_base::iostate& err, tm* t) const;</a> 

<a href="tmgetnam.htm#do-get-weekday">
virtual iter_type do_get_weekday(iter_type s, iter_type end, 
ios_base&, ios_base::iostate& err, tm* t) const;</a> 

<a href="tmgetnam.htm#do-get-year">
virtual iter_type do_get_year(iter_type s, iter_type end, ios_base&, 
ios_base::iostate& err, tm* t) const;</a>

<a href="tmgetnam.htm#time-get-byname">
explicit time_get_byname(const char*, size_t refs = 0);</a>

<a href="tmgetnam.htm#~time-get-byname">
~time_get_byname();</a>

</pre>
<hr>

<a name="class-descrip"><h3>Class Description</h3><a/>
<p>
The time_get_byname class describes a class that provides the same functionality as
the time_get class for a particular named locale. 
</p>
<hr>

<pre>
<a name="do-date-order">
Method             do_date_order()</a>

Access             Protected

Classification     Accessor

Syntax             virtual dateorder do_date_order() const;

Parameters         None

Returns            This method returns a value which describes
                   the preferred order of the date components
                   composed of day, month and year.

</pre>

<h3>Description</h3>
<p>
The do_date_order() method returns a value of
type dateorder which describes the preferred order of the date components
composed of day, month and year. The method returns no_order if the
date format contains other components (e.g. Julian day, week number, week day).
</p>
<hr>

<pre>
<a name="do-get-date">
Method             do_get_date()</a>

Access             Protected

Classification     Accessor

Syntax             virtual iter_type do_get_date(iter_type s,
                                                 iter_type end,
                                                 ios_base& str,
                                                 ios_base::iostate& err,
                                                 tm *t) const;

Parameters         <em>s</em> is an input iterator that points to the beginning
                   character of a character sequence.

                   <em>end</em> is an input iterator that points to the end
                   character of a character sequence.

                   <em>str</em> is the reference to the ios_base object.

                   <em>err</em> is set to ios_base::failbit when an error
                   occurs.

                   <em>t</em> is the struct tm in which the date field is
                   stored.


Returns            This method returns an iterator that points
                   immediately beyond the last character of the valid
                   date field.

</pre>

<h3>Description</h3>
<p>
The do_get_date() method reads the characters from the
character sequence (s, end] until it has extracted the members of the struct
tm and the all of the remaining format characters that were used by
time_put&lt; &gt;::put object. Characters are extracted until all the members of the
struct <em>tm</em> has been removed, until an error has been encountered or the end of
the sequence has been reached. The results are stored in the struct <em>tm</em>. It returns
an iterator that points immediately beyond the last character of the valid date field.
If the buffer does not contain a valid date (this being an error), the member
function will set the <em>err</em> argument to the ios_base::failbit. But if the 
return value equals last, then the member function will set
ios_base::eofbit in <em>str</em>.
</p>
<hr>

<pre>
<a name="do-get-monthname">
Method             do_get_monthname()</a>

Access             Protected

Classification     Accessor

Syntax             virtual iter_type do_get_monthname(iter_type s,
                                                      iter_type end,
                                                      ios_base& str,
                                                      ios_base::iostate& err,
                                                      tm *t) const;

Parameters         <em>s</em> is an input iterator that points to the beginning
                   character of a character sequence.

                   <em>end</em> is an input iterator that points to the end
                   character of a character sequence.

                   <em>str</em> is the reference to the ios_base object.

                   <em>err</em> is set to ios_base::failbit when an error
                   occurs.

                   <em>t</em> is the struct tm in which the month name field
                   is stored.

Returns            This method returns an iterator that points
                   immediately beyond the last character of the
                   month name date field.

</pre>

<h3>Description</h3>
<p>
The do_get_monthname() method reads the characters from the
character sequence (s,end] until it has extracted the name of the month (perhaps an abbreviation).
If the sequence is an abbreviation, the member function will continue to extract the
characters from the sequence until the full name is a match or it fails. If successful,
the results are stored in the appropriate member of the struct <em>tm t</em> argument.
If an error occurs, then <em>err</em> will be set to ios_base::failbit. It returns
an iterator that points immediately beyond the last character of the valid date field.
</p>
<hr>

<pre>
<a name="do-get-weekday">
Method             do_get_weekday()</a>

Access             Protected

Classification     Accessor

Syntax             virtual iter_type do_get_weekday(iter_type s,
                                                    iter_type end,
                                                    ios_base& str,
                                                    ios_base::iostate& err,
                                                    tm *t) const;

Parameters         <em>s</em> is an input iterator that points to the beginning
                   character of a character sequence.

                   <em>end</em> is an input iterator that points to the end
                   character of a character sequence.

                   <em>str</em> is the reference to the ios_base object.

                   <em>err</em> is set to ios_base::failbit when an error
                   occurs.

                   <em>t</em> is the struct tm in which the weekday field
                   is stored.


Returns            This method returns an iterator that points
                   immediately beyond the last character of the valid
                   weekday field.

</pre>

<h3>Description</h3>
<p>
The do_get_weekday() method reads the characters from the
character sequence (s,end] until it has extracted the name of the weekday (perhaps an abbreviation).
If the sequence is an abbreviation, the member function will continue to extract the
characters from the sequence until the full name is a match or it fails. If successful,
the results are stored in the appropriate member of the struct <em>tm t</em> argument.
If an error occurs, then <em>err</em> will be set to ios_base::failbit. It returns
an iterator that points immediately beyond the last character of the valid weekday field.
</p>
<hr>

<pre>
<a name="do-get-time">
Method             do_get_time()</a>

Access             Protected

Classification     Accessor

Syntax             virtual iter_type do_get_time(iter_type s,
                                                 iter_type end,
                                                 ios_base& str,
                                                 ios_base::iostate& err,
                                                 tm *t) const;


Parameters         <em>s</em> is an input iterator that points to the
                   beginning character of a character sequence.

                   <em>end</em> is an input iterator that points to the
                   end character of a character sequence.

                   <em>str</em> is the reference to the ios_base object.

                   <em>err</em> is set to ios_base::failbit when an error
                   occurs.

                   <em>t</em> is the struct tm in which the time field is
                   stored.

Returns            This method returns an iterator that points
                   immediately beyond the last character of the valid
                   time field.

</pre>

<h3>Description</h3>
<p>
The do_get_time() method reads the characters from the
character sequence (s,end] until it has extracted the time field. The results are stored
in the appropriate member of the struct tm <em>t</em>. If an error occurs, then <em>err</em> will be set to
ios_base::failbit. It returns an iterator that points immediately beyond the last character
of the valid time field.
</p>
<hr>

<pre>
<a name="do-get-year">
Method             do_get_year()</a>

Access             Protected

Classification     Accessor

Syntax             virtual iter_type do_get_year(iter_type s,
                                                 iter_type end,
                                                 ios_base& str,
                                                 ios_base::iostate& err,
                                                 tm *t) const;

Parameters         <em>s</em> is an input iterator that points to the
                   beginning character of a character sequence.

                   <em>end</em> is an input iterator that points to the
                   end character of a character sequence.

                   <em>str</em> is the reference to the ios_base object.

                   <em>err</em> is set to ios_base::failbit when an error
                   occurs.

                   <em>t</em> is the struct tm in which the year field
                   is stored.

Returns            The method returns an iterator that points
                   immediately beyond the last character of the valid
                   year field.

</pre>

<h3>Description</h3>
<p>
The do_get_year() method reads the characters from the
character sequence (s,end] until it has extracted the year field. The manner in which
the year is represented is implementation-defined. The results are stored
in the appropriate member of the struct tm <em>t</em>. If an error occurs, then <em>err</em> will be set to
ios_base::failbit. It returns an iterator that points immediately beyond the last character
of the valid year field.
</p>
<hr>

<pre>
<a name="time-get-byname">
Method             time_get_byname()</a>

Access             Public

Classification     Constructor

Syntax             explicit time_get_byname(const char* name, size_t refs = 0);

Parameters         <em>name</em> is the name of the named locale.

                   <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>
This constructor constructs a time_get_byname facet object for a named locale
specified by the <em>name</em> argument.
</p>
<hr>

<pre>
<a name="~time-get-byname">
Method             time_get_byname()</a>

Access             Protected

Classification     Destructor

Syntax             ~time_get_byname();

Parameters         None

Returns            None

</pre>

<h3>Description</h3>
<p>
This destructor destroys a time_get_byname facet object.
</p>
<hr>


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



⌨️ 快捷键说明

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