1998-07-12 11:24:52 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: mstream.h
|
|
|
|
// Purpose: Memory stream classes
|
|
|
|
// Author: Guilhem Lavaux
|
|
|
|
// Modified by:
|
|
|
|
// Created: 11/07/98
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Copyright: (c) Guilhem Lavaux
|
|
|
|
// Licence: wxWindows licence
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
1998-08-14 20:23:28 -04:00
|
|
|
#ifndef _WX_WXMMSTREAM_H__
|
|
|
|
#define _WX_WXMMSTREAM_H__
|
1998-07-12 11:24:52 -04:00
|
|
|
|
1998-07-14 08:06:50 -04:00
|
|
|
#include <wx/stream.h>
|
1998-07-12 11:24:52 -04:00
|
|
|
|
1998-10-14 13:36:50 -04:00
|
|
|
class wxMemoryInputStream: public wxInputStream {
|
1999-04-04 09:02:19 -04:00
|
|
|
private:
|
|
|
|
size_t m_length;
|
|
|
|
|
1998-07-12 11:24:52 -04:00
|
|
|
public:
|
1998-07-14 08:06:50 -04:00
|
|
|
wxMemoryInputStream(const char *data, size_t length);
|
|
|
|
virtual ~wxMemoryInputStream();
|
1999-04-04 09:02:19 -04:00
|
|
|
virtual size_t StreamSize() const { return m_length; }
|
1998-07-14 08:06:50 -04:00
|
|
|
|
1998-07-28 13:11:08 -04:00
|
|
|
char Peek();
|
1998-07-12 11:24:52 -04:00
|
|
|
};
|
|
|
|
|
1998-10-14 13:36:50 -04:00
|
|
|
class wxMemoryOutputStream: public wxOutputStream {
|
1998-07-12 11:24:52 -04:00
|
|
|
public:
|
1998-07-14 08:06:50 -04:00
|
|
|
wxMemoryOutputStream(char *data = NULL, size_t length = 0);
|
|
|
|
virtual ~wxMemoryOutputStream();
|
1998-07-12 11:24:52 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|