📄 classpabstractset.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>PAbstractSet class Reference</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.2.18 --><center><a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="namespaces.html">Namespace List</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> <a class="qindex" href="globals.html">File Members</a> </center><hr><h1>PAbstractSet Class Reference</h1><code>#include <<a class="el" href="dict_8h-source.html">dict.h</a>></code><p><p>Inheritance diagram for PAbstractSet:<p><center><img src="classPAbstractSet.png" usemap="#PAbstractSet_map" border="0" alt=""></center><map name="PAbstractSet_map"><area href="classPHashTable.html" alt="PHashTable" shape="rect" coords="0,168,85,192"><area href="classPCollection.html" alt="PCollection" shape="rect" coords="0,112,85,136"><area href="classPContainer.html" alt="PContainer" shape="rect" coords="0,56,85,80"><area href="classPObject.html" alt="PObject" shape="rect" coords="0,0,85,24"></map><a href="classPAbstractSet-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0><tr><td></td></tr><tr><td colspan=2><br><h2>Public Methods</h2></td></tr><tr><td colspan="2"><div class="groupHeader">Construction</div></td></tr><tr><td nowrap align=right valign=top>PINLINE </td><td valign=bottom><a class="el" href="classPAbstractSet.html#z95_0">PAbstractSet</a> ()</td></tr><tr><td colspan="2"><div class="groupHeader">Overrides from class PCollection</div></td></tr><tr><td nowrap align=right valign=top>virtual PINDEX </td><td valign=bottom><a class="el" href="classPAbstractSet.html#z97_0">Append</a> (<a class="el" href="classPObject.html">PObject</a> *obj)</td></tr><tr><td nowrap align=right valign=top>virtual PINDEX </td><td valign=bottom><a class="el" href="classPAbstractSet.html#z97_1">Insert</a> (const <a class="el" href="classPObject.html">PObject</a> &before, <a class="el" href="classPObject.html">PObject</a> *obj)</td></tr><tr><td nowrap align=right valign=top>virtual PINDEX </td><td valign=bottom><a class="el" href="classPAbstractSet.html#z97_2">InsertAt</a> (PINDEX index, <a class="el" href="classPObject.html">PObject</a> *obj)</td></tr><tr><td nowrap align=right valign=top>virtual BOOL </td><td valign=bottom><a class="el" href="classPAbstractSet.html#z97_3">Remove</a> (const <a class="el" href="classPObject.html">PObject</a> *obj)</td></tr><tr><td nowrap align=right valign=top>virtual <a class="el" href="classPObject.html">PObject</a> * </td><td valign=bottom><a class="el" href="classPAbstractSet.html#z97_4">RemoveAt</a> (PINDEX index)</td></tr><tr><td nowrap align=right valign=top>virtual <a class="el" href="classPObject.html">PObject</a> * </td><td valign=bottom><a class="el" href="classPAbstractSet.html#z97_5">GetAt</a> (PINDEX index) const</td></tr><tr><td nowrap align=right valign=top>virtual BOOL </td><td valign=bottom><a class="el" href="classPAbstractSet.html#z97_6">SetAt</a> (PINDEX index, <a class="el" href="classPObject.html">PObject</a> *val)</td></tr><tr><td nowrap align=right valign=top>virtual PINDEX </td><td valign=bottom><a class="el" href="classPAbstractSet.html#z97_7">GetObjectsIndex</a> (const <a class="el" href="classPObject.html">PObject</a> *obj) const</td></tr><tr><td nowrap align=right valign=top>virtual PINDEX </td><td valign=bottom><a class="el" href="classPAbstractSet.html#z97_8">GetValuesIndex</a> (const <a class="el" href="classPObject.html">PObject</a> &obj) const</td></tr></table><hr><a name="_details"></a><h2>Detailed Description</h2>Abstract set of PObjects. <p><hr><h2>Constructor & Destructor Documentation</h2><a name="z95_0" doxytag="PAbstractSet::PAbstractSet"></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 PAbstractSet::PAbstractSet </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Create a new, empty, set.<p>Note that by default, objects placed into the list will be deleted when removed or when all references to the list are destroyed. </td> </tr></table><hr><h2>Member Function Documentation</h2><a name="z97_0" doxytag="PAbstractSet::Append"></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 PAbstractSet::Append </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="classPObject.html">PObject</a> * </td> <td class="mdname1" valign="top" nowrap> <em>obj</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap><code> [virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Add a new object to the collection. If the objects value is already in the set then the object is {\bf not} included. If the <a class="el" href="classPCollection.html#z75_10">AllowDeleteObjects</a># option is set then the obj# parameter is also deleted.<p><dl compact><dt><b>Returns: </b></dt><dd> hash function value of the newly added object. </dl><dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>obj</em> </td><td>New object to place into the collection. </td></tr></table></dl><p>Implements <a class="el" href="classPCollection.html#z75_0">PCollection</a>. </td> </tr></table><a name="z97_5" doxytag="PAbstractSet::GetAt"></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>* PAbstractSet::GetAt </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">PINDEX </td> <td class="mdname1" valign="top" nowrap> <em>index</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap> const<code> [virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>This function is the same as <a class="el" href="classPHashTable.html#z93_1">PHashTable::AbstractGetKeyAt()</a>.<p><dl compact><dt><b>Returns: </b></dt><dd> Always NULL. </dl><dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>index</em> </td><td>Index position in the collection of the object. </td></tr></table></dl><p>Implements <a class="el" href="classPCollection.html#z75_7">PCollection</a>. </td> </tr></table><a name="z97_7" doxytag="PAbstractSet::GetObjectsIndex"></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 PAbstractSet::GetObjectsIndex </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const <a class="el" href="classPObject.html">PObject</a> * </td> <td class="mdname1" valign="top" nowrap> <em>obj</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap> const<code> [virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Search the collection for the specific instance of the object. The object pointers are compared, not the values. The hash table is used to locate the entry.<p>Note that that will require value comparisons to be made to find the equivalent entry and then a final check is made with the pointers to see if they are the same instance.<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> </td><td>Object to find. </td></tr></table></dl><p>Implements <a class="el" href="classPCollection.html#z75_8">PCollection</a>. </td> </tr></table><a name="z97_8" doxytag="PAbstractSet::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 PAbstractSet::GetValuesIndex </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const <a class="el" href="classPObject.html">PObject</a> & </td> <td class="mdname1" valign="top" nowrap> <em>obj</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap> const<code> [virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </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> </td><td>Object to find equal value. </td></tr></table></dl><p>Implements <a class="el" href="classPCollection.html#z75_9">PCollection</a>. </td> </tr></table><a name="z97_1" doxytag="PAbstractSet::Insert"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -