Oolite 1.91.0.7645-241119-222d325
Loading...
Searching...
No Matches
OOPriorityQueueEnumerator Class Reference
+ Inheritance diagram for OOPriorityQueueEnumerator:
+ Collaboration diagram for OOPriorityQueueEnumerator:

Instance Methods

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

Private Attributes

OOPriorityQueue_queue
 

Detailed Description

Definition at line 125 of file OOPriorityQueue.m.

Method Documentation

◆ dealloc

- (void) dealloc
implementation

Definition at line 128 of file OOPriorityQueue.m.

582{
583 [_queue release];
584
585 [super dealloc];
586}

◆ initWithPriorityQueue:

- (id) initWithPriorityQueue: (OOPriorityQueue *) queue

Definition at line 128 of file OOPriorityQueue.m.

564 :(OOPriorityQueue *)queue
565{
566 if (queue == nil)
567 {
568 [self release];
569 return nil;
570 }
571
572 self = [super init];
573 if (self != nil)
574 {
575 _queue = [queue retain];
576 }
577 return self;
578}
return nil

◆ nextObject

- (id) nextObject
implementation

Definition at line 128 of file OOPriorityQueue.m.

590{
591 id value = [_queue nextObject];
592 if (value == nil)
593 {
594 // Maintain enumerator semantics by ensuring we don't start returning new values after returning nil.
595 [_queue release];
596 _queue = nil;
597 }
598 return value;
599}

Member Data Documentation

◆ _queue

- (OOPriorityQueue*) _queue
private

Definition at line 128 of file OOPriorityQueue.m.


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