X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ae3c17b4013e80b99976c750c19fca47729517f6..b8737371e220ef1920e6a3d2aed88c4bc2b04daf:/interface/wx/archive.h diff --git a/interface/wx/archive.h b/interface/wx/archive.h index cb2069dc60..12f6fcf494 100644 --- a/interface/wx/archive.h +++ b/interface/wx/archive.h @@ -3,12 +3,11 @@ // Purpose: interface of wxArchive* classes // Author: wxWidgets team // RCS-ID: $Id$ -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// /** @class wxArchiveInputStream - @wxheader{archive.h} This is an abstract base class which serves as a common interface to archive input streams such as wxZipInputStream. @@ -23,7 +22,7 @@ When there are no more entries, GetNextEntry() returns @NULL and sets Eof(). @library{wxbase} - @category{archive} + @category{archive,streams} @see @ref overview_archive, wxArchiveEntry, wxArchiveOutputStream */ @@ -57,7 +56,6 @@ public: /** @class wxArchiveOutputStream - @wxheader{archive.h} This is an abstract base class which serves as a common interface to archive output streams such as wxZipOutputStream. @@ -67,7 +65,7 @@ public: Another call to PutNextEntry() closes the current entry and begins the next. @library{wxbase} - @category{archive} + @category{archive,streams} @see @ref overview_archive, wxArchiveEntry, wxArchiveInputStream */ @@ -158,14 +156,13 @@ public: /** @class wxArchiveEntry - @wxheader{archive.h} This is an abstract base class which serves as a common interface to archive entry classes such as wxZipEntry. 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. @@ -181,7 +178,7 @@ public: been reached, i.e. after GetNextEntry() returns NULL and Eof() is true. @library{wxbase} - @category{archive} + @category{archive,streams} @see @ref overview_archive, @ref overview_archive_generic, wxArchiveInputStream, wxArchiveOutputStream, wxArchiveNotifier @@ -316,7 +313,6 @@ enum wxStreamProtocolType /** @class wxArchiveClassFactory - @wxheader{archive.h} Allows the creation of streams to handle archive formats such as zip and tar. @@ -336,7 +332,7 @@ enum wxStreamProtocolType wxArchiveClassFactory::GetFirst() and wxArchiveClassFactory::GetNext(). @library{wxbase} - @category{archive} + @category{archive,streams} @see @ref overview_archive, @ref overview_archive_generic, wxArchiveEntry, wxArchiveInputStream, wxArchiveOutputStream, wxFilterClassFactory @@ -351,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. */ - bool CanHandle(const wxChar* protocol, + bool CanHandle(const wxString& protocol, wxStreamProtocolType type = wxSTREAM_PROTOCOL) const; /** @@ -362,7 +358,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); /** @@ -370,7 +366,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 @@ -388,7 +384,7 @@ public: const wxArchiveClassFactory *factory = wxArchiveClassFactory::GetFirst(); while (factory) { - list << factory->GetProtocol() << _T("\n"); + list << factory->GetProtocol() << wxT("\n"); factory = factory->GetNext(); } @endcode @@ -396,7 +392,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; //@} @@ -404,8 +400,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. @@ -425,10 +421,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. @@ -476,7 +472,6 @@ public: /** @class wxArchiveNotifier - @wxheader{archive.h} If you need to know when a wxArchiveInputStream updates a wxArchiveEntry object, you can create a notifier by deriving from this abstract base class, @@ -493,7 +488,7 @@ public: See @ref overview_archive_noseek. @library{wxbase} - @category{archive} + @category{archive,streams} @see @ref overview_archive_noseek, wxArchiveEntry, wxArchiveInputStream, wxArchiveOutputStream @@ -504,14 +499,13 @@ public: /** This method must be overridden in your derived class. */ - void OnEntryUpdated(class wxArchiveEntry& entry); + virtual void OnEntryUpdated(wxArchiveEntry& entry) = 0; }; /** @class wxArchiveIterator - @wxheader{archive.h} An input iterator template class that can be used to transfer an archive's catalogue to a container. It is only available if wxUSE_STL is set to 1 @@ -519,7 +513,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 @@ -534,8 +528,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: @@ -603,7 +597,7 @@ public: @endcode @library{wxbase} - @category{archive} + @category{archive,streams} @see wxArchiveEntry, wxArchiveInputStream, wxArchiveOutputStream */