Oolite
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 12 of file OOWeakSet.m.

Method Documentation

◆ dealloc

- (void) dealloc
implementation

Definition at line 261 of file OOWeakSet.m.

262{
263 [_enumerator release];
264
265 [super dealloc];
266}

References dealloc.

Referenced by dealloc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ enumeratorWithCollection:

+ (instancetype) enumeratorWithCollection: (id) collection

Definition at line 256 of file OOWeakSet.m.

256 :(id)collection
257{
258 return [[[self alloc] initWithEnumerator:[collection objectEnumerator]] autorelease];
259}

Referenced by OOWeakSet::objectEnumerator.

Here is the caller graph for this function:

◆ initWithEnumerator:

- (id) initWithEnumerator: (NSEnumerator*) enumerator

Definition at line 242 of file OOWeakSet.m.

242 :(NSEnumerator*)enumerator
243{
244 if (enumerator == nil) {
245 [self release];
246 return nil;
247 }
248
249 if ((self = [super init])) {
250 _enumerator = [enumerator retain];
251 }
252
253 return self;
254}
return nil
NSEnumerator * _enumerator
Definition OOWeakSet.m:14

References _enumerator, and nil.

◆ nextObject

- (id) nextObject
implementation

Definition at line 268 of file OOWeakSet.m.

269{
270 id next = nil;
271 while ((next = [_enumerator nextObject])) {
272 next = [next weakRefUnderlyingObject];
273 if (next != nil)
274 return next;
275 }
276
277 return nil;
278}

References _enumerator, nextObject, and nil.

Referenced by nextObject.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ _enumerator

- (NSEnumerator*) _enumerator
private

Definition at line 14 of file OOWeakSet.m.

Referenced by initWithEnumerator:, and nextObject.


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