]> err.no Git - sope/blob - sope-core/NGExtensions/NGExtensions/EOGrouping.h
overhauled logging for NGExtensions which NGObjWeb uses
[sope] / sope-core / NGExtensions / NGExtensions / EOGrouping.h
1 /*
2   Copyright (C) 2000-2003 SKYRIX Software AG
3
4   This file is part of OGo
5
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
9   later version.
10
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.
15
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
19   02111-1307, USA.
20 */
21 // $Id$
22
23 #ifndef _EOGrouping_h__
24 #define _EOGrouping_h__
25
26 #import <Foundation/NSObject.h>
27
28 @class NSString, NSArray, NSMutableArray;
29 @class EOQualifier;
30
31 @interface EOGrouping : NSObject
32 {
33   NSString *defaultName;
34   NSArray  *sortOrderings;
35 }
36
37 - (id)initWithDefaultName:(NSString *)_defaultName;
38
39 - (NSString *)defaultName;
40 - (void)setDefaultName:(NSString *)_defaultName;
41
42 - (NSArray *)sortOrderings;
43 - (void)setSortOrderings:(NSArray *)_sortOrderings;
44
45 - (NSString *)groupNameForObject:(id)object;
46 - (NSArray *)orderedGroupNames;
47
48 @end
49
50 @interface EOGroupingSet : EOGrouping
51 {
52   NSArray *groupings;
53 }
54
55 - (NSArray *)groupings;
56 - (void)setGroupings:(NSArray *)_groupings;
57
58 @end
59
60 @interface EOKeyGrouping : EOGrouping
61 {
62   NSString       *key;
63   NSMutableArray *groupNames; /* ??? to be fixed */
64 }
65
66 - (id)initWithKey:(NSString *)_key;
67
68 - (NSString *)key;
69 - (void)setKey:(NSString *)_key;
70
71 @end
72
73 @interface EOQualifierGrouping : EOGrouping
74 {
75   EOQualifier *qualifier;
76   NSString    *name;
77 }
78
79 - (id)initWithQualifier:(EOQualifier *)_qualifier name:(NSString *)_name;
80
81 - (void)setName:(NSString *)_name;
82 - (NSString *)name;
83
84 - (void)setQualifier:(EOQualifier *)_qualifier;
85 - (EOQualifier *)qualifier;
86
87 @end
88
89 #import <Foundation/NSArray.h>
90
91 @class NSDictionary;
92
93 @interface NSArray(EOGrouping)
94 - (NSDictionary *)arrayGroupedBy:(EOGrouping *)_grouping;
95 @end
96
97 #import <EOControl/EOFetchSpecification.h>
98
99 extern NSString *EOGroupingHint;
100
101 @interface EOFetchSpecification(Groupings)
102 - (void)setGroupings:(NSArray *)_groupings;
103 - (NSArray *)groupings;
104 @end
105
106 #endif /* _EOGrouping_h__ */