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.
You can construct and destruct objects of this class.
![]() |
public:
virtual ~CompareFn()
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
CompareFn()
Provides the default constructor.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use these members to compare objects in the container.
![]() |
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:
Windows | OS/2 | AIX |
Yes | Yes | Yes |