📄 timeput.htm
字号:
<html>
<head>
<title>time_put</title>
<head>
<body bgcolor="#FFFFFF">
<a name="here"></a>
<img src="timeban.gif">
<pre>
<font size=5>Class Name</font> time_put
<font size=5>Header File</font> <locale>
<font size=5>Classification</font> abstract data type
</pre>
<a href="timeput.htm#crd">Class Relationship Diagram</a><br>
<br>
<a href="timeput.htm#class-descrip">Class Description</a>
<h1>Member Classes</h1>
<a href="timeput.htm#id">locale::id</a>
<h1>Methods</h1>
<pre>
<a href="timeput.htm#do-put">
virtual iter_type do_put(iter_type s, ios_base&, char_type,
const tm* t, char format, char modifier) const;</a>
<a href="timeput.htm#put1">
iter_type put(iter_type s, ios_base& f, char_type fill, const tm* tmb,
const charT* pattern, const charT* pat_end) const;</a>
<a href="timeput.htm#put2">
iter_type put(iter_type s, ios_base& f, char_type fill, const tm* tmb,
char format, char modifier = 0) const;</a>
<a href="timeput.htm#time-put">
explicit time_put_(size_t refs = 0);</a>
<a href="timeput.htm#time-put">
~time_put_();</a>
</pre>
<hr>
<a name="class-descrip"><h3>Class Description</h3></a>
<p>
The time_put class describes a class that provides the functionality for
formatting output of date and time values.
</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 Modifier
Syntax virtual iter_type do_put(iter_type s, ios_base& str,
char_type fill, const tm* t,
char format,
char modifier) const;
Parameters <em>s</em> is an iterator that points to the character
buffer used for output.
<em>str</em> is a reference to the ios_base object.
<em>fill</em> is the character used for padding.
<em>t</em> is the structure that contains the date/time
values.
<em>format</em> is a specifier used to control formatting.
<em>modifier</em> is a modifier used to control formatting.
Returns The method returns an iterator that points to the
character past the last character produced.
</pre>
<h3>Description</h3>
<p>
The do_put() method formats the date/time contained in the
parameter t. It writes out a character string that is placed character buffer
pointed to by <em>s</em>. The string is formatted according to the parameters <em>format</em> and
<em>modifer</em>. They are iterpreted identically in the same way as the strftime function
that interprets its format and modifier flags. The <em>fill</em> character is used for padding.
The method returns an iterator that points to the character past the last
character produced.
</p>
<hr>
<pre>
<a name="put1">
Method put()</a>
Access Public
Classification Modifier
Syntax iter_type put(iter_type s, ios_base& f,
char_type fill, const tm* tmb,
const charT* pattern,
const charT* pat_end) const;
Parameters <em>s</em> is an iterator that points to the character buffer
used for output.
<em>f</em> is a reference to the ios_base object.
<em>fill</em> is the character used for padding.
<em>tmb</em> is the structure that contains the
date/time values.
<em>pattern</em> is the beginning of the pattern sequence.
<em>pat_end</em> is the end of the pattern sequence.
Returns The method returns an iterator that points to the
character past the last character produced.
</pre>
<h3>Description</h3>
<p>
The put() method creates a string representing the date/time contained in the
argument <em>tmb</em>. It interprets the characters in the sequence between <em>pattern</em> and
<em>pat_end</em> arguments. The formatting of the string is determined by the format
specifiers used by the function strftime(). The resulting string is written out
to the character buffer pointed to by <em>s</em>. The <em>fill</em> character is used for padding.
The method returns an iterator that points to the character past the last
character produced.
</p>
<hr>
<pre>
<a name="put2">
Method put()</a>
Access Public
Classification Modifier
Syntax iter_type put(iter_type s, ios_base& f,
char_type fill, const tm* t,
char format, char modifier = 0) const;
Parameters <em>s</em> is an iterator that points to the character
buffer used for output.
<em>f</em> is a reference to the ios_base object.
<em>fill</em> is the character used for padding.
<em>t</em> is the structure that contains the date/time
values.
<em>format</em> is a specifier used to control formatting.
<em>modifier</em> is a modifier used to control formatting.
Returns The method returns an iterator that points to the
character past the last character produced.
</pre>
<h3>Description</h3>
<p>
The do() member function returns do_put(s, f, fill, t, format, modifier).
</p>
<hr>
<pre>
<a name="time-put">
Method time_put()</a>
Access Public
Classification Constructor
Syntax explicit time_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 time_put facet object.
</p>
<hr>
<pre>
<a name="~time-put">
Method time_put()</a>
Access Protected
Classification Destructor
Syntax ~time_put();
Parameters None
Returns None
</pre>
<h3>Description</h3>
<p>
This destructor destroys the time_put facet object.
</p>
<hr>
<a name="crd"><h2>The Class Relationship Diagram for time_put</h2></a>
<img src="timeput.gif">
<hr>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -