]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/textfile.h
Added project files for wxUniv under MSW
[wxWidgets.git] / include / wx / textfile.h
index 6cf2e680ac4f18fd63ef907c55ddacd42e36344c..b0d4dd9287bdf7e68e62d9b89ada67293e942cee 100644 (file)
 
 #include "wx/defs.h"
 
-#if !wxUSE_FILE
-    #undef wxUSE_TEXTFILE
-    #define wxUSE_TEXTFILE 0
-#endif // wxUSE_FILE
-
-#if wxUSE_TEXTFILE
-
-#include "wx/string.h"
-#include "wx/file.h"
-#include "wx/dynarray.h"
-
 // ----------------------------------------------------------------------------
-// wxTextFile
+// constants
 // ----------------------------------------------------------------------------
 
+// NB: this is always defined, even if !wxUSE_TEXTFILE
+
 // the line termination type
 enum wxTextFileType
 {
@@ -45,6 +36,16 @@ enum wxTextFileType
     wxTextFileType_Os2    //                         'CR' 'LF'
 };
 
+#if wxUSE_TEXTFILE
+
+#include "wx/string.h"
+#include "wx/file.h"
+#include "wx/dynarray.h"
+
+// ----------------------------------------------------------------------------
+// wxTextFile
+// ----------------------------------------------------------------------------
+
 WX_DEFINE_EXPORTED_ARRAY(wxTextFileType, ArrayFileType);
 
 class WXDLLEXPORT wxTextFile
@@ -184,6 +185,12 @@ private:
     // copy ctor/assignment operator not implemented
     wxTextFile(const wxTextFile&);
     wxTextFile& operator=(const wxTextFile&);
+
+    // suppress the gcc warning: 'class defines only private constructors and
+    // has no friends'
+#ifdef __GNUG__
+    friend class wxTextFileDummyFriend;
+#endif // gcc
 };
 
 #endif // wxUSE_TEXTFILE