xflminterface IF_ResultSetCompare : public XF_RefCount


This class represents a comparer for entries in a result set.  XFLAIM does not provide an implementation of this interface.  It is up to the application to provide an implementation.  It is a way for an application to plug in a custom compare method for entries in result sets.  It is passed into a result set via the IF_ResultSet::setupResultSet method.


Method Summary

RCODE compare - Compare two entries in a result set.  The IF_ResultSet::finalizeResultSet method uses this to sort entries in the result set.

 

Method Detail

compare

    RCODE compare(

        void *            pvEntry1,

        FLMUINT    uiEntryLength1,

        void *            pvEntry2,

        FLMUINT    uiEntryLength2,

        FLMINT *    piCompare);

Compare two entries in a result set.  The IF_ResultSet::finalizeResultSet method uses this to sort entries in the result set.

    Parameters In:

void  * pvEntry1 First entry to be compared.
FLMUINT uiEntryLength1 Length (in bytes) of first entry.
void  * pvEntry2 Second entry to be compared.
FLMUINT uiEntryLength2 Length (in bytes) of second entry.

    Parameters Out:

FLMINT * piCompare Application should return results of comparison here, as follows:
  • -1 - pvEntry1 < pvEntry2
  • 0 - pvEntry1 = pvEntry2
  • 1 - pvEntry1 > pvEntry2

[Back to Top]