![]() SourcePro C++ 12.5 |
SourcePro® C++ API Reference Guide |
Product Documentation: SourcePro C++ Documentation Home |
Input iterator that reads successive elements from the input stream for which it was constructed. More...
#include <rw/vstream.h>
Inherits iterator< std::input_iterator_tag, T, int, const T *, const T & >.
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 Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Provide feedback to Rogue Wave about its documentation.