#ifndef __STREAMBUFW_AMV
#define __STREAMBUFW_AMV
#include <streambuf>
#include <ostream>
#include "amvdefs.h"
namespace amv {
class streambufw: public streambuf {
streambufw *psb;
public:
streambufw(streambuf *p):psb((streambufw *) p)
{
}
char *begin() const
{
return psb->gptr();
}
char *end() const
{
return psb->egptr();
}
friend ostream &operator<<(ostream &os,const streambufw &s)
{
char *pc;
os<<"[[";
for(pc=s.begin(); pc!=s.end(); ++pc)
os<<*pc;
os<<"]]";
return os;
}
private:
int overflow(int i)
{
return 0;
}
int underflow()
{
return 0;
}
};
}
#endif