]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/archive.h
cleanup - added whitespace around operators, some blank lines, fixed comment typos...
[wxWidgets.git] / include / wx / archive.h
index e6003c66cb784445ebecb9c4737350ac4353e773..31f6b921b1b4808939587f8f9a48c027b14b8ca0 100644 (file)
 #ifndef _WX_ARCHIVE_H__
 #define _WX_ARCHIVE_H__
 
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-#pragma interface "archive.h"
-#endif
-
 #include "wx/defs.h"
 
-#if wxUSE_ZLIB && wxUSE_STREAMS && wxUSE_ZIPSTREAM
+#if wxUSE_STREAMS && wxUSE_ARCHIVE_STREAMS
 
 #include "wx/stream.h"
 #include "wx/filename.h"
@@ -161,47 +157,6 @@ private:
 };
 
 
-/////////////////////////////////////////////////////////////////////////////
-// wxArchiveClassFactory
-//
-// A wxArchiveClassFactory instance for a particular archive type allows
-// the creation of the other classes that may be needed.
-
-class WXDLLIMPEXP_BASE wxArchiveClassFactory : public wxObject
-{
-public:
-    virtual ~wxArchiveClassFactory() { }
-
-    wxArchiveEntry *NewEntry() const
-        { return DoNewEntry(); }
-    wxArchiveInputStream *NewStream(wxInputStream& stream) const
-        { return DoNewStream(stream); }
-    wxArchiveOutputStream *NewStream(wxOutputStream& stream) const
-        { return DoNewStream(stream); }
-
-    virtual wxString GetInternalName(
-        const wxString& name,
-        wxPathFormat format = wxPATH_NATIVE) const = 0;
-
-    void SetConv(wxMBConv& conv) { m_pConv = &conv; }
-    wxMBConv& GetConv() const { return *m_pConv; }
-
-protected:
-    virtual wxArchiveEntry        *DoNewEntry() const = 0;
-    virtual wxArchiveInputStream  *DoNewStream(wxInputStream& stream) const = 0;
-    virtual wxArchiveOutputStream *DoNewStream(wxOutputStream& stream) const = 0;
-
-    wxArchiveClassFactory() : m_pConv(&wxConvLocal) { }
-    wxArchiveClassFactory& operator=(const wxArchiveClassFactory& WXUNUSED(f))
-        { return *this; }
-
-private:
-    wxMBConv *m_pConv;
-
-    DECLARE_ABSTRACT_CLASS(wxArchiveClassFactory)
-};
-
-
 /////////////////////////////////////////////////////////////////////////////
 // wxArchiveIterator
 //
@@ -346,6 +301,58 @@ typedef wxArchiveIterator<wxArchiveInputStream,
 
 #endif // wxUSE_STL || defined WX_TEST_ARCHIVE_ITERATOR
 
-#endif // wxUSE_STREAMS
+
+/////////////////////////////////////////////////////////////////////////////
+// wxArchiveClassFactory
+//
+// A wxArchiveClassFactory instance for a particular archive type allows
+// the creation of the other classes that may be needed.
+
+class WXDLLIMPEXP_BASE wxArchiveClassFactory : public wxObject
+{
+public:
+    typedef wxArchiveEntry        entry_type;
+    typedef wxArchiveInputStream  instream_type;
+    typedef wxArchiveOutputStream outstream_type;
+    typedef wxArchiveNotifier     notifier_type;
+#if wxUSE_STL || defined WX_TEST_ARCHIVE_ITERATOR
+    typedef wxArchiveIter         iter_type;
+    typedef wxArchivePairIter     pairiter_type;
+#endif
+
+    virtual ~wxArchiveClassFactory() { }
+
+    wxArchiveEntry *NewEntry() const
+        { return DoNewEntry(); }
+    wxArchiveInputStream *NewStream(wxInputStream& stream) const
+        { return DoNewStream(stream); }
+    wxArchiveOutputStream *NewStream(wxOutputStream& stream) const
+        { return DoNewStream(stream); }
+
+    virtual wxString GetInternalName(
+        const wxString& name,
+        wxPathFormat format = wxPATH_NATIVE) const = 0;
+
+    void SetConv(wxMBConv& conv) { m_pConv = &conv; }
+    wxMBConv& GetConv() const { return *m_pConv; }
+
+protected:
+    // old compilers don't support covarient returns, so 'Do' methods are
+    // used to simulate them
+    virtual wxArchiveEntry        *DoNewEntry() const = 0;
+    virtual wxArchiveInputStream  *DoNewStream(wxInputStream& stream) const = 0;
+    virtual wxArchiveOutputStream *DoNewStream(wxOutputStream& stream) const = 0;
+
+    wxArchiveClassFactory() : m_pConv(&wxConvLocal) { }
+    wxArchiveClassFactory& operator=(const wxArchiveClassFactory& WXUNUSED(f))
+        { return *this; }
+
+private:
+    wxMBConv *m_pConv;
+
+    DECLARE_ABSTRACT_CLASS(wxArchiveClassFactory)
+};
+
+#endif // wxUSE_STREAMS && wxUSE_ARCHIVE_STREAMS
 
 #endif // _WX_ARCHIVE_H__