X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ceefc965f987990f561915bba9eda19c6571918e..682214d5c6ec3e56dbdfd0c97d70d87e614b38c2:/include/wx/zipstrm.h diff --git a/include/wx/zipstrm.h b/include/wx/zipstrm.h index 1ecc46718d..976a17050b 100644 --- a/include/wx/zipstrm.h +++ b/include/wx/zipstrm.h @@ -419,12 +419,31 @@ private: }; +///////////////////////////////////////////////////////////////////////////// +// Iterators + +#if wxUSE_STL || defined WX_TEST_ARCHIVE_ITERATOR +typedef wxArchiveIterator wxZipIter; +typedef wxArchiveIterator > wxZipPairIter; +#endif + + ///////////////////////////////////////////////////////////////////////////// // wxZipClassFactory class WXDLLIMPEXP_BASE wxZipClassFactory : public wxArchiveClassFactory { public: + typedef wxZipEntry entry_type; + typedef wxZipInputStream instream_type; + typedef wxZipOutputStream outstream_type; + typedef wxZipNotifier notifier_type; +#if wxUSE_STL || defined WX_TEST_ARCHIVE_ITERATOR + typedef wxZipIter iter_type; + typedef wxZipPairIter pairiter_type; +#endif + wxZipEntry *NewEntry() const { return new wxZipEntry; } wxZipInputStream *NewStream(wxInputStream& stream) const @@ -449,35 +468,25 @@ private: }; -///////////////////////////////////////////////////////////////////////////// -// Iterators - -#if wxUSE_STL || defined WX_TEST_ARCHIVE_ITERATOR -typedef wxArchiveIterator wxZipIter; -typedef wxArchiveIterator > wxZipPairIter; -#endif - - ///////////////////////////////////////////////////////////////////////////// // wxZipEntry inlines -bool wxZipEntry::IsText() const +inline bool wxZipEntry::IsText() const { return (m_InternalAttributes & TEXT_ATTR) != 0; } -bool wxZipEntry::IsDir() const +inline bool wxZipEntry::IsDir() const { return (m_ExternalAttributes & wxZIP_A_SUBDIR) != 0; } -bool wxZipEntry::IsReadOnly() const +inline bool wxZipEntry::IsReadOnly() const { return (m_ExternalAttributes & wxZIP_A_RDONLY) != 0; } -bool wxZipEntry::IsMadeByUnix() const +inline bool wxZipEntry::IsMadeByUnix() const { const int pattern = (1 << wxZIP_SYSTEM_OPENVMS) | @@ -492,7 +501,7 @@ bool wxZipEntry::IsMadeByUnix() const || ((pattern >> m_SystemMadeBy) & 1); } -void wxZipEntry::SetIsText(bool isText) +inline void wxZipEntry::SetIsText(bool isText) { if (isText) m_InternalAttributes |= TEXT_ATTR; @@ -500,7 +509,7 @@ void wxZipEntry::SetIsText(bool isText) m_InternalAttributes &= ~TEXT_ATTR; } -void wxZipEntry::SetIsReadOnly(bool isReadOnly) +inline void wxZipEntry::SetIsReadOnly(bool isReadOnly) { if (isReadOnly) SetMode(GetMode() & ~0222); @@ -508,8 +517,8 @@ void wxZipEntry::SetIsReadOnly(bool isReadOnly) SetMode(GetMode() | 0200); } -void wxZipEntry::SetName(const wxString& name, - wxPathFormat format /*=wxPATH_NATIVE*/) +inline void wxZipEntry::SetName(const wxString& name, + wxPathFormat format /*=wxPATH_NATIVE*/) { bool isDir; m_Name = GetInternalName(name, format, &isDir);