X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/eedf3bcbb39a0881f065e124ab3aadbf725dcbca..516fdb4f52d6fe326f3dfc040f58fb482c3d4b9c:/include/wx/archive.h diff --git a/include/wx/archive.h b/include/wx/archive.h index 574f8bf659..cd8438972d 100644 --- a/include/wx/archive.h +++ b/include/wx/archive.h @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: archive.h +// Name: wx/archive.h // Purpose: Streams for archive formats // Author: Mike Wetherell // RCS-ID: $Id$ @@ -10,10 +10,6 @@ #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_STREAMS && wxUSE_ARCHIVE_STREAMS @@ -59,7 +55,7 @@ public: virtual void SetIsReadOnly(bool isReadOnly = true) = 0; virtual void SetName(const wxString& name, wxPathFormat format = wxPATH_NATIVE) = 0; - + wxArchiveEntry *Clone() const { return DoClone(); } void SetNotifier(wxArchiveNotifier& notifier); @@ -98,16 +94,17 @@ public: typedef wxArchiveEntry entry_type; virtual ~wxArchiveInputStream() { } - + virtual bool OpenEntry(wxArchiveEntry& entry) = 0; virtual bool CloseEntry() = 0; wxArchiveEntry *GetNextEntry() { return DoGetNextEntry(); } virtual char Peek() { return wxInputStream::Peek(); } - + protected: wxArchiveInputStream(wxInputStream& stream, wxMBConv& conv); + wxArchiveInputStream(wxInputStream *stream, wxMBConv& conv); virtual wxArchiveEntry *DoGetNextEntry() = 0; @@ -126,7 +123,7 @@ private: // // Only one entry can be open for output at a time; another call to // PutNextEntry closes the current entry and begins the next. -// +// // The overload 'bool PutNextEntry(wxArchiveEntry *entry)' takes ownership // of the entry object. @@ -153,6 +150,7 @@ public: protected: wxArchiveOutputStream(wxOutputStream& stream, wxMBConv& conv); + wxArchiveOutputStream(wxOutputStream *stream, wxMBConv& conv); wxMBConv& GetConv() const { return m_conv; } @@ -209,7 +207,7 @@ public: if (m_rep) m_rep->AddRef(); } - + ~wxArchiveIterator() { if (m_rep) m_rep->UnRef(); @@ -227,7 +225,7 @@ public: if (it.m_rep) it.m_rep.AddRef(); if (m_rep) - m_rep.UnRef(); + this->m_rep.UnRef(); m_rep = it.m_rep; return *this; } @@ -257,13 +255,13 @@ private: typename Arc::entry_type* m_entry; T m_value; int m_ref; - + public: Rep(Arc& arc, typename Arc::entry_type* entry) : m_arc(arc), m_entry(entry), m_value(), m_ref(1) { } ~Rep() { delete m_entry; } - + void AddRef() { m_ref++; } @@ -280,7 +278,7 @@ private: return NULL; } if (m_ref > 1) { - m_ref--; + m_ref--; return new Rep(m_arc, entry); } delete m_entry; @@ -312,7 +310,9 @@ typedef wxArchiveIterator