Oolite 1.91.0.7644-241112-7f5034b
Loading...
Searching...
No Matches
OOExcludeObjectEnumerator Class Reference

#include <OOExcludeObjectEnumerator.h>

+ Inheritance diagram for OOExcludeObjectEnumerator:
+ Collaboration diagram for OOExcludeObjectEnumerator:

Instance Methods

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

Class Methods

(id) + enumeratorWithEnumerator:excludingObject:
 

Private Attributes

NSEnumerator * _enumerator
 
id _excludeObject
 

Detailed Description

Definition at line 31 of file OOExcludeObjectEnumerator.h.

Method Documentation

◆ dealloc

- (void) dealloc
implementation

Definition at line 1 of file OOExcludeObjectEnumerator.m.

45{
46 [_enumerator release];
47 [_excludeObject release];
48
49 [super dealloc];
50}

References _enumerator, and _excludeObject.

◆ enumeratorWithEnumerator:excludingObject:

+ (id) enumeratorWithEnumerator: (NSEnumerator *) enumerator
excludingObject: (id) object 

Definition at line 1 of file OOExcludeObjectEnumerator.m.

53 :(NSEnumerator *)enumerator
54 excludingObject:(id)object
55{
56 if (object == nil) return enumerator;
57 if (enumerator == nil) return nil;
58
59 return [[[self alloc] initWithEnumerator:enumerator excludingObject:object] autorelease];
60}
return nil

◆ initWithEnumerator:excludingObject:

- (id) initWithEnumerator: (NSEnumerator *) enumerator
excludingObject: (id) object 
implementation

Definition at line 1 of file OOExcludeObjectEnumerator.m.

31 :(NSEnumerator *)enumerator
32 excludingObject:(id)object
33{
34 if ((self = [super init]))
35 {
36 _enumerator = [enumerator retain];
37 _excludeObject = [object retain];
38 }
39
40 return self;
41}

◆ nextObject

- (id) nextObject
implementation

Definition at line 1 of file OOExcludeObjectEnumerator.m.

64{
65 id result = nil;
66 do
67 {
68 result = [_enumerator nextObject];
69 } while (result == _excludeObject && result != nil);
70
71 return result;
72}

Member Data Documentation

◆ _enumerator

- (NSEnumerator*) _enumerator
private

Definition at line 34 of file OOExcludeObjectEnumerator.h.

Referenced by dealloc.

◆ _excludeObject

- (id) _excludeObject
private

Definition at line 35 of file OOExcludeObjectEnumerator.h.

Referenced by dealloc.


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