~ubuntu-branches/ubuntu/edgy/sope/edgy

« back to all changes in this revision

Viewing changes to libFoundation/Foundation/NSSortDescriptor.h

  • Committer: Bazaar Package Importer
  • Author(s): Sebastian Ley
  • Date: 2005-08-19 16:53:31 UTC
  • Revision ID: james.westby@ubuntu.com-20050819165331-hs683wz1osm708pw
Tags: upstream-4.4rc.2
ImportĀ upstreamĀ versionĀ 4.4rc.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* 
 
2
   NSSortDescriptor.h
 
3
 
 
4
   Copyright (C) 2003 SKYRIX Software AG, Helge Hess.
 
5
   All rights reserved.
 
6
   
 
7
   Author: Helge Hess <helge.hess@opengroupware.org>
 
8
   
 
9
   This file is part of libFoundation.
 
10
   
 
11
   Permission to use, copy, modify, and distribute this software and its
 
12
   documentation for any purpose and without fee is hereby granted, provided
 
13
   that the above copyright notice appear in all copies and that both that
 
14
   copyright notice and this permission notice appear in supporting
 
15
   documentation.
 
16
   
 
17
   We disclaim all warranties with regard to this software, including all
 
18
   implied warranties of merchantability and fitness, in no event shall
 
19
   we be liable for any special, indirect or consequential damages or any
 
20
   damages whatsoever resulting from loss of use, data or profits, whether in
 
21
   an action of contract, negligence or other tortious action, arising out of
 
22
   or in connection with the use or performance of this software.
 
23
*/
 
24
 
 
25
#ifndef __NSSortDescriptor_H__
 
26
#define __NSSortDescriptor_H__
 
27
 
 
28
#include <Foundation/NSObject.h>
 
29
#include <Foundation/NSArray.h>
 
30
 
 
31
@class NSString;
 
32
 
 
33
@interface NSSortDescriptor : NSObject < NSCoding, NSCopying >
 
34
{
 
35
  NSString *key;
 
36
  SEL      selector;
 
37
  struct {
 
38
      int isAscending:1;
 
39
      int reserved:31;
 
40
  } sdFlags;
 
41
}
 
42
 
 
43
- (id)initWithKey:(NSString *)_key ascending:(BOOL)_asc selector:(SEL)_sortsel;
 
44
- (id)initWithKey:(NSString *)_key ascending:(BOOL)_asc;
 
45
 
 
46
/* accessors */
 
47
 
 
48
- (NSString *)key;
 
49
- (SEL)selector;
 
50
- (BOOL)ascending;
 
51
 
 
52
/* operations */
 
53
 
 
54
- (id)reversedSortDescriptor;
 
55
- (NSComparisonResult)compareObject:(id)_obj1 toObject:(id)_obj2;
 
56
 
 
57
@end
 
58
 
 
59
@interface NSArray(NSSortDescriptorSort)
 
60
 
 
61
- (NSArray *)sortedArrayUsingDescriptors:(NSArray *)_descs;
 
62
 
 
63
@end
 
64
 
 
65
@interface NSMutableArray(NSSortDescriptorSort)
 
66
 
 
67
- (void)sortUsingDescriptors:(NSArray *)_descs;
 
68
 
 
69
@end
 
70
 
 
71
#endif /* __NSSortDescriptor_H__ */
 
72
 
 
73
/*
 
74
  Local Variables:
 
75
  c-basic-offset: 4
 
76
  tab-width: 8
 
77
  End:
 
78
*/