X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c6cf894ae2dc66126724a9aee8ba5c62f4d9572a..9e9574fe45b176ee74bba8fad7574cf9906145d1:/interface/wx/archive.h?ds=sidebyside diff --git a/interface/wx/archive.h b/interface/wx/archive.h index ccec5851c5..0b650ae43d 100644 --- a/interface/wx/archive.h +++ b/interface/wx/archive.h @@ -2,8 +2,7 @@ // Name: archive.h // Purpose: interface of wxArchive* classes // Author: wxWidgets team -// RCS-ID: $Id$ -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// /** @@ -162,7 +161,7 @@ public: These hold the meta-data (filename, timestamp, etc.), for entries in archive files such as zips and tars. - @section wxarchiveentry_nonseekable About non-seekable streams + @section archiveentry_nonseekable About non-seekable streams This information applies only when reading archives from non-seekable streams. When the stream is seekable GetNextEntry() returns a fully populated wxArchiveEntry. @@ -170,7 +169,7 @@ public: For generic programming, when the worst case must be assumed, you can rely on all the fields of wxArchiveEntry being fully populated when - wxArchiveInputStream::GetNextEntry() returns, with the the following exceptions: + wxArchiveInputStream::GetNextEntry() returns, with the following exceptions: @li GetSize(): guaranteed to be available after the entry has been read to Eof(), or CloseEntry() has been called; @@ -300,16 +299,6 @@ public: }; -/** - Type of stream enumeration; used by wxArchiveClassFactory methods. -*/ -enum wxStreamProtocolType -{ - wxSTREAM_PROTOCOL, //!< wxFileSystem protocol (should be only one) - wxSTREAM_MIMETYPE, //!< MIME types the stream handles - wxSTREAM_ENCODING, //!< Not used for archives - wxSTREAM_FILEEXT //!< File extensions the stream handles -}; /** @class wxArchiveClassFactory @@ -347,7 +336,7 @@ public: When using wxSTREAM_FILEEXT for the second parameter, the first parameter can be a complete filename rather than just an extension. */ - bool CanHandle(const wxChar* protocol, + bool CanHandle(const wxString& protocol, wxStreamProtocolType type = wxSTREAM_PROTOCOL) const; /** @@ -358,7 +347,7 @@ public: When using wxSTREAM_FILEEXT for the second parameter, the first parameter can be a complete filename rather than just an extension. */ - static const wxArchiveClassFactory* Find(const wxChar* protocol, + static const wxArchiveClassFactory* Find(const wxString& protocol, wxStreamProtocolType type = wxSTREAM_PROTOCOL); /** @@ -366,7 +355,7 @@ public: translating meta-data. The initial default, set by the constructor, is wxConvLocal. */ - wxMBConv GetConv() const; + wxMBConv& GetConv() const; /** Sets the wxMBConv object that the created streams will use when @@ -384,7 +373,7 @@ public: const wxArchiveClassFactory *factory = wxArchiveClassFactory::GetFirst(); while (factory) { - list << factory->GetProtocol() << _T("\n"); + list << factory->GetProtocol() << wxT("\n"); factory = factory->GetNext(); } @endcode @@ -392,7 +381,7 @@ public: GetFirst() and GetNext() return a pointer to a factory or @NULL if no more are available. They do not give away ownership of the factory. */ - static const wxArchiveClassFactory* GetFirst() const; + static const wxArchiveClassFactory* GetFirst(); const wxArchiveClassFactory* GetNext() const; //@} @@ -400,8 +389,8 @@ public: Calls the static GetInternalName() function for the archive entry type, for example wxZipEntry::GetInternalName. */ - wxString GetInternalName(const wxString& name, - wxPathFormat format = wxPATH_NATIVE) const; + virtual wxString GetInternalName(const wxString& name, + wxPathFormat format = wxPATH_NATIVE) const = 0; /** Returns the wxFileSystem protocol supported by this factory. @@ -421,10 +410,10 @@ public: const wxChar *const *p; for (p = factory->GetProtocols(wxSTREAM_FILEEXT); *p; p++) - list << *p << _T("\n"); - @encode + list << *p << wxT("\n"); + @endcode */ - const wxChar* const* GetProtocols(wxStreamProtocolType type = wxSTREAM_PROTOCOL) const; + virtual const wxChar** GetProtocols(wxStreamProtocolType type = wxSTREAM_PROTOCOL) const = 0; /** Create a new wxArchiveEntry object of the appropriate type. @@ -499,7 +488,7 @@ public: /** This method must be overridden in your derived class. */ - void OnEntryUpdated(class wxArchiveEntry& entry); + virtual void OnEntryUpdated(wxArchiveEntry& entry) = 0; }; @@ -513,7 +502,7 @@ public: supports member templates. @code - template class Arc, class T = typename Arc::entry_type* + template class wxArchiveIterator { // this constructor creates an 'end of sequence' object @@ -528,8 +517,8 @@ public: The first template parameter should be the type of archive input stream (e.g. wxArchiveInputStream) and the second can either be a pointer to an entry - (e.g. wxArchiveEntry*), or a string/pointer pair (e.g. std::pairwxString, - wxArchiveEntry*). + (e.g. wxArchiveEntry*), or a string/pointer pair + (e.g. std::pair). The @c wx/archive.h header defines the following typedefs: