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

📄 classpabstractdictionary.html

📁 pwlib开发文档
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<a name="z103_6" doxytag="PAbstractDictionary::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 PAbstractDictionary::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. The hash table is used to locate the entry.<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="z103_0" doxytag="PAbstractDictionary::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 PAbstractDictionary::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>key</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 into the dictionary. The semantics of this function is different from that of the <a class="el" href="classPCollection.html#z71_0">PCollection</a># class. This function is exactly equivalent to the <a class="el" href="classPAbstractDictionary.html#z103_3">SetAt()</a> function that sets a data value at the key value location.<p><dl compact><dt><b>Returns: </b></dt><dd> Always zero. </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 use as the key. 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="z103_1" doxytag="PAbstractDictionary::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 PAbstractDictionary::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 index. The index is as is used in the GetKeyAt()# function.<p><dl compact><dt><b>Returns: </b></dt><dd> index# parameter. </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="z101_0" doxytag="PAbstractDictionary::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 PAbstractDictionary::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>Output the contents of the object to the stream. The exact output is dependent on the exact semantics of the descendent class. This is primarily used by the standard #operator&lt;&lt;## function.<p>The default behaviour is to print the class name. <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>Stream to print the object into. </td></tr></table></dl><p>Reimplemented from <a class="el" href="classPCollection.html#z73_0">PCollection</a>.    </td>  </tr></table><a name="z103_2" doxytag="PAbstractDictionary::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>* PAbstractDictionary::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>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Remove an object at the specified index. The index is as is used in the GetKeyAt()# function. The returned pointer is then removed using the <a class="el" href="classPAbstractDictionary.html#z103_3">SetAt()</a># function to set that key value to NULL. If the <a class="el" href="classPCollection.html#z75_10">AllowDeleteObjects</a># option is set then the object is also deleted.<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>Implements <a class="el" href="classPCollection.html#z75_4">PCollection</a>.    </td>  </tr></table><a name="z103_3" doxytag="PAbstractDictionary::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 PAbstractDictionary::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> [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 index to the new value. The index is as is used in the GetKeyAt()# function. This will overwrite the existing entry. If the AllowDeleteObjects option is set then the old object is also deleted.<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>Implements <a class="el" href="classPCollection.html#z75_6">PCollection</a>.    </td>  </tr></table><a name="z105_0" doxytag="PAbstractDictionary::SetDataAt"></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 PAbstractDictionary::SetDataAt </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>Set the data at the specified ordinal index position in the dictionary.<p>The ordinal position in the dictionary is determined by the hash values of the keys and the order of insertion.<p><dl compact><dt><b>Returns: </b></dt><dd> TRUE if the new object could be placed into the dictionary. </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>Ordinal index in the dictionary. New object to put into the dictionary. </td></tr></table></dl>    </td>  </tr></table><hr>The documentation for this class was generated from the following files:<ul><li><a class="el" href="dict_8h-source.html">dict.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:13 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 + -