mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 09:09:52 -06:00
Import r67258 of the wxWidgets trunk, which I expect will before
long become wxWidgets 2.9.2, which in turn is expected to be the last 2.9 release before the 3.0 stable release. Since the full wxWidgets distribution is rather large, I have imported only the parts that we use, on a subdirectory basis: art include/wx/*.* include/wx/aui include/wx/cocoa include/wx/generic include/wx/gtk include/wx/meta include/wx/msw include/wx/osx include/wx/persist include/wx/private include/wx/protocol include/wx/unix src/aui src/common src/generic src/gtk src/msw src/osx src/unix git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7380 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
111
Externals/wxWidgets3/include/wx/stdstream.h
vendored
Normal file
111
Externals/wxWidgets3/include/wx/stdstream.h
vendored
Normal file
@ -0,0 +1,111 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/stdstream.h
|
||||
// Purpose: Header of std::istream and std::ostream derived wrappers for
|
||||
// wxInputStream and wxOutputStream
|
||||
// Author: Jonathan Liu <net147@gmail.com>
|
||||
// Created: 2009-05-02
|
||||
// RCS-ID: $Id: stdstream.h 64924 2010-07-12 22:50:51Z VZ $
|
||||
// Copyright: (c) 2009 Jonathan Liu
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_STDSTREAM_H_
|
||||
#define _WX_STDSTREAM_H_
|
||||
|
||||
#include "wx/defs.h" // wxUSE_STD_IOSTREAM
|
||||
|
||||
#if wxUSE_STREAMS && wxUSE_STD_IOSTREAM
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/stream.h"
|
||||
#include "wx/ioswrap.h"
|
||||
|
||||
// ==========================================================================
|
||||
// wxStdInputStreamBuffer
|
||||
// ==========================================================================
|
||||
|
||||
class WXDLLIMPEXP_BASE wxStdInputStreamBuffer : public std::streambuf
|
||||
{
|
||||
public:
|
||||
wxStdInputStreamBuffer(wxInputStream& stream);
|
||||
virtual ~wxStdInputStreamBuffer() { }
|
||||
|
||||
protected:
|
||||
virtual std::streambuf *setbuf(char *s, std::streamsize n);
|
||||
virtual std::streampos seekoff(std::streamoff off,
|
||||
std::ios_base::seekdir way,
|
||||
std::ios_base::openmode which =
|
||||
std::ios_base::in |
|
||||
std::ios_base::out);
|
||||
virtual std::streampos seekpos(std::streampos sp,
|
||||
std::ios_base::openmode which =
|
||||
std::ios_base::in |
|
||||
std::ios_base::out);
|
||||
virtual std::streamsize showmanyc();
|
||||
virtual std::streamsize xsgetn(char *s, std::streamsize n);
|
||||
virtual int underflow();
|
||||
virtual int uflow();
|
||||
virtual int pbackfail(int c = EOF);
|
||||
|
||||
wxInputStream& m_stream;
|
||||
int m_lastChar;
|
||||
};
|
||||
|
||||
// ==========================================================================
|
||||
// wxStdInputStream
|
||||
// ==========================================================================
|
||||
|
||||
class WXDLLIMPEXP_BASE wxStdInputStream : public std::istream
|
||||
{
|
||||
public:
|
||||
wxStdInputStream(wxInputStream& stream);
|
||||
virtual ~wxStdInputStream() { }
|
||||
|
||||
protected:
|
||||
wxStdInputStreamBuffer m_streamBuffer;
|
||||
};
|
||||
|
||||
// ==========================================================================
|
||||
// wxStdOutputStreamBuffer
|
||||
// ==========================================================================
|
||||
|
||||
class WXDLLIMPEXP_BASE wxStdOutputStreamBuffer : public std::streambuf
|
||||
{
|
||||
public:
|
||||
wxStdOutputStreamBuffer(wxOutputStream& stream);
|
||||
virtual ~wxStdOutputStreamBuffer() { }
|
||||
|
||||
protected:
|
||||
virtual std::streambuf *setbuf(char *s, std::streamsize n);
|
||||
virtual std::streampos seekoff(std::streamoff off,
|
||||
std::ios_base::seekdir way,
|
||||
std::ios_base::openmode which =
|
||||
std::ios_base::in |
|
||||
std::ios_base::out);
|
||||
virtual std::streampos seekpos(std::streampos sp,
|
||||
std::ios_base::openmode which =
|
||||
std::ios_base::in |
|
||||
std::ios_base::out);
|
||||
virtual std::streamsize xsputn(const char *s, std::streamsize n);
|
||||
virtual int overflow(int c);
|
||||
|
||||
wxOutputStream& m_stream;
|
||||
};
|
||||
|
||||
// ==========================================================================
|
||||
// wxStdOutputStream
|
||||
// ==========================================================================
|
||||
|
||||
class WXDLLIMPEXP_BASE wxStdOutputStream : public std::ostream
|
||||
{
|
||||
public:
|
||||
wxStdOutputStream(wxOutputStream& stream);
|
||||
virtual ~wxStdOutputStream() { }
|
||||
|
||||
protected:
|
||||
wxStdOutputStreamBuffer m_streamBuffer;
|
||||
};
|
||||
|
||||
#endif // wxUSE_STREAMS && wxUSE_STD_IOSTREAM
|
||||
|
||||
#endif // _WX_STDSTREAM_H_
|
Reference in New Issue
Block a user