Version: 2.9.4
Public Member Functions
wxStdInputStream Class Reference

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


Detailed Description

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

例:

    wxFFileInputStream file("words.txt");
    wxStdInputStream in(file);
    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
参照:
wxInputStream, wxStdInputStreamBuffer

Public Member Functions

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

List of all members.


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 ( ) [inline, virtual]

Destructor.

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines