wxWidgets: wxStdInputStreamBuffer Class Reference

| Version: 3.1.5

Loading...
Searching...
No Matches
Public Member Functions | List of all members
wxStdInputStreamBuffer Class Reference
Class List by Category » Streams

`#include </cygdrive/c/Users/Hamis/Cygwin-packaging/wxWidgets3.1/wxWidgets3.1-3.1.5-4.x86_64/src/wxWidgets-3.1.5/interface/wx/stdstream.h>`

Inheritance diagram for wxStdInputStreamBuffer:
[legend]

## Detailed Description

wxStdInputStreamBuffer is a std::streambuf derived stream buffer which reads from a wxInputStream.

Example:

wxFFileInputStream file("input.txt.gz");
wxZlibInputStream gzipInput(file, wxZLIB_GZIP);
wxStdInputStreamBuffer gzipStreamBuffer(gzipInput);
// redirect std::cin to read from compressed file
std::streambuf* streamBufferOld = std::cin.rdbuf(&gzipStreamBuffer);
// prompt for integer
int number;
std::cout << "Enter an integer: " << std::flush;
std::cin >> number;
std::cout << std::endl;
std::cout << "You entered the integer " << number << "." << std::endl;
// restore std::cin
std::cin.rdbuf(streamBufferOld);
wxFFileInputStream
This class represents data read in from a file.
Definition wfstream.h:284
wxStdInputStreamBuffer::wxStdInputStreamBuffer
wxStdInputStreamBuffer(wxInputStream &stream)
Creates a std::steambuf derived stream buffer which reads from a wxInputStream.
wxZlibInputStream
This filter stream decompresses a stream that is in zlib or gzip format.
Definition zstream.h:111
wxZLIB_GZIP
@ wxZLIB_GZIP
gzip header and checksum, requires zlib 1.2.1+
Definition zstream.h:21

##

Library: wxBase

<>< =''>:</>&;&;< =''>\ </></>

See also
  wxInputStream, wxStdInputStream

## Public Member Functions
| wxStdInputStreamBuffer (wxInputStream &stream)
| Creates a std::steambuf derived stream buffer which reads from a wxInputStream.
virtual | ~wxStdInputStreamBuffer ()
| Destructor.

## Constructor & Destructor Documentation

## ◆ wxStdInputStreamBuffer()

wxStdInputStreamBuffer::wxStdInputStreamBuffer | ( | wxInputStream & | stream | ) |

Creates a std::steambuf derived stream buffer which reads from a wxInputStream.

Parameters

  stream | Stream to read from.

## ◆ ~wxStdInputStreamBuffer()

virtual wxStdInputStreamBuffer::~wxStdInputStreamBuffer | ( |  | ) |
| virtual

Destructor.