CPSortDescriptor Class Reference

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 51 of file CPSortDescriptor.j.


Member Function Documentation

- (BOOL) ascending   [implementation]

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

Definition at line 95 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 123 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 65 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 77 of file CPSortDescriptor.j.

- (CPString) key   [implementation]

Returns the descriptor's property key

Definition at line 103 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 132 of file CPSortDescriptor.j.

- (SEL) selector   [implementation]

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

Definition at line 111 of file CPSortDescriptor.j.


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

Generated on Thu Dec 11 01:55:51 2008 for Cappuccino by  doxygen 1.5.7.1