Oolite 1.91.0.7668-250429-8542c40
All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Modules Pages
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 44 of file OOExcludeObjectEnumerator.m.

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

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 53 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

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 31 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}

References _enumerator, and _excludeObject.

◆ nextObject

- (id) nextObject
implementation

Definition at line 63 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}

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

Referenced by initWithEnumerator:excludingObject:.

◆ _excludeObject

- (id) _excludeObject
private

Definition at line 35 of file OOExcludeObjectEnumerator.h.

Referenced by initWithEnumerator:excludingObject:, and nextObject.


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