OutputByteStream.h revision 7c478bd95313f5f23a4c958a745db2134aa03244
// Copyright (c) 1997 James Clark
// See the file COPYING for copying permission.
#pragma ident "%Z%%M% %I% %E% SMI"
#ifndef OutputByteStream_INCLUDED
#define OutputByteStream_INCLUDED 1
#include "StringOf.h"
#include "Boolean.h"
#ifdef SP_NAMESPACE
#endif
void sputc(char c);
OutputByteStream &operator<<(char);
OutputByteStream &operator<<(unsigned char);
OutputByteStream &operator<<(const char *);
OutputByteStream &operator<<(int);
OutputByteStream &operator<<(unsigned);
OutputByteStream &operator<<(long);
OutputByteStream &operator<<(unsigned long);
char *getBufferPtr() const;
size_t getBufferSize() const;
void usedBuffer(size_t);
char *ptr_;
char *end_;
};
inline
char *OutputByteStream::getBufferPtr() const
{
return ptr_;
}
inline
{
}
inline
{
ptr_ += n;
}
inline
void OutputByteStream::sputc(char c)
{
*ptr_++ = c;
else
flushBuf(c);
}
inline
{
sputc(c);
return *this;
}
inline
{
sputc(char(c));
return *this;
}
inline
{
return *this << long(n);
}
inline
{
return *this << (unsigned long)n;
}
inline
{
return *this;
}
void flush();
void flushBuf(char);
};
#ifdef SP_WIDE_SYSTEM
#else
#endif
void flush();
void flushBuf(char);
int fd_;
};
#ifdef SP_NAMESPACE
}
#endif
#endif /* not OutputByteStream_INCLUDED */