2 Copyright (C) 2000-2003 SKYRIX Software AG
4 This file is part of OGo
6 OGo is free software; you can redistribute it and/or modify it under
7 the terms of the GNU Lesser General Public License as published by the
8 Free Software Foundation; either version 2, or (at your option) any
11 OGo is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
14 License for more details.
16 You should have received a copy of the GNU Lesser General Public
17 License along with OGo; see the file COPYING. If not, write to the
18 Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
23 #ifndef _EOGrouping_h__
24 #define _EOGrouping_h__
26 #import <Foundation/NSObject.h>
28 @class NSString, NSArray, NSMutableArray;
31 @interface EOGrouping : NSObject
33 NSString *defaultName;
34 NSArray *sortOrderings;
37 - (id)initWithDefaultName:(NSString *)_defaultName;
39 - (NSString *)defaultName;
40 - (void)setDefaultName:(NSString *)_defaultName;
42 - (NSArray *)sortOrderings;
43 - (void)setSortOrderings:(NSArray *)_sortOrderings;
45 - (NSString *)groupNameForObject:(id)object;
46 - (NSArray *)orderedGroupNames;
50 @interface EOGroupingSet : EOGrouping
55 - (NSArray *)groupings;
56 - (void)setGroupings:(NSArray *)_groupings;
60 @interface EOKeyGrouping : EOGrouping
63 NSMutableArray *groupNames; /* ??? to be fixed */
66 - (id)initWithKey:(NSString *)_key;
69 - (void)setKey:(NSString *)_key;
73 @interface EOQualifierGrouping : EOGrouping
75 EOQualifier *qualifier;
79 - (id)initWithQualifier:(EOQualifier *)_qualifier name:(NSString *)_name;
81 - (void)setName:(NSString *)_name;
84 - (void)setQualifier:(EOQualifier *)_qualifier;
85 - (EOQualifier *)qualifier;
89 #import <Foundation/NSArray.h>
93 @interface NSArray(EOGrouping)
94 - (NSDictionary *)arrayGroupedBy:(EOGrouping *)_grouping;
97 #import <EOControl/EOFetchSpecification.h>
99 extern NSString *EOGroupingHint;
101 @interface EOFetchSpecification(Groupings)
102 - (void)setGroupings:(NSArray *)_groupings;
103 - (NSArray *)groupings;
106 #endif /* _EOGrouping_h__ */