Version: 3.1.0
wxStdInputStream Class Reference

#include <wx/stdstream.h>

+ Inheritance diagram for wxStdInputStream:

Detailed Description

wxStdInputStream is a std::istream derived stream which reads from a wxInputStream.

Example:

wxFFileInputStream file("words.txt");
std::vector<std::string> words;
// read words from words.txt
std::copy(std::istream_iterator<std::string>(in),
std::istream_iterator<std::string>(),
std::back_inserter(words));
// sort and remove duplicates
std::sort(words.begin(), words.end());
words.resize(std::unique(words.begin(), words.end()) - words.begin());
// print words
std::copy(words.begin(), words.end(),
std::ostream_iterator<std::string>(std::cout, "\n"));

Library:  wxBase
Category:  Streams
See also
wxInputStream, wxStdInputStreamBuffer

Public Member Functions

 wxStdInputStream (wxInputStream &stream)
 Creates a std::istream derived stream which reads from a wxInputStream. More...
 
virtual ~wxStdInputStream ()
 Destructor. More...
 

Constructor & Destructor Documentation

wxStdInputStream::wxStdInputStream ( wxInputStream stream)

Creates a std::istream derived stream which reads from a wxInputStream.

Parameters
streamStream to read from.
virtual wxStdInputStream::~wxStdInputStream ( )
inlinevirtual

Destructor.