]> git.saurik.com Git - wxWidgets.git/blame - include/wx/datstrm.h
Moved the declaration of wxEVT_NULL to event.cpp and made it extern in the header...
[wxWidgets.git] / include / wx / datstrm.h
CommitLineData
cf447356
GL
1/////////////////////////////////////////////////////////////////////////////
2// Name: datstrm.h
3// Purpose: Data stream classes
4// Author: Guilhem Lavaux
5// Modified by:
6// Created: 28/06/1998
7// RCS-ID: $Id$
8// Copyright: (c) Guilhem Lavaux
9// Licence: wxWindows license
10/////////////////////////////////////////////////////////////////////////////
11
34138703
JS
12#ifndef _WX_DATSTREAM_H_
13#define _WX_DATSTREAM_H_
cf447356
GL
14
15#ifdef __GNUG__
16#pragma interface "datstrm.h"
17#endif
18
ed58dbea 19#include "wx/stream.h"
cf447356 20
ce4169a4
RR
21#if wxUSE_STREAMS
22
4c075b70
RR
23class WXDLLEXPORT wxDataInputStream
24{
cf447356 25public:
4c075b70
RR
26 wxDataInputStream(wxInputStream& s);
27 ~wxDataInputStream();
cf447356 28
4c075b70
RR
29 wxUint32 Read32();
30 wxUint16 Read16();
31 wxUint8 Read8();
32 double ReadDouble();
33 wxString ReadString();
fae05df5 34
4c075b70
RR
35 wxDataInputStream& operator>>(wxString& s);
36 wxDataInputStream& operator>>(wxInt8& c);
37 wxDataInputStream& operator>>(wxInt16& i);
38 wxDataInputStream& operator>>(wxInt32& i);
39 wxDataInputStream& operator>>(wxUint8& c);
40 wxDataInputStream& operator>>(wxUint16& i);
41 wxDataInputStream& operator>>(wxUint32& i);
42 wxDataInputStream& operator>>(double& i);
43 wxDataInputStream& operator>>(float& f);
5a96d2f4 44
4c075b70
RR
45 void BigEndianOrdered(bool be_order) { m_be_order = be_order; }
46
47protected:
48 wxInputStream *m_input;
49 bool m_be_order;
3d4c6a21
GL
50};
51
4c075b70
RR
52class WXDLLEXPORT wxDataOutputStream
53{
54public:
55 wxDataOutputStream(wxOutputStream& s);
56 ~wxDataOutputStream();
cf447356 57
4c075b70
RR
58 void Write32(wxUint32 i);
59 void Write16(wxUint16 i);
60 void Write8(wxUint8 i);
61 void WriteDouble(double d);
62 void WriteString(const wxString& string);
fae05df5 63
4c075b70
RR
64 wxDataOutputStream& operator<<(const wxChar *string);
65 wxDataOutputStream& operator<<(wxString& string);
66 wxDataOutputStream& operator<<(wxInt8 c);
67 wxDataOutputStream& operator<<(wxInt16 i);
68 wxDataOutputStream& operator<<(wxInt32 i);
69 wxDataOutputStream& operator<<(wxUint8 c);
70 wxDataOutputStream& operator<<(wxUint16 i);
71 wxDataOutputStream& operator<<(wxUint32 i);
72 wxDataOutputStream& operator<<(double f);
73 wxDataOutputStream& operator<<(float f);
fae05df5 74
4c075b70
RR
75 void BigEndianOrdered(bool be_order) { m_be_order = be_order; }
76
77protected:
78 wxOutputStream *m_output;
79 bool m_be_order;
cf447356
GL
80};
81
ce4169a4
RR
82#endif
83 // wxUSE_STREAMS
84
cf447356 85#endif
34138703 86 // _WX_DATSTREAM_H_