4
Copyright (C) 1995, 1996 Ovidiu Predescu and Mircea Oancea.
7
Author: Mircea Oancea <mircea@jupiter.elcom.pub.ro>
9
This file is part of libFoundation.
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
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.
25
#ifndef __NSConcreteSet_h__
26
#define __NSConcreteSet_h__
28
#include <Foundation/NSSet.h>
29
#include <Foundation/NSEnumerator.h>
30
#include <Foundation/NSUtilities.h>
33
* Concrete class for NSSet
36
@interface NSConcreteSet : NSSet
41
/* Allocating and Initializing */
44
- (id)initWithObjects:(id*)objects count:(unsigned int)count;
45
- (id)initWithSet:(NSSet *)set copyItems:(BOOL)flag;
47
/* Accessing keys and values */
49
- (unsigned int)count;
50
- (id)member:(id)anObject;
51
- (NSEnumerator *)objectEnumerator;
55
- (void)__setObjectEnumerator:(void*)en;
60
* Concrete class for NSMutableSet
63
@interface NSConcreteMutableSet : NSMutableSet
68
/* Allocating and Initializing */
71
- (id)initWithObjects:(id*)objects count:(unsigned int)count;
72
- (id)initWithSet:(NSSet *)set copyItems:(BOOL)flag;
74
/* Accessing keys and values */
76
- (unsigned int)count;
77
- (id)member:(id)anObject;
78
- (NSEnumerator *)objectEnumerator;
80
/* Add and remove entries */
82
- (void)addObject:(id)object;
83
- (void)removeObject:(id)object;
84
- (void)removeAllObjects;
88
- (void)__setObjectEnumerator:(void*)en;
93
* _NSConcreteSetEnumerator class
96
typedef enum {setEnumHash, setEnumMap} SetEnumMode;
98
@interface _NSConcreteSetEnumerator : NSEnumerator
104
NSHashEnumerator hash;
108
- (id)initWithSet:(NSSet*)_set mode:(SetEnumMode)_mode;
111
@end /* _NSConcreteSetEnumerator */
113
#endif /* __NSConcreteSet_h__ */