ObjectiveLib  1.0.0
Copying
Algorithms

Algorithms for copying elements. More...

Collaboration diagram for Copying:

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:
firstthe first in the range of elements to copy
lastone position beyond the last in the range of elements to copy
destthe 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:
firstthe first in the range of elements to copy
lastone position beyond the last in the range of elements to copy
destthe iterator at the beginning of the destination range
Returns:
an iterator pointing to the last element in the destination range

ObjectiveLibGenerated Sat Feb 15 2014 07:45:33, © 2004-2007 Will Mason