OStream Class Reference

#include <Pt/System/IOStream.h>

Output stream for an IODevice. More...

Inherits BasicOStream< char >.

Public Member Functions

 OStream (std::size_t bufferSize=8192, bool extend=false)
 Construct with buffer size.
 OStream (IODevice &device, std::size_t bufferSize=8192, bool extend=false)
 Construct with I/O device.
 ~OStream ()
 Destructor.
IOBufferioBuffer ()
 Returns the stream buffer.
IODevicedevice ()
 Returns the I/O device.
void attach (IODevice &dev)
 Attach to I/O device.
void detach ()
 Detach from I/O device.
void discard ()
 Discards the buffer.
void reset ()
 Discards and detaches.
std::streamsize writesome (char *buffer, std::streamsize n)
 Write as much data as fits in buffer.
BasicStreamBuffer< char > * buffer ()
 Returns the buffer.
void setBuffer (BasicStreamBuffer< char > *sb)
 Sets the buffer.

Detailed Description

OStream is a C++ ostream whose buffer is an IOBuffer. attach() binds an IODevice. Insertion then writes to that device.