Copying
[Algorithms]

Collaboration diagram for Copying:

Algorithms for copying elements. More...

Copying

(OLBidirectionalIterator *) + copyBackwardFrom:to:destination:
 Copy elements.
(OLForwardIterator *) + copyFrom:to:destination:
 Copy elements.

Detailed Description

Algorithms for copying elements.

Simple algorithms for copying elements from one range to another.

See also:
OLAlgorithm

Function Documentation

+ (OLBidirectionalIterator*) copyBackwardFrom: (OLBidirectionalIterator *)  first
to: (OLBidirectionalIterator *)  last
destination: (OLBidirectionalIterator *)  dest 

Copy elements.

The range [first, last) is traversed from the end to the beginning, and each element is assigned to its corresponding position in the sequence suggested by dest. That is, dest represents the position one beyond the last element of the target range. An iterator pointing to the first element of the target range is returned.

Precondition:
The range starting from dest must either have enough valid elements to hold the result, or dest be a type of insert iterator.
Note:
The two ranges of iterators could be expressed as [first, last) and [result, dest) where result is the iterator returned by this message.

If OpenStep is present the returned object will be autoreleased before being returned.

Parameters:
first the first in the range of elements to copy
last one position beyond the last in the range of elements to copy
dest the iterator one position beyond the end of the destination range
Returns:
an iterator pointing to the first element in the destination range

+ (OLForwardIterator*) copyFrom: (OLForwardIterator *)  first
to: (OLForwardIterator *)  last
destination: (OLForwardIterator *)  dest 

Copy elements.

The range [first, last) is traversed from the beginning to the end, and each element is assigned to its corresponding position in the sequence suggested by dest. An iterator pointing to the last element of the target range is returned.

Precondition:
The range starting from dest must either have enough valid elements to hold the result, or dest be a type of insert iterator.
Note:
The two ranges of iterators could be expressed as [first, last) and [dest, result) where result is the iterator returned by this message.

If OpenStep is present the returned object will be autoreleased before being returned.

Parameters:
first the first in the range of elements to copy
last one position beyond the last in the range of elements to copy
dest the iterator at the beginning of the destination range
Returns:
an iterator pointing to the last element in the destination range


ObjectiveLibGenerated Sun Apr 22 15:18:00 2007, © 2004-2007 Will Mason
SourceForge.net Logo