Node:iostream wrappers, Previous:String streams, Up:Reference



iostream wrappers

The iostream wrapper classes provide a way to wrap around an already existing stream of the standard or traditional C++ iostream library, thus providing binary access to such a stream. The wrapper classes consist of biniwstream, binowstream and binwstream.

The iostream wrapper classes do not provide any extra methods by themselves. They just inherit the interface of the general binary stream classes. Look there for reference. biniwstream inherits from binistream, binowstream inherits from binostream and binwstream inherits from both of them.

Remember to always open the iostream stream with the ios::bin flag set, before you wrap it with a binary stream, or else you will get strange errors on some operating systems.

All other flags you set on the iostream stream will also indirectly affect the wrapped binary stream, so be careful.

Header file: binwrap.h

Public methods:

biniwstream(istream *istr)
binowstream(ostream *ostr)
binwstream(iostream *str)
The constructor. istr, ostr and str are pointers to an appropriate, already existing and open stream from the iostream library.
~biniwstream()
~binowstream()
~binwstream()
The destructor.
virtual void seek(long pos, Offset offs = Set)
virtual long pos()
Implementation of the abstract virtual methods, inherited from binio. Refer to the reference of that class for more information.