#ifndef H_BINIO_BINWRAP
#define H_BINIO_BINWRAP
#include "binio.h"
#if BINIO_ENABLE_IOSTREAM
#if BINIO_ISO_STDLIB
#include <iostream>
using std::iostream;
using std::ostream;
using std::istream;
using std::ios;
using std::streambuf;
#else
#include <iostream.h>
#endif
class biniwstream: public binistream
{
public:
biniwstream(istream *istr);
virtual ~biniwstream();
virtual void seek(long pos, Offset offs = Set);
virtual long pos();
protected:
virtual Byte getByte();
private:
istream *in;
};
class binowstream: public binostream
{
public:
binowstream(ostream *ostr);
virtual ~binowstream();
virtual void seek(long pos, Offset offs = Set);
virtual long pos();
protected:
virtual void putByte(Byte b);
private:
ostream *out;
};
class binwstream: public biniwstream, public binowstream
{
public:
binwstream(iostream *str);
virtual ~binwstream();
virtual void seek(long pos, Offset offs = Set);
virtual long pos();
protected:
virtual Byte getByte();
virtual void putByte(Byte b);
private:
iostream *io;
};
#endif
#endif