Oolite
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 30 of file OOExcludeObjectEnumerator.h.

Method Documentation

◆ dealloc

- (void) dealloc
implementation

Definition at line 41 of file OOExcludeObjectEnumerator.m.

42{
43 [_enumerator release];
44 [_excludeObject release];
45
46 [super dealloc];
47}

References dealloc.

Referenced by dealloc.

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

◆ enumeratorWithEnumerator:excludingObject:

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

Definition at line 49 of file OOExcludeObjectEnumerator.m.

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

References nil.

Referenced by NSEnumerator(OOExcludingObject)::ooExcludingObject:.

Here is the caller graph for this function:

◆ initWithEnumerator:excludingObject:

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

Definition at line 30 of file OOExcludeObjectEnumerator.m.

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

References _enumerator, and _excludeObject.

◆ nextObject

- (id) nextObject
implementation

Definition at line 60 of file OOExcludeObjectEnumerator.m.

61{
62 id result = nil;
63 do {
64 result = [_enumerator nextObject];
65 } while (result == _excludeObject && result != nil);
66
67 return result;
68}

References _excludeObject, 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 32 of file OOExcludeObjectEnumerator.h.

Referenced by initWithEnumerator:excludingObject:.

◆ _excludeObject

- (id) _excludeObject
private

Definition at line 33 of file OOExcludeObjectEnumerator.h.

Referenced by initWithEnumerator:excludingObject:, and nextObject.


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