IPXC_CState::Compare Method

From PDF XChange PDF SDK
Jump to: navigation, search
m (Automatic page editing by robot)
m (Automatic page editing by robot)
 
(15 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 +
__NOTOC__
 
[[Category:Editor]]
 
[[Category:Editor]]
 
{{#customTitle:IPXC_CState::Compare Method}}
 
{{#customTitle:IPXC_CState::Compare Method}}
{{#parentPage:PXV:IPXC_CState|method}}
+
{{#parentPage:PXV:IPXC_CState#Methods|Compare|method}}
{{ToWrite}}
+
{{ToReview}}
+
  
The method of interface of PDF-XChange Editor SDK.
+
Compares two '''IPXC_CState''' objects. Objects that belong to different documents are never equal.
  
 
== Syntax ==
 
== Syntax ==
<pre class="brush:cpp;gutter:false">HRESULT Compare([in] IPXC_CState* pState, [out, retval] LONG* pResult);</pre>
+
<pre class="brush:cpp;gutter:false">HRESULT Compare([in]           IPXC_CState* pState,
 +
                [out, retval] LONG*         pResult);</pre>
  
 
== Parameters ==
 
== Parameters ==
;''pState''
+
;pState
:[in]  Pointer to [[PXV:IPXC_CState|IPXC_CState]].
+
:[in]  The [[PXV:IPXC_CState|IPXC_CState]] object to compare.
;''pResult''
+
;pResult
:[out, retval] Pointer to LONG.
+
:[out, retval] Pointer to '''LONG''' variant that will get result of comparison. If objects are equal it will be '''0''' (zero). Otherwise, it will be '''-1''' or '''1'''. The result is useful for ordering '''IPXC_CState''' objects. See ''Remarks'' section for more details.
  
 
== Return Value ==
 
== Return Value ==
Returns S_OK if operation was successful or error code in other cases.
+
Returns S_OK if the operation was successful, or will return an error code if it fails.
 +
 
 +
== Remarks ==
 +
Except ordering, no other significance should be attached to the result. In particular, a non zero result indicates nothing about values of object's properties.
 +
The result is valid withing a single instance of document where objects were taken. If '''Compare''' returns non zero value and the document is closed and reopened, there is no guarantee that it will be return the same non zero value for those same object.
 +
 
 +
The following conditions apply:
 +
* If a.Compare(b) == 0, then b.Compare(a) == 0.
 +
* If a.Compare(b) > 0, then b.Compare(a) < 0.
 +
* If a.Compare(b) < 0, then b.Compare(a) > 0.
 +
* If a.Compare(b) == 0, and b.Compare(c) == 0, then a.Compare(c) == 0.
 +
* If a.Compare(b) > 0, and b.Compare(c) > 0, then a.Compare(c) > 0.
 +
* If a.Compare(b) < 0, and b.Compare(c) < 0, then a.Compare(c) < 0.
  
 
== See Also ==
 
== See Also ==
See also [[PXV:IPXC_CState|IPXC_CState]].
+
[[PXV:IPXC_CState|IPXC_CState]]

Latest revision as of 08:22, 23 May 2015

Compares two IPXC_CState objects. Objects that belong to different documents are never equal.

Syntax

HRESULT Compare([in]           IPXC_CState*  pState,
                [out, retval]  LONG*         pResult);

Parameters

pState
[in] The IPXC_CState object to compare.
pResult
[out, retval] Pointer to LONG variant that will get result of comparison. If objects are equal it will be 0 (zero). Otherwise, it will be -1 or 1. The result is useful for ordering IPXC_CState objects. See Remarks section for more details.

Return Value

Returns S_OK if the operation was successful, or will return an error code if it fails.

Remarks

Except ordering, no other significance should be attached to the result. In particular, a non zero result indicates nothing about values of object's properties. The result is valid withing a single instance of document where objects were taken. If Compare returns non zero value and the document is closed and reopened, there is no guarantee that it will be return the same non zero value for those same object.

The following conditions apply:

  • If a.Compare(b) == 0, then b.Compare(a) == 0.
  • If a.Compare(b) > 0, then b.Compare(a) < 0.
  • If a.Compare(b) < 0, then b.Compare(a) > 0.
  • If a.Compare(b) == 0, and b.Compare(c) == 0, then a.Compare(c) == 0.
  • If a.Compare(b) > 0, and b.Compare(c) > 0, then a.Compare(c) > 0.
  • If a.Compare(b) < 0, and b.Compare(c) < 0, then a.Compare(c) < 0.

See Also

IPXC_CState