Index

DKSortAttrDefDD

Purpose:

The DKSortAttrDefDD class represents the sort-compare function for a DKEntityDefDD object.

Class summary:

class DKSortAttrDefDD : public dkSort
{
  public:
     DKSortAttrDefDD() {;}
     virtual ~DKSortAttrDefDD() {;}
 
     virtual DKAny getKey(const DKAny* anObject) const;
     virtual int compare(const DKAny* first, const DKAny* second) const;
     virtual DKBoolean lessThan(const DKAny* first, const DKAny* second) const;
     virtual DKBoolean greaterThan(const DKAny* first, const DKAny* second) const;
     virtual DKBoolean equals(const DKAny* first, const DKAny* second) const;
     virtual void sort(DKAny** arrayOfAny, int arrayDimension, DKBoolean order);
 
};

Members:

Constructors and destructor
     DKSortAttrDefDD() {;}
     virtual ~DKSortAttrDefDD() {;}
 

Member functions

getKey
Returns the name of the entity.
     virtual DKAny getKey(const DKAny* anObject) const;
 

compare
Compares two objects.
     virtual int compare(const DKAny* first, const 
                              DKAny* second) const;
 

lessThan
Compares two objects to determine if the first object is less than the other.
     virtual DKBoolean lessThan(const DKAny* first, const 
                                     DKAny* second) const;
 

greaterThan
Compares two AttrDef objects to determine if the first object is greater than the second. Calls the getKey method to obtain the object's key. Returns TRUE if the first string is greater than the second.
     virtual DKBoolean greaterThan(const DKAny* first, const 
                                        DKAny* second) const;
 

equals
Compares two AttrDef objects for equality. Calls the getKey method to obtain the object's key. Returns TRUE if the first string equals the second.
     virtual DKBoolean equals(const DKAny* first, const 
                                   DKAny* second) const;
 

sort
Sorts an array of objects based on their keys. The key is obtained from each object using the getKey method. It returns the same array with the objects sorted in the specified order.
     virtual void sort(DKAny** arrayOfAny, int 
                       arrayDimension, DKBoolean order);
 

(c) Copyright International Business Machines Corporation 1996, 2003. IBM Corp. All rights reserved.