tstream


A text stream is an instance of os_tstream . os_tstream is derived from the standard iostream class and thus inherits all of its behaviors. When an os_tstream is constructed, it is associated with a particular I/O device via an intermediate adapter object called os_adapter . When an item is streamed to an os_tstream , the item is converted into a text format and then sent to the I/O device via the adapter. This technique allows the text streaming mechanism to be fully decoupled from details of any particular I/O device.

Library

Streaming<ToolKit>

Declaration

#include <ospace/stream/tstream.h>

class os_tstream : public iostream

Interface

Constructor
os_tstream()
Constructs a text stream that is not attached to any device.
Constructor
os_tstream( const os_adapter& adapter )
Constructs a text stream that is attached to adapter .
attach
void attach( const os_adapter& adapter )
Attaches this stream to adapter .
device
os_device* device() const
Returns a pointer to the os_device used by this text stream.
close
void close()
Closes the device associated with this stream.
rdbuf
streambuf* rdbuf() const
Returns a pointer to the streambuf used by this text stream.

Copyright©1994-2026 Recursion Software LLC
All Rights Reserved - For use by licensed users only.