Oolite 1.91.0.7646-241128-10e222e
Loading...
Searching...
No Matches
OOWeakRefUnpackingEnumerator Class Reference
+ Inheritance diagram for OOWeakRefUnpackingEnumerator:
+ Collaboration diagram for OOWeakRefUnpackingEnumerator:

Instance Methods

(id) - initWithEnumerator:
 
(void) - dealloc [implementation]
 
(id) - nextObject [implementation]
 

Class Methods

(instancetype) + enumeratorWithCollection:
 

Private Attributes

NSEnumerator * _enumerator
 

Detailed Description

Definition at line 14 of file OOWeakSet.m.

Method Documentation

◆ dealloc

- (void) dealloc
implementation

Definition at line 17 of file OOWeakSet.m.

297{
298 [_enumerator release];
299
300 [super dealloc];
301}

◆ enumeratorWithCollection:

+ (instancetype) enumeratorWithCollection: (id) collection

Definition at line 17 of file OOWeakSet.m.

290 :(id)collection
291{
292 return [[[self alloc] initWithEnumerator:[collection objectEnumerator]] autorelease];
293}

◆ initWithEnumerator:

- (id) initWithEnumerator: (NSEnumerator *) enumerator

Definition at line 17 of file OOWeakSet.m.

273 :(NSEnumerator *)enumerator
274{
275 if (enumerator == nil)
276 {
277 [self release];
278 return nil;
279 }
280
281 if ((self = [super init]))
282 {
283 _enumerator = [enumerator retain];
284 }
285
286 return self;
287}
return nil
NSEnumerator * _enumerator
Definition OOWeakSet.m:17

◆ nextObject

- (id) nextObject
implementation

Definition at line 17 of file OOWeakSet.m.

305{
306 id next = nil;
307 while ((next = [_enumerator nextObject]))
308 {
309 next = [next weakRefUnderlyingObject];
310 if (next != nil) return next;
311 }
312
313 return nil;
314}

Member Data Documentation

◆ _enumerator

- (NSEnumerator*) _enumerator
private

Definition at line 17 of file OOWeakSet.m.


The documentation for this class was generated from the following file: