📄 classpobject.html
字号:
</tr></table><a name="z199_1" doxytag="PObject::Compare"></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#z199_0">Comparison</a> PObject::Compare </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const PObject & </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>Compare the two objects and return their relative rank. This function is usually overridden by descendent classes to yield the ranking according to the semantics of the object.<p>The default function is to use the <a class="el" href="classPObject.html#z199_2">CompareObjectMemoryDirect()</a># function to do a byte wise memory comparison of the two objects.<p><dl compact><dt><b>Returns: </b></dt><dd> <a class="el" href="classPObject.html#z199_0s0">LessThan</a>#, <a class="el" href="classPObject.html#z199_0s1">EqualTo</a># or <a class="el" href="classPObject.html#z199_0s2">GreaterThan</a># according to the relative rank of the objects. </dl><p>Reimplemented in <a class="el" href="classPAbstractArray.html#z21_2">PAbstractArray</a>, <a class="el" href="classPChannel.html#z45_0">PChannel</a>, <a class="el" href="classPOrdinalKey.html#z83_1">POrdinalKey</a>, <a class="el" href="classPHashTable.html#z89_0">PHashTable</a>, <a class="el" href="classPFile.html#z127_0">PFile</a>, <a class="el" href="classPIndirectChannel.html#z155_0">PIndirectChannel</a>, <a class="el" href="classPIPSocket_1_1Address.html#a0">PIPSocket::Address</a>, <a class="el" href="classPAbstractList.html#a0">PAbstractList</a>, <a class="el" href="classPAbstractSortedList.html#z179_0">PAbstractSortedList</a>, <a class="el" href="classPPipeChannel.html#z215_0">PPipeChannel</a>, <a class="el" href="classPProcess.html#z223_0">PProcess</a>, <a class="el" href="classPTime.html#z295_1">PTime</a>, <a class="el" href="classPRemoteConnection.html#z309_0">PRemoteConnection</a>, <a class="el" href="classPSafePtrBase.html#z329_0">PSafePtrBase</a>, <a class="el" href="classPSmartPointer.html#z365_0">PSmartPointer</a>, <a class="el" href="classPTimeInterval.html#z447_1">PTimeInterval</a>, <a class="el" href="classPASN__Null.html#a1">PASN_Null</a>, <a class="el" href="classPASN__Boolean.html#a6">PASN_Boolean</a>, <a class="el" href="classPASN__Integer.html#a6">PASN_Integer</a>, <a class="el" href="classPASN__Enumeration.html#a8">PASN_Enumeration</a>, <a class="el" href="classPASN__Real.html#a6">PASN_Real</a>, <a class="el" href="classPASN__ObjectId.html#a19">PASN_ObjectId</a>, <a class="el" href="classPASN__BitString.html#a13">PASN_BitString</a>, <a class="el" href="classPASN__OctetString.html#a20">PASN_OctetString</a>, <a class="el" href="classPASN__ConstrainedString.html#a10">PASN_ConstrainedString</a>, <a class="el" href="classPASN__BMPString.html#a19">PASN_BMPString</a>, <a class="el" href="classPASN__Choice.html#a36">PASN_Choice</a>, <a class="el" href="classPASN__Sequence.html#a9">PASN_Sequence</a>, <a class="el" href="classPASN__Array.html#a6">PASN_Array</a>, <a class="el" href="classPHTTPField.html#a1">PHTTPField</a>, <a class="el" href="classPServiceMacro.html#a2">PServiceMacro</a>, <a class="el" href="classPIpAccessControlEntry.html#a4">PIpAccessControlEntry</a>, <a class="el" href="classPMemoryFile.html#z485_0">PMemoryFile</a>, and <a class="el" href="classPURL.html#z505_0">PURL</a>. </td> </tr></table><a name="z199_2" doxytag="PObject::CompareObjectMemoryDirect"></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#z199_0">Comparison</a> PObject::CompareObjectMemoryDirect </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const PObject & </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>Determine the byte wise comparison of two objects. This is the default comparison operation for objects that do not explicitly override the <a class="el" href="classPObject.html#z199_1">Compare()</a># function.<p>The <a class="el" href="object_8h.html#a27">PCLASSINFO</a># macro declares an override of this function for the particular class. The user need not implement it.<p><dl compact><dt><b>Returns: </b></dt><dd> <a class="el" href="classPObject.html#z199_0s0">LessThan</a>#, <a class="el" href="classPObject.html#z199_0s1">EqualTo</a># or <a class="el" href="classPObject.html#z199_0s2">GreaterThan</a># according to the result memcpy()# function. </dl> </td> </tr></table><a name="z197_0" doxytag="PObject::GetClass"></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 const char* PObject::GetClass </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">unsigned </td> <td class="mdname1" valign="top" nowrap> = 0 </td> <td class="md" valign="top">) </td> <td class="md" nowrap> const<code> [inline, virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Get the current dynamic type of the object instance.<p>When comparing class names, always use the strcmp()# function rather than comparing pointers. The pointers are not necessarily the same over compilation units depending on the compiler, platform etc.<p>The <a class="el" href="object_8h.html#a27">PCLASSINFO</a># macro declares an override of this function for the particular class. The user need not implement it.<p><dl compact><dt><b>Returns: </b></dt><dd>pointer to C string literal. </dl> </td> </tr></table><a name="z203_1" doxytag="PObject::HashFunction"></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 PObject::HashFunction </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </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>This function yields a hash value required by the PDictionary# class. A descendent class that is required to be the key of a dictionary should override this function. The precise values returned is dependent on the semantics of the class. For example, the PString# class overrides it to provide a hash function for distinguishing text strings.<p>The default behaviour is to return the value zero.<p><dl compact><dt><b>Returns: </b></dt><dd> hash function value for class instance. </dl><p>Reimplemented in <a class="el" href="classPChannel.html#z45_1">PChannel</a>, <a class="el" href="classPOrdinalKey.html#z83_2">POrdinalKey</a>, <a class="el" href="classPRemoteConnection.html#z309_1">PRemoteConnection</a>, and <a class="el" href="classPURL.html#z505_1">PURL</a>. </td> </tr></table><a name="z197_2" doxytag="PObject::InternalIsDescendant"></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 PObject::InternalIsDescendant </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const char * </td> <td class="mdname1" valign="top" nowrap> <em>clsName</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap> const<code> [inline, virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Determine if the dynamic type of the current instance is a descendent of the specified class. The class name is usually provided by the <a class="el" href="classPObject.html#z197_3">Class()</a># static function of the desired class.<p>The <a class="el" href="object_8h.html#a27">PCLASSINFO</a># macro declares an override of this function for the particular class. The user need not implement it.<p><dl compact><dt><b>Returns: </b></dt><dd>TRUE if object is descended from the class. </dl> </td> </tr></table><a name="z197_1" doxytag="PObject::IsClass"></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"> BOOL PObject::IsClass </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const char * </td> <td class="mdname1" valign="top" nowrap> <em>cls</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap> const<code> [inline]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p> </td> </tr></table><a name="z199_4" doxytag="PObject::operator!="></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"> bool PObject::operator!= </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const PObject & </td> <td class="mdname1" valign="top" nowrap> <em>obj</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap> const<code> [inline]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Compare the two objects.<p><dl compact><dt><b>Returns: </b></dt><dd> TRUE if objects are not equal. </dl> </td> </tr></table><a name="z199_5" doxytag="PObject::operator<"></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"> bool PObject::operator< </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const PObject & </td> <td class="mdname1" valign="top" nowrap> <em>obj</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap> const<code> [inline]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Compare the two objects.<p><dl compact><dt><b>Returns: </b></dt><dd> TRUE if objects are less than. </dl> </td> </tr></table><a name="z199_7" doxytag="PObject::operator<="></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"> bool PObject::operator<= </td> <td class="md" valign="top">( </td>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -