Version: 2.9.4
Public Member Functions
wxStdOutputStreamBuffer Class Reference

#include </home/zeitlin/src/wx/github/interface/wx/stdstream.h>


Detailed Description

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

例:

    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
参照:
wxOutputStream, wxStdOutputStream

Public Member Functions

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

List of all members.


Constructor & Destructor Documentation

wxStdOutputStreamBuffer::wxStdOutputStreamBuffer ( wxOutputStream stream)

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

Parameters:
streamStream to write to.
virtual wxStdOutputStreamBuffer::~wxStdOutputStreamBuffer ( ) [inline, virtual]

Destructor.

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines