SourcePro® 2023.1 |
SourcePro® API Reference Guide |
Input iterator that reads successive elements from the input stream for which it was constructed. More...
#include <rw/vstream.h>
Public Member Functions | |
RWvistreamIterator () | |
RWvistreamIterator (RWvistream &s) | |
const T & | operator* () const |
RWvistreamIterator & | operator++ () |
RWvistreamIterator | operator++ (int) |
const T * | operator-> () const |
Related Functions | |
(Note that these are not member functions.) | |
bool | operator!= (const RWvistreamIterator< T > &lhs, const RWvistreamIterator< T > &rhs) |
bool | operator== (const RWvistreamIterator< T > &lhs, const RWvistreamIterator< T > &rhs) |
Class RWvistreamIterator is an input iterator that reads (using operator>>
) successive elements from the input stream for which it was constructed. After it is constructed, and every time operator++() or operator++(int) is used, the iterator reads and stores a value of T
.
The constructor with no arguments always constructs and end-of-stream input iterator object, which is the only legitimate iterator to be used for the end condition. The result of operator*() on an end-of-stream iterator is undefined. For any other iterator value, a const T&
is returned. The result of operator->() on an end-of stream iterator is not defined. For any other iterator value, a const T*
is returned. The behavior of a program that applies operator++() to an end-of-stream iterator is undefined. It is impossible to store things into RWvistream iterators.
|
inline |
Constructs an end-of-stream iterator.
|
inline |
Constructs an iterator that will use s as the source for all extraction operations. Extracts a single value of type T
from the stream s
. If the extraction fails, this iterator becomes an end-of-stream iterator, otherwise this iterator becomes a non-end-of-stream iterator.
|
inline |
Returns a reference to the last value read from the underlying stream.
|
inline |
Extracts an item from the underlying stream and returns a reference to self. If the extraction operation fails, this iterator becomes an end-of-stream iterator.
|
inline |
Makes a copy of self, extracts an item from the underlying stream and, returns the copy that was made before the extraction. If the extract operation fails, this iterator becomes an end-of-stream iterator.
|
inline |
Returns a pointer to the last value read from the underlying stream.
|
friend |
Returns true
if lhs is not equal to rhs, otherwise false
.
Two end-of-stream iterators are always equal. An end-of-stream iterator is not equal to a non-end-of-stream iterator. Two non-end-of-stream iterators are equal when they are associated with the same stream.
|
friend |
Returns true
if lhs is equal to rhs, otherwise false
.
Two end-of-stream iterators are always equal. An end-of-stream iterator is not equal to a non-end-of-stream iterator. Two non-end-of-stream iterators are equal when they are associated with the same stream.
Copyright © 2023 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved. |