|
Compare
Compares the data on a list element with data on another list element.
virtual int Compare(
|
Parameters
node
[in] Pointer to a list element to compare
mode=0
[in] Comparison variant
Return Value
0 - in case the list elements are equal, -1 - if the list element is less than the element used for comparison (node), 1 - if the list element is greater than the element used for comparison (node).
Note
Compare() method in CObject class always returns 0 and does not perform any action. If you want to compare data in derived class, the Compare(...) method should be implemented. The 'mode' parameter should be used when implementing multivariate comparison.
Example:
//--- example for CObject::Compare(...)
|