]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/txtstrm.h
wxGTK compilation fixes
[wxWidgets.git] / include / wx / txtstrm.h
... / ...
CommitLineData
1/////////////////////////////////////////////////////////////////////////////
2// Name: txtstrm.h
3// Purpose: Text 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
12#ifndef _WX_TXTSTREAM_H_
13#define _WX_TXTSTREAM_H_
14
15#ifdef __GNUG__
16#pragma interface "txtstrm.h"
17#endif
18
19#include <wx/stream.h>
20
21#if wxUSE_STREAMS
22
23class WXDLLEXPORT wxTextInputStream {
24public:
25 wxTextInputStream(wxInputStream& s);
26 ~wxTextInputStream();
27
28 wxUint32 Read32();
29 wxUint16 Read16();
30 wxUint8 Read8();
31 double ReadDouble();
32 wxString ReadString();
33
34 // Operators
35 wxTextInputStream& operator>>(wxString& line);
36 wxTextInputStream& operator>>(wxChar& c);
37 wxTextInputStream& operator>>(wxInt16& i);
38 wxTextInputStream& operator>>(wxInt32& i);
39 wxTextInputStream& operator>>(wxUint16& i);
40 wxTextInputStream& operator>>(wxUint32& i);
41 wxTextInputStream& operator>>(double& i);
42 wxTextInputStream& operator>>(float& f);
43
44 protected:
45 wxInputStream *m_input;
46
47 wxChar NextNonWhiteSpace();
48 void SkipIfEndOfLine( wxChar c );
49};
50
51class WXDLLEXPORT wxTextOutputStream {
52 public:
53 wxTextOutputStream(wxOutputStream& s);
54 ~wxTextOutputStream();
55
56 void Write32(wxUint32 i);
57 void Write16(wxUint16 i);
58 void Write8(wxUint8 i);
59 void WriteDouble(double d);
60 void WriteString(const wxString& string);
61
62 wxTextOutputStream& operator<<(const wxChar *string);
63 wxTextOutputStream& operator<<(const wxString& string);
64 wxTextOutputStream& operator<<(wxChar c);
65 wxTextOutputStream& operator<<(wxInt16 c);
66 wxTextOutputStream& operator<<(wxInt32 c);
67 wxTextOutputStream& operator<<(wxUint16 c);
68 wxTextOutputStream& operator<<(wxUint32 c);
69 wxTextOutputStream& operator<<(double f);
70 wxTextOutputStream& operator<<(float f);
71
72 protected:
73 wxOutputStream *m_output;
74};
75
76#endif
77 // wxUSE_STREAMS
78
79#endif
80 // _WX_DATSTREAM_H_