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

📄 insert.htm

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

<body bgcolor="#FFFFFF">

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

<img src="itinsban.gif">
<pre>
<font size=5>Class Name</font>            insert_iterator

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

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

</pre>

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

<h1>Member Classes</h1>
<a href="insert.htm#container">Container& container</a>
<a href="insert.htm#iterator">Container::iterator iter</a>

<h1>Methods</h1>
<pre>
<a href="insert.htm#insert">insert_iterator(Container& x, typename Container::iterator i);</a>

</pre>
<h1>Operators</h1>
<pre>
<a href="insert.htm#operator=">insert_iterator&lt;Container&gt;& operator=
(const typename Container::value_type& value);</a>

<a href="insert.htm#operator*">insert_iterator&lt;Container&gt;& operator*();</a>

<a href="insert.htm#operator++1">insert_iterator&lt;Container&gt;& operator++();</a>

<a href="insert.htm#operator++2">insert_iterator&lt;Container&gt;& operator++(int);</a>

</pre>

<hr>


<a name="class-descrip"><h3>Class Desciption</h3></a>
<p>
The insert_iterator is an <a href="defines.htm#insert">insert iterator</a>. The insert_iterator inserts elements at the position pointed to by the iterator.
</p>
<hr>
<a name="container"><h3>Container& container</h3></a>
<p>
The container in which elements will be inserted.
</p>
<hr>

<a name="iterator"><h3>Container::iterator iter</h3></a>
<p>
The iterator points to the elements of the container in which elements will be 
inserted.
</p>
<hr>

<pre>
<a name="insert">
Method             insert_iterator()</a>

Access             Public

Classification     Constructor

Syntax             insert_iterator(Container& x, 
                                   typename Container::iterator i);

Paramters          <em>x</em> is the reference to the container in which elements
                   will be inserted.

                   <em>i</em> is the iterator which points to the elements of the
                   container.

Returns            None

</pre>

<h3>Description</h3>
<p>
The constructor constructs an insert_iterator object and initializes 
Container& container with <em>x</em>, and Container::iterator iter with <em>i</em>.
</p>

<hr>

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

Access             Public

Classification     Accessor

Syntax             insert_iterator&lt;Container&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             insert_iterator&lt;Container&gt;& operator++();

Parameters         None

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++2">
Method             operator++()</a>

Access             Public

Classification     Accessor

Syntax             iterator&lt;Container&gt; 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>
The incrementation operator returns *this.
</p>

<hr>

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

Access             Public

Classification     Modifier

Syntax             insert_iterator&lt;Container&gt;&
                   operator=(const typename Container::value_type& value);

Parameters         <em>value</em> is a reference to the type value_type that
                   is inserted into the container.

Returns            This operator returns a pointer to the current object.

</pre>

<h3>Description</h3>
<p>
The assignment operator is converted to an insertion operation using 
container.insert(iter,value). The element <em>value</em> is inserted 
into the container at the position pointed to by <em>iter</em>.  
<em>iter</em> is then incremented and *this is returned.
</p>

<hr>

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

</body>

</html>



⌨️ 快捷键说明

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