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

📄 classpabstractlist.html

📁 pwlib开发文档
💻 HTML
📖 第 1 页 / 共 3 页
字号:
</table></dl><p>Implements <a class="el" href="classPCollection.html#z75_8">PCollection</a>.    </td>  </tr></table><a name="b0" doxytag="PAbstractList::GetReferenceAt"></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"> PINLINE <a class="el" href="classPObject.html">PObject</a> &amp; PAbstractList::GetReferenceAt </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> const<code> [protected]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Get the object at the specified ordinal position. If the index was greater than the size of the collection then this asserts.<p>The object accessed in this way is remembered by the class and further access will be fast. Access to elements one either side of that saved element, and the head and tail of the list, will always be fast.<p><dl compact><dt><b>Returns: </b></dt><dd> reference to object at the specified index. </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>Ordinal index of the list element to set as current. </td></tr></table></dl>    </td>  </tr></table><a name="z175_9" doxytag="PAbstractList::GetValuesIndex"></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 PINDEX PAbstractList::GetValuesIndex </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">const <a class="el" href="classPObject.html">PObject</a> &amp;&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp; <em>obj</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>Search the collection for the specified value of the object. The object values are compared, not the pointers. So the objects in the collection must correctly implement the PObject::Compare()# function. A simple linear search from "head" of the list is performed.<p><dl compact><dt><b>Returns: </b></dt><dd> ordinal index position of the object, or P_MAX_INDEX. </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>Object to find value of. </td></tr></table></dl><p>Implements <a class="el" href="classPCollection.html#z75_9">PCollection</a>.    </td>  </tr></table><a name="z175_1" doxytag="PAbstractList::Insert"></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 PINDEX PAbstractList::Insert </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">const <a class="el" href="classPObject.html">PObject</a> &amp;&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>before</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>obj</em></td>        </tr>        <tr>          <td></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"><code> [virtual]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Insert a new object immediately before the specified object. If the object to insert before is not in the collection then the equivalent of the <a class="el" href="classPAbstractList.html#z175_0">Append()</a># function is performed.<p>Note that the object values are compared for the search of the before# parameter, not the pointers. So the objects in the collection must correctly implement the PObject::Compare()# function.<p><dl compact><dt><b>Returns: </b></dt><dd> index of the newly inserted object. </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>Object value to insert before. New object to place into the collection. </td></tr></table></dl><p>Implements <a class="el" href="classPCollection.html#z75_1">PCollection</a>.    </td>  </tr></table><a name="z175_2" doxytag="PAbstractList::InsertAt"></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 PINDEX PAbstractList::InsertAt </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>obj</em></td>        </tr>        <tr>          <td></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"><code> [virtual]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Insert a new object at the specified ordinal index. If the index is greater than the number of objects in the collection then the equivalent of the <a class="el" href="classPAbstractList.html#z175_0">Append()</a># function is performed.<p><dl compact><dt><b>Returns: </b></dt><dd> index of the newly inserted object. </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>Index position in collection to place the object. New object to place into the collection. </td></tr></table></dl><p>Implements <a class="el" href="classPCollection.html#z75_2">PCollection</a>.    </td>  </tr></table><a name="z175_3" doxytag="PAbstractList::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 PAbstractList::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> [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><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>Implements <a class="el" href="classPCollection.html#z75_3">PCollection</a>.    </td>  </tr></table><a name="z175_4" doxytag="PAbstractList::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>* PAbstractList::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> [virtual]</code></td>        </tr>

⌨️ 快捷键说明

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