1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
Input iterators are also available for ti(streambuf) objects.
To read from tt(streambuf) objects supporting input operations
hi(istreambuf_iterator)tt(istreambuf_iterators) can be used, supporting the
operations that are also available for tt(istream_iterator). Different from
the latter iterator type tt(istreambuf_iterators) support three constructors:
itemization(
ittq(istreambuf_iterator<Type>)
(The end iterator of an iterator range is created using the default
tt(istreambuf_iterator) constructor. It represents the i(end-of-stream)
condition when extracting values of type tt(Type) from the tt(streambuf).
)
ittq(istreambuf_iterator<Type>(streambuf *))
(A pointer to a tt(streambuf) may be used when defining an
tt(istreambuf_iterator). It represents the begin iterator of an iterator
range.)
ittq(istreambuf_iterator<Type>(istream))
(An em(istream) may be also used when defining an
tt(istreambuf_iterator). It accesses the tt(istream)'s tt(streambuf) and it
also represents the begin iterator of an iterator range.)
)
In section ref(OSTREAMBUFITER) an example is given using both
tt(istreambuf_iterators) and tt(ostreambuf_iterators).
|