1 ///////////////////////////////////////////////////////////////////////////////
3 // Purpose: class wxTextFile to work with text files of _small_ size
4 // (file is fully loaded in memory) and which understands CR/LF
5 // differences between platforms.
6 // Author: Vadim Zeitlin
9 // Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
10 // Licence: wxWindows licence
11 ///////////////////////////////////////////////////////////////////////////////
13 #ifndef _WX_TEXTFILE_H
14 #define _WX_TEXTFILE_H
18 #include "wx/textbuf.h"
24 // ----------------------------------------------------------------------------
26 // ----------------------------------------------------------------------------
28 class WXDLLIMPEXP_BASE wxTextFile
: public wxTextBuffer
33 wxTextFile(const wxString
& strFileName
);
36 // implement the base class pure virtuals
37 virtual bool OnExists() const;
38 virtual bool OnOpen(const wxString
&strBufferName
,
39 wxTextBufferOpenMode OpenMode
);
40 virtual bool OnClose();
41 virtual bool OnRead(const wxMBConv
& conv
);
42 virtual bool OnWrite(wxTextFileType typeNew
, const wxMBConv
& conv
);
48 wxDECLARE_NO_COPY_CLASS(wxTextFile
);
51 #else // !wxUSE_TEXTFILE
53 // old code relies on the static methods of wxTextFile being always available
54 // and they still are available in wxTextBuffer (even if !wxUSE_TEXTBUFFER), so
55 // make it possible to use them in a backwards compatible way
56 typedef wxTextBuffer wxTextFile
;
58 #endif // wxUSE_TEXTFILE/!wxUSE_TEXTFILE
60 #endif // _WX_TEXTFILE_H