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

📄 classpcollection.html

📁 pwlib开发文档
💻 HTML
📖 第 1 页 / 共 3 页
字号:
</table></dl><p>Implemented in <a class="el" href="classPAbstractSet.html#z97_2">PAbstractSet</a>, <a class="el" href="classPAbstractDictionary.html#z103_1">PAbstractDictionary</a>, <a class="el" href="classPAbstractList.html#z175_2">PAbstractList</a>, and <a class="el" href="classPAbstractSortedList.html#z183_2">PAbstractSortedList</a>.    </td>  </tr></table><a name="z73_0" doxytag="PCollection::PrintOn"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> virtual void PCollection::PrintOn </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">ostream &amp;&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp; <em>strm</em>          </td>          <td class="md" valign="top">)&nbsp;</td>          <td class="md" nowrap> const<code> [virtual]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Print the collection on the stream. This simply executes the <a class="el" href="array_8h.html#a9">PObject::PrintOn()</a># function on each element in the collection.<p>The default behaviour for collections is to print each element separated by the stream fill character. Note that if the fill character is the default ' ' then no separator is printed at all.<p>Also if the fill character is not ' ', the the streams width parameter is set before each individual element of the colllection.<p><dl compact><dt><b>Returns: </b></dt><dd>the stream printed to. </dl><dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>strm</em>&nbsp;</td><td>Output stream to print the collection. </td></tr></table></dl><p>Reimplemented from <a class="el" href="classPObject.html#z201_0">PObject</a>.<p>Reimplemented in <a class="el" href="classPAbstractDictionary.html#z101_0">PAbstractDictionary</a>.    </td>  </tr></table><a name="z75_3" doxytag="PCollection::Remove"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> virtual BOOL PCollection::Remove </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">const <a class="el" href="classPObject.html">PObject</a> *&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp; <em>obj</em>          </td>          <td class="md" valign="top">)&nbsp;</td>          <td class="md" nowrap><code> [pure virtual]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Remove the object from the collection. If the AllowDeleteObjects option is set then the object is also deleted.<p>Note that the comparison for searching for the object in collection is made by pointer, not by value. Thus the parameter must point to the same instance of the object that is in the collection.<p><dl compact><dt><b>Returns: </b></dt><dd>TRUE if the object was in the collection. </dl><dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>obj</em>&nbsp;</td><td>Existing object to remove from the collection. </td></tr></table></dl><p>Implemented in <a class="el" href="classPAbstractSet.html#z97_3">PAbstractSet</a>, <a class="el" href="classPAbstractList.html#z175_3">PAbstractList</a>, and <a class="el" href="classPAbstractSortedList.html#z183_3">PAbstractSortedList</a>.    </td>  </tr></table><a name="z75_5" doxytag="PCollection::RemoveAll"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> virtual void PCollection::RemoveAll </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>          <td class="md" valign="top">)&nbsp;</td>          <td class="md" nowrap><code> [virtual]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Remove all of the elements in the collection. This operates by continually calling <a class="el" href="classPCollection.html#z75_4">RemoveAt()</a># until there are no objects left.<p>The objects are removed from the last, at index #(<a class="el" href="classPContainer.html#z69_0">GetSize()</a>-1)# toward the first at index zero. <p>Reimplemented in <a class="el" href="classPAbstractSortedList.html#z183_5">PAbstractSortedList</a>.    </td>  </tr></table><a name="z75_4" doxytag="PCollection::RemoveAt"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> virtual <a class="el" href="classPObject.html">PObject</a>* PCollection::RemoveAt </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">PINDEX&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp; <em>index</em>          </td>          <td class="md" valign="top">)&nbsp;</td>          <td class="md" nowrap><code> [pure virtual]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Remove the object at the specified ordinal index from the collection. If the AllowDeleteObjects option is set then the object is also deleted.<p>Note if the index is beyond the size of the collection then the function will assert.<p><dl compact><dt><b>Returns: </b></dt><dd>pointer to the object being removed, or NULL if it was deleted. </dl><dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>index</em>&nbsp;</td><td>Index position in collection to place the object. </td></tr></table></dl><p>Implemented in <a class="el" href="classPAbstractSet.html#z97_4">PAbstractSet</a>, <a class="el" href="classPAbstractDictionary.html#z103_2">PAbstractDictionary</a>, <a class="el" href="classPAbstractList.html#z175_4">PAbstractList</a>, and <a class="el" href="classPAbstractSortedList.html#z183_4">PAbstractSortedList</a>.    </td>  </tr></table><a name="z75_6" doxytag="PCollection::SetAt"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> virtual BOOL PCollection::SetAt </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">PINDEX&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>index</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap><a class="el" href="classPObject.html">PObject</a> *&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>val</em></td>        </tr>        <tr>          <td></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"><code> [pure virtual]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Set the object at the specified ordinal position to the new value. This will overwrite the existing entry. If the AllowDeleteObjects option is set then the old object is also deleted.<p>The exact semantics depends on the specific type of the collection. For some, eg PSortedList#, the object inserted will not stay at the ordinal position. Also the exact behaviour when the index is greater than the size of the collection depends on the collection type, eg in an array collection the array is expanded to accommodate the new index, whereas in a list it will return FALSE.<p><dl compact><dt><b>Returns: </b></dt><dd>TRUE if the object was successfully added. </dl><dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>val</em>&nbsp;</td><td>Index position in collection to set. New value to place into the collection. </td></tr></table></dl><p>Implemented in <a class="el" href="classPAbstractSet.html#z97_6">PAbstractSet</a>, <a class="el" href="classPAbstractDictionary.html#z103_3">PAbstractDictionary</a>, <a class="el" href="classPAbstractList.html#z175_5">PAbstractList</a>, and <a class="el" href="classPAbstractSortedList.html#z183_6">PAbstractSortedList</a>.    </td>  </tr></table><hr>The documentation for this class was generated from the following files:<ul><li><a class="el" href="contain_8h-source.html">contain.h</a><li><a class="el" href="contain_8inl.html">contain.inl</a></ul><hr><address style="align: right;"><small>Generated on Wed Sep 29 22:44:14 2004 for PWLib by<a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border=0 width=110 height=53></a>1.2.18 </small></address></body></html>

⌨️ 快捷键说明

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