### IContainerControl::CompareFn

  The IContainerControl::CompareFn class provides a sort function for containers. The container uses objects of this class to sort its contents. The class provides this sorting function by passing the compare function multiple sets of two objects. The compare function indicates whether the objects are equal or if one precedes the other.

  When the container calls IContainerControl::sort, an IContainerControl::CompareFn object is passed as input to this function. Thereafter, the container calls IContainerControl::CompareFn::isEqual, as needed, to sort each container object.

### IContainerControl::CompareFn - Member Functions and Data by Group

### Constructors & Destructor

You can construct and destruct objects of this class.

~CompareFn

      public:
      virtual ~CompareFn()

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

CompareFn

      public:
      CompareFn()

  Provides the default constructor.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### Object Sorting

Use these members to compare objects in the container.

isEqual

      public:
      virtual int
        isEqual( IContainerObject* object1,
                 IContainerObject* object2,
                 IContainerControl* container ) const = 0

  Returns the result of an equivalency test between object1 and object2 in the specified container. The results indicate the following:

  Less than 0
    The first object (object1) is less than the second object (object2).
  0
    The first object is equal to the second object.
  Greater than 0
    The first object is greater than the second object.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### IContainerControl::CompareFn - Inherited Member Functions and Data

#### Inherited Public Functions

  - None

#### Inherited Public Data

  - None

#### Inherited Protected Functions

  - None

#### Inherited Protected Data

  - None