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

📄 itostrea.htm

📁 这是关于VC++中的STL容器的资料,包括了STL容器各个类之间关系以及类的说明
💻 HTM
字号:
<html>
<head>
<title>ostream_iterator</title>
<head>

<body bgcolor="#FFFFFF">

<a name="here">

<img src="itosban.gif">

<pre>
<font size=5>Class Name</font>            ostream_iterator

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

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

</pre>

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

<h1>Member Classes</h1>
<a href="itostrea.htm#basic-ostream">basic_ostream<charT,traits>*</a>


<h1>Methods</h1>
<pre>
<a href="itostrea.htm#ostream1">ostream_iterator(ostream_type& s);</a>

<a href="itostrea.htm#ostream2">ostream_iterator(ostream_type& s, const charT* delimiter);</a>

<a href="itostrea.htm#ostream3">ostream_iterator(const ostream_iterator&lt;T,charT,traits&gt;& x);</a>

<a href="itostrea.htm#~ostream">~ostream_iterator();</a>
</pre>
<h1>Operators</h1>
<pre>
<a href="itostrea.htm#operator*">ostream_iterator&lt;T,charT,traits&gt;& operator*();</a>

<a href="itostrea.htm#operator=">ostream_iterator&lt;T,charT,traits&gt; operator=(const T& value);</a>

<a href="itostrea.htm#operator++1">ostream_iterator&lt;T,charT,traits&gt;& operator++();</a>

<a href="itostrea.htm#operator++2">ostream_iterator&lt;T,charT,traits&gt;& operator++(int);</a>

</pre>

<a href="iistream.htm#example"><h2>Example</h2></a>

<hr>

<a name="class-descrip"><h3>Class Description</h3>
<p>
The ostream_iterator is an <a href="defines.htm#io">output iterator</a>. The ostream_iterator class uses the operator &lt'&lt;. Values of class T are successively  
written into the output stream. When the object is constructed given the 
delimter string as a parameter, the delimter is inserted into the output 
stream after every value of class T is written. If no delimter is given, a 
null is used as the delimter.
</p>

<hr>

<a name="basic-ostream"><h3>basic_ostream</h3></a>
<p>
The basic_ostream is the output stream in which the elements are written to 
successively moving in a single direction.
</p>
<hr>

<pre>
<a name="ostream1">
Method             ostream_iterator()</a>

Access             Public

Classification     Constructor

Syntax             ostream_iterator(ostream_type& s);

Paramters          <em>s</em> is the output stream in which values of type T
                   is written.

Returns            None

</pre>

<h3>Description</h3>
<p>This constructor constructs an ostream_iterator object. <em>s</em> is 
the output stream in which values of type T is written.
</p>

<hr>

<pre>
<a name="ostream2">
Method             ostream_iterator()</a>

Access             Public

Classification     Constructor

Syntax             ostream_iterator(ostream_type& s, 
                                    const charT* delimter);

Paramters          <em>s</em> is the output stream in which values of type T 
                   is written.

                   <em>delimter</em> is the character string delimter is appended 
                   after every value of type T is written to s.

Returns            None

</pre>

<h3>Description</h3>
<p>
This constructor constructs an ostream_iterator object. <em>s</em> is the 
output stream in which values of type T is written.
</p>

<hr>

<pre>
<a name="ostream3">
Method             ostream_iterator()</a>

Access             Public

Classification     Constructor

Syntax             ostream_iterator(const ostream_iterator&lt;T,charT,traits&gt;& x);

Parameters         <em>x</em> is a refererence to a const ostream_iterator object

Returns            None

</pre>

<h3>Description</h3>
<p>
This constructor constructs an ostream_iterator object which is a copy of <em>x</em>.
</p>

<hr>

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

Access             Public

Classification     Destructor

Syntax             ~ostream_iterator();

Parameters         None

Returns            None

</pre>

<h3>Description</h3>
<p>
The destructor destroys the ostream iterator object.
</p>

<hr>

<pre>
<a name="operator*">
Method             operator*()</a>

Access             Public

Classification     Accessor

Syntax             ostream_iterator&lt;T,charT,traits&gt;& operator*();

Parameters         None

Returns            This operator returns a pointer to the current object.

</pre>

<h3>Description</h3>
<p>
The dereference operator returns *this.
</p>

<hr>

<pre>
<a name="operator++1">
Method             operator++()</a>

Access             Public

Classification     Accessor

Syntax             ostream_iterator&lt;T,charT,traits&gt;& operator++();

Parameters         None

Returns            This operator returns a pointer to the current object.

</pre>

<h3>Description</h3>
<p>
The incrementation operator returns *this.
</p>

<hr>

<pre>
<a name="operator++2">
Method             operator++()</a>

Access             Public

Classification     Accessor

Syntax             ostream_iterator<T,charT,traits>& operator++(int x);

Parameters         <em>x</em> has no effect on this function.

Returns            This operator returns a pointer to the current object.

</pre>

<h3>Description</h3>
<p>
This incrementation operator returns *this.
</p>

<hr>

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

Access             Public

Classification     Modifier

Syntax             ostream_iterator&lt;T,charT,traits&gt;&
                   operator=(const T& value);

Parameters         <em>value</em> has no effect on this function.

Returns            This operator returns a pointer to the current object.

</pre>

<h3>Description</h3>
<p>
The assignment operator returns *this.
</p>

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

</html>


⌨️ 快捷键说明

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