ObjFW  Diff

Differences From Artifact [f7ca41c6f4]:

To Artifact [520f646873]:


8
9
10
11
12
13
14

15
16
17
18
19
20
21
 * Q Public License 1.0, which can be found in the file LICENSE included in
 * the packaging of this file.
 */

#include <stdarg.h>

#import "OFObject.h"

#import "OFFastEnumeration.h"

@class OFArray;

struct of_dictionary_bucket
{
	OFObject <OFCopying> *key;







>







8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
 * Q Public License 1.0, which can be found in the file LICENSE included in
 * the packaging of this file.
 */

#include <stdarg.h>

#import "OFObject.h"
#import "OFEnumerator.h"
#import "OFFastEnumeration.h"

@class OFArray;

struct of_dictionary_bucket
{
	OFObject <OFCopying> *key;
141
142
143
144
145
146
147










148
149
150



















151
 */
- (id)objectForKey: (OFObject <OFCopying>*)key;

/**
 * \return The number of objects in the dictionary
 */
- (size_t)count;










@end

#import "OFEnumerator.h"



















#import "OFMutableDictionary.h"







>
>
>
>
>
>
>
>
>
>


|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
 */
- (id)objectForKey: (OFObject <OFCopying>*)key;

/**
 * \return The number of objects in the dictionary
 */
- (size_t)count;

/**
 * \returns An OFEnumerator to enumerate through the dictionary's objects
 */
- (OFEnumerator*)objectEnumerator;

/**
 * \return An OFEnumerator to enumerate through the dictionary's keys
 */
- (OFEnumerator*)keyEnumerator;
@end

@interface OFDictionaryEnumerator: OFEnumerator
{
	struct of_dictionary_bucket *data;
	size_t			    size;
	unsigned long		    mutations;
	unsigned long		    *mutations_ptr;
	size_t			    pos;
}

-     initWithData: (struct of_dictionary_bucket*)data
	      size: (size_t)size
  mutationsPointer: (unsigned long*)mutations_ptr;
@end

@interface OFDictionaryObjectEnumerator: OFDictionaryEnumerator
@end

@interface OFDictionaryKeyEnumerator: OFDictionaryEnumerator
@end

#import "OFMutableDictionary.h"