]> git.saurik.com Git - wxWidgets.git/blob - src/common/archive.cpp
debb3b0bbeeadc0196b7524981afcb339b995cec
[wxWidgets.git] / src / common / archive.cpp
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_ARCSTREAM
26
27 #include "wx/archive.h"
28 #include "wx/html/forcelnk.h"
29
30 IMPLEMENT_ABSTRACT_CLASS(wxArchiveEntry, wxObject)
31 IMPLEMENT_ABSTRACT_CLASS(wxArchiveClassFactory, wxObject)
32
33 #if wxUSE_ZIPSTREAM
34 FORCE_LINK(zipstrm)
35 #endif
36
37
38 /////////////////////////////////////////////////////////////////////////////
39 // wxArchiveInputStream
40
41 wxArchiveInputStream::wxArchiveInputStream(wxInputStream& stream,
42 wxMBConv& conv)
43 : wxFilterInputStream(stream),
44 m_conv(conv)
45 {
46 }
47
48
49 /////////////////////////////////////////////////////////////////////////////
50 // wxArchiveOutputStream
51
52 wxArchiveOutputStream::wxArchiveOutputStream(wxOutputStream& stream,
53 wxMBConv& conv)
54 : wxFilterOutputStream(stream),
55 m_conv(conv)
56 {
57 }
58
59
60 /////////////////////////////////////////////////////////////////////////////
61 // wxArchiveEntry
62
63 void wxArchiveEntry::SetNotifier(wxArchiveNotifier& notifier)
64 {
65 UnsetNotifier();
66 m_notifier = &notifier;
67 m_notifier->OnEntryUpdated(*this);
68 }
69
70 wxArchiveEntry& wxArchiveEntry::operator=(const wxArchiveEntry& WXUNUSED(e))
71 {
72 m_notifier = NULL;
73 return *this;
74 }
75
76 #endif // wxUSE_STREAMS && wxUSE_ARCSTREAM