OLReverseBidiIterator Class Reference
[Iterators]

A class to reverse the behavior of a given iterator. More...

#import <ObjectiveLib/Iterator.h>

Inheritance diagram for OLReverseBidiIterator:

Inheritance graph
[legend]
List of all members.

Public Member Functions

(id) - advance
 Advance the iterator.
(id) - assign:
 Assign an object to the position in the controlled sequence to which this iterator refers.
(id) - copyWithZone:
 Make a copy of this iterator allocating memory from zone.
(id) - dereference
 Dereference the iterator.
(BOOL) - isEqual:
 Return whether this object is equal to another one.
(id) - reverse
 Reverse the iterator.
Initializers and Deallocators
(void) - dealloc
 Finalize the iterator and deallocate any allocated memory.
(id) - initWithIterator:
 Initialize the iterator with its target.

Protected Attributes

OLBidirectionalIteratorcurrent
 The target iterator on which this iterator performs its operations.

Detailed Description

A class to reverse the behavior of a given iterator.

All operations are performed on the the iterator that is passed to this iterator. However, they are reversed: advance (OLReverseBidiIterator) causes the target iterator to reverse, and so forth.


Member Function Documentation

- (id) advance  

Advance the iterator.

This has the effect of reversing the underlying target iterator by one step.

Returns:
a reference to this iterator

Reimplemented from OLForwardIterator.

- (id) assign: (id)  object  

Assign an object to the position in the controlled sequence to which this iterator refers.

The object currently at the position will be removed and replaced with the given object.

Parameters:
object the object to assign
Returns:
a reference to this iterator

Reimplemented from OLIterator.

- (id) copyWithZone: (NSZone *)  zone  

Make a copy of this iterator allocating memory from zone.

Parameters:
zone the zone from which to allocate memory
Returns:
a copy of this iterator

Reimplemented from OLIterator.

Reimplemented in OLReverseRandomIterator.

- (void) dealloc  

Finalize the iterator and deallocate any allocated memory.

- (id) dereference  

Dereference the iterator.

Return the id of the object to which this iterator points.

Returns:
the id of the referenced object

Reimplemented from OLIterator.

- (id) initWithIterator: (OLBidirectionalIterator *)  itor  

Initialize the iterator with its target.

Parameters:
itor the iterator on which to perform operations
Returns:
a reference to this iterator

- (BOOL) isEqual: (id)  object  

Return whether this object is equal to another one.

Parameters:
object the object to test
Returns:
YES if the iterator is equal to the object, NO if not

Reimplemented from OLIterator.

Reimplemented in OLReverseRandomIterator.

- (id) reverse  

Reverse the iterator.

This has the effect of advancing the underlying target iterator by one step.

Returns:
a reference to this iterator

Reimplemented from OLBidirectionalIterator.


Member Data Documentation

- (OLBidirectionalIterator*) current [protected]

The target iterator on which this iterator performs its operations.


The documentation for this class was generated from the following file:
ObjectiveLibGenerated Sun Apr 22 15:13:46 2007, © 2004-2007 Will Mason
SourceForge.net Logo