1998-07-01 13:26:46 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: datstrm.h
|
|
|
|
// Purpose: Data stream classes
|
|
|
|
// Author: Guilhem Lavaux
|
|
|
|
// Modified by:
|
|
|
|
// Created: 28/06/1998
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Copyright: (c) Guilhem Lavaux
|
|
|
|
// Licence: wxWindows license
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef __DATSTREAMH__
|
|
|
|
#define __DATSTREAMH__
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface "datstrm.h"
|
|
|
|
#endif
|
|
|
|
|
1998-07-12 11:16:09 -04:00
|
|
|
#include <wx/stream.h>
|
1998-07-01 13:26:46 -04:00
|
|
|
|
1998-07-12 11:36:53 -04:00
|
|
|
class wxDataInputStream: public wxFilterInputStream {
|
|
|
|
DECLARE_CLASS(wxDataInputStream)
|
1998-07-01 13:26:46 -04:00
|
|
|
public:
|
1998-07-12 11:16:09 -04:00
|
|
|
wxDataInputStream(wxInputStream& s);
|
|
|
|
virtual ~wxDataInputStream();
|
1998-07-01 13:26:46 -04:00
|
|
|
|
|
|
|
unsigned long Read32();
|
|
|
|
unsigned short Read16();
|
|
|
|
unsigned char Read8();
|
|
|
|
double ReadDouble();
|
|
|
|
wxString ReadLine();
|
1998-07-03 13:44:34 -04:00
|
|
|
wxString ReadString();
|
1998-07-12 11:16:09 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
class wxDataOutputStream: public wxFilterOutputStream {
|
1998-07-12 11:36:53 -04:00
|
|
|
DECLARE_CLASS(wxDataOutputStream)
|
1998-07-12 11:16:09 -04:00
|
|
|
public:
|
|
|
|
wxDataOutputStream(wxOutputStream& s);
|
|
|
|
virtual ~wxDataOutputStream();
|
1998-07-01 13:26:46 -04:00
|
|
|
|
|
|
|
void Write32(unsigned long i);
|
|
|
|
void Write16(unsigned short i);
|
|
|
|
void Write8(unsigned char i);
|
|
|
|
void WriteDouble(double d);
|
|
|
|
void WriteLine(const wxString& line);
|
1998-07-03 13:44:34 -04:00
|
|
|
void WriteString(const wxString& string);
|
1998-07-01 13:26:46 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
1998-07-12 11:16:09 -04:00
|
|
|
// __DATSTREAMH__
|