CPSortDescriptor Class Reference
[Foundation]

List of all members.

Public Member Functions

(id) - initWithKey:ascending: [implementation]
(id) - initWithKey:ascending:selector: [implementation]
(BOOL) - ascending [implementation]
(CPString- key [implementation]
(SEL) - selector [implementation]
(CPComparisonResult) - compareObject:withObject: [implementation]
(id) - reversedSortDescriptor [implementation]


Detailed Description

A CPSortDescriptor holds the attributes necessary to describe how to sort a set of objects. The sort descriptor instance holds a property key path to the sort item of the objects to compare, the method selector to call for sorting and the sort order.

Definition at line 53 of file CPSortDescriptor.j.


Member Function Documentation

- (BOOL) ascending   [implementation]

Returns YES if the sort descriptor's order is ascending.

Definition at line 97 of file CPSortDescriptor.j.

- (CPComparisonResult) compareObject: (id)  lhsObject
withObject: (id)  rhsObject 
[implementation]

Compares two objects.

Parameters:
lhsObject the left hand side object to compre
rhsObject the right hand side object to compare
Returns:
the comparison result

Definition at line 125 of file CPSortDescriptor.j.

- (id) initWithKey: (CPString aKey
ascending: (BOOL)  isAscending 
[implementation]

Initializes the sort descriptor.

Parameters:
aKey the property key path to sort
isAscending the sort order
Returns:
the initialized sort descriptor

Definition at line 67 of file CPSortDescriptor.j.

- (id) initWithKey: (CPString aKey
ascending: (BOOL)  isAscending
selector: (SEL)  aSelector 
[implementation]

Initializes the sort descriptor

Parameters:
aKey the property key path to sort
isAscending the sort order
aSelector this method gets called to compare objects. The method will take one argument (the object to compare against itself, and must return a CPComparisonResult.

Definition at line 79 of file CPSortDescriptor.j.

- (CPString) key   [implementation]

Returns the descriptor's property key

Definition at line 105 of file CPSortDescriptor.j.

- (id) reversedSortDescriptor   [implementation]

Makes a copy of this sort descriptor with a reversed sort order.

Returns:
the reversed copy of the sort descriptor

Definition at line 134 of file CPSortDescriptor.j.

- (SEL) selector   [implementation]

Returns the selector of the method to call when comparing objects.

Definition at line 113 of file CPSortDescriptor.j.


The documentation for this class was generated from the following file:

Generated on Wed May 20 12:44:01 2009 for Cappuccino by  doxygen 1.5.8