198
199
200
201
202
203
204
205
206
207
208
209
210
211
|
for (i = 0; i < len; i++)
if (![objs[i] isEqual: objs2[i]])
return NO;
return YES;
}
- (void)dealloc
{
OFObject **objs;
size_t len, i;
if (array != nil) {
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
|
for (i = 0; i < len; i++)
if (![objs[i] isEqual: objs2[i]])
return NO;
return YES;
}
- (uint32_t)hash
{
OFObject **carray = [array cArray];
size_t i, count = [array count];
uint32_t hash;
OF_HASH_INIT(hash);
for (i = 0; i < count; i++) {
uint32_t h = [carray[i] hash];
OF_HASH_ADD(hash, h >> 24);
OF_HASH_ADD(hash, (h >> 16) & 0xFF);
OF_HASH_ADD(hash, (h >> 8) & 0xFF);
OF_HASH_ADD(hash, h & 0xFF);
}
OF_HASH_FINALIZE(hash);
return hash;
}
- (void)dealloc
{
OFObject **objs;
size_t len, i;
if (array != nil) {
|
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
|
}
- addObject: (OFObject*)obj
{
@throw [OFNotImplementedException newWithClass: isa
selector: _cmd];
}
- removeNObjects: (size_t)nobjects
{
@throw [OFNotImplementedException newWithClass: isa
selector: _cmd];
}
- (uint32_t)hash
{
OFObject **carray = [array cArray];
size_t i, count = [array count];
uint32_t hash;
OF_HASH_INIT(hash);
for (i = 0; i < count; i++) {
uint32_t h = [carray[i] hash];
OF_HASH_ADD(hash, h >> 24);
OF_HASH_ADD(hash, (h >> 16) & 0xFF);
OF_HASH_ADD(hash, (h >> 8) & 0xFF);
OF_HASH_ADD(hash, h & 0xFF);
}
OF_HASH_FINALIZE(hash);
return hash;
}
@end
|
>
>
>
>
>
>
<
<
<
<
<
|
<
|
<
<
|
<
<
<
<
<
|
<
|
<
|
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
|
}
- addObject: (OFObject*)obj
{
@throw [OFNotImplementedException newWithClass: isa
selector: _cmd];
}
- removeObjectAtIndex: (size_t)index
{
@throw [OFNotImplementedException newWithClass: isa
selector: _cmd];
}
- removeNObjects: (size_t)nobjects
{
@throw [OFNotImplementedException newWithClass: isa
selector: _cmd];
}
- removeNObjects: (size_t)nobjects
atIndex: (size_t)index
{
@throw [OFNotImplementedException newWithClass: isa
selector: _cmd];
}
@end
|