wxWidgets: wxStdOutputStreamBuffer Class Reference

| Version: 3.0.2

- Main Page
- Related Pages
- Categories
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | List of all members
wxStdOutputStreamBuffer Class Reference
Streams

`#include <wx/stdstream.h>`

Inheritance diagram for wxStdOutputStreamBuffer:
[legend]

## Detailed Description

wxStdOutputStreamBuffer is a std::streambuf derived stream buffer which writes to a wxOutputStream.

Example:

wxFFileOutputStream file("cout.txt.gz");
wxZlibOutputStream gzipOutput(file, -1, wxZLIB_GZIP);
wxStdOutputStreamBuffer gzipStreamBuffer(gzipOutput);
// redirect std::cout to cout.txt.gz using GZIP compression
std::streambuf* streamBufferOld = std::cout.rdbuf(&gzipStreamBuffer);
// write to std::cout
std::cout << "Hello world!" << std::endl;
// restore std::cout
std::cout.rdbuf(streamBufferOld);

##

Library: wxBase
Category: Streams

See Also
  wxOutputStream, wxStdOutputStream

## Public Member Functions
| wxStdOutputStreamBuffer (wxOutputStream &stream)
| Creates a std::steambuf derived stream buffer which writes to a wxOutputStream.
virtual | ~wxStdOutputStreamBuffer ()
| Destructor.

## Constructor & Destructor Documentation

wxStdOutputStreamBuffer::wxStdOutputStreamBuffer | ( | wxOutputStream & | stream | ) |

Creates a std::steambuf derived stream buffer which writes to a wxOutputStream.

Parameters

  stream | Stream to write to.

virtual wxStdOutputStreamBuffer::~wxStdOutputStreamBuffer | ( |  | ) |
| inlinevirtual

Destructor.