| 1 | ///////////////////////////////////////////////////////////////////////////// |
| 2 | // Name: archive.cpp |
| 3 | // Purpose: Streams for archive formats |
| 4 | // Author: Mike Wetherell |
| 5 | // RCS-ID: $Id$ |
| 6 | // Copyright: (c) Mike Wetherell |
| 7 | // Licence: wxWindows licence |
| 8 | ///////////////////////////////////////////////////////////////////////////// |
| 9 | |
| 10 | #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) |
| 11 | #pragma implementation "archive.h" |
| 12 | #endif |
| 13 | |
| 14 | // For compilers that support precompilation, includes "wx.h". |
| 15 | #include "wx/wxprec.h" |
| 16 | |
| 17 | #ifdef __BORLANDC__ |
| 18 | #pragma hdrstop |
| 19 | #endif |
| 20 | |
| 21 | #ifndef WX_PRECOMP |
| 22 | #include "wx/defs.h" |
| 23 | #endif |
| 24 | |
| 25 | #if wxUSE_STREAMS && wxUSE_ARCHIVE_STREAMS |
| 26 | |
| 27 | #include "wx/archive.h" |
| 28 | |
| 29 | IMPLEMENT_ABSTRACT_CLASS(wxArchiveEntry, wxObject) |
| 30 | IMPLEMENT_ABSTRACT_CLASS(wxArchiveClassFactory, wxObject) |
| 31 | |
| 32 | #if wxUSE_ZIPSTREAM |
| 33 | //FORCE_LINK(zipstrm) |
| 34 | extern int _wx_link_dummy_func_zipstrm(); |
| 35 | static int _wx_link_dummy_var_zipstrm = |
| 36 | _wx_link_dummy_func_zipstrm (); |
| 37 | #endif |
| 38 | |
| 39 | |
| 40 | ///////////////////////////////////////////////////////////////////////////// |
| 41 | // wxArchiveInputStream |
| 42 | |
| 43 | wxArchiveInputStream::wxArchiveInputStream(wxInputStream& stream, |
| 44 | wxMBConv& conv) |
| 45 | : wxFilterInputStream(stream), |
| 46 | m_conv(conv) |
| 47 | { |
| 48 | } |
| 49 | |
| 50 | |
| 51 | ///////////////////////////////////////////////////////////////////////////// |
| 52 | // wxArchiveOutputStream |
| 53 | |
| 54 | wxArchiveOutputStream::wxArchiveOutputStream(wxOutputStream& stream, |
| 55 | wxMBConv& conv) |
| 56 | : wxFilterOutputStream(stream), |
| 57 | m_conv(conv) |
| 58 | { |
| 59 | } |
| 60 | |
| 61 | |
| 62 | ///////////////////////////////////////////////////////////////////////////// |
| 63 | // wxArchiveEntry |
| 64 | |
| 65 | void wxArchiveEntry::SetNotifier(wxArchiveNotifier& notifier) |
| 66 | { |
| 67 | UnsetNotifier(); |
| 68 | m_notifier = ¬ifier; |
| 69 | m_notifier->OnEntryUpdated(*this); |
| 70 | } |
| 71 | |
| 72 | wxArchiveEntry& wxArchiveEntry::operator=(const wxArchiveEntry& WXUNUSED(e)) |
| 73 | { |
| 74 | m_notifier = NULL; |
| 75 | return *this; |
| 76 | } |
| 77 | |
| 78 | #endif // wxUSE_STREAMS && wxUSE_ARCHIVE_STREAMS |