]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/fileconf.h
Compilation fixes
[wxWidgets.git] / include / wx / fileconf.h
index 24b1a95902f262c5f4671ad1cbf5d9d756ba9e7a..e4eec24fa1d36a34464cd1c3277634e80a5bbe0f 100644 (file)
 #endif
 
 #include "wx/defs.h"
+
+#ifdef wxUSE_CONFIG
+
+#include "wx/confbase.h"
 #include "wx/textfile.h"
 #include "wx/string.h"
 
-// ----------------------------------------------------------------------------
-// compile options
-// ----------------------------------------------------------------------------
-
-// it won't compile without it anyhow
-#ifndef wxUSE_CONFIG
-  #error "Please define wxUSE_CONFIG or remove fileconf.cpp from your makefile"
-#endif // wxUSE_CONFIG
 
 // ----------------------------------------------------------------------------
 // wxFileConfig
@@ -193,6 +189,9 @@ public:
   class LineList
   {
   public:
+    void      SetNext(LineList *pNext)  { m_pNext = pNext; }
+    void      SetPrev(LineList *pPrev)  { m_pPrev = pPrev; }
+
     // ctor
     LineList(const wxString& str, LineList *pNext = (LineList *) NULL) : m_strLine(str)
       { SetNext(pNext); SetPrev((LineList *) NULL); }
@@ -200,8 +199,6 @@ public:
     //
     LineList *Next() const              { return m_pNext;  }
     LineList *Prev() const              { return m_pPrev;  }
-    void      SetNext(LineList *pNext)  { m_pNext = pNext; }
-    void      SetPrev(LineList *pPrev)  { m_pPrev = pPrev; }
 
     //
     void SetText(const wxString& str) { m_strLine = str;  }
@@ -316,9 +313,9 @@ public:
     wxFileConfig   *Config()  const { return m_pConfig; }
     bool            IsDirty() const { return m_bDirty;  }
 
-    bool  IsEmpty() const { return Entries().IsEmpty() && Groups().IsEmpty(); }
     const ArrayEntries& Entries() const { return m_aEntries;   }
     const ArrayGroups&  Groups()  const { return m_aSubgroups; }
+    bool  IsEmpty() const { return Entries().IsEmpty() && Groups().IsEmpty(); }
 
     // find entry/subgroup (NULL if not found)
     ConfigGroup *FindSubgroup(const char *szName) const;
@@ -350,5 +347,9 @@ public:
   };
 };
 
-#endif  //_FILECONF_H
+#endif
+   // wxUSE_CONFIG
+
+#endif
+  //_FILECONF_H