jigdo API
Last update by Admin on 2010-05-23
SerialIstreamIterator Class Reference
Slight variation (and simplification) of std::istream_iterator and std::ostream_iterator. More...
#include <serialize.hh>
Public Types | |
typedef bistream | istream_type |
typedef byte | value_type |
typedef const byte * | pointer |
typedef const byte & | reference |
Public Member Functions | |
SerialIstreamIterator () | |
SerialIstreamIterator (istream_type &s) | |
SerialIstreamIterator & | operator++ () |
SerialIstreamIterator | operator++ (int) |
reference | operator* () const |
pointer | operator-> () const |
Detailed Description
Slight variation (and simplification) of std::istream_iterator and std::ostream_iterator.You *MUST* use this when reading binary data for (un)serializing.
The reason why the ordinary iterator does not work is that it uses "mystream >> byteToRead" which skips over whitespace (!) - this one uses "mystream.get(byteToRead)".
Additionally, because it makes use of peek() this implementation allows mixing of Serial*streamIterator with calls to read() on the respective stream, without any problems. (This does not work with GCC's version, which uses get().)
Member Typedef Documentation
typedef byte SerialIstreamIterator::value_type |
typedef const byte* SerialIstreamIterator::pointer |
typedef const byte& SerialIstreamIterator::reference |
Constructor & Destructor Documentation
SerialIstreamIterator::SerialIstreamIterator | ( | ) | [inline] |
SerialIstreamIterator::SerialIstreamIterator | ( | istream_type & | s | ) | [inline] |
Member Function Documentation
SerialIstreamIterator& SerialIstreamIterator::operator++ | ( | ) | [inline] |
SerialIstreamIterator SerialIstreamIterator::operator++ | ( | int | ) | [inline] |
reference SerialIstreamIterator::operator* | ( | ) | const [inline] |
pointer SerialIstreamIterator::operator-> | ( | ) | const [inline] |
The documentation for this class was generated from the following file:
Generated on Tue Sep 23 14:27:43 2008 for jigdo by
