]> git.saurik.com Git - wxWidgets.git/blob - src/common/archive.cpp
Commited FRM's stockitem patch (empty stock items).
[wxWidgets.git] / src / common / archive.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/common/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 // For compilers that support precompilation, includes "wx.h".
11 #include "wx/wxprec.h"
12
13 #ifdef __BORLANDC__
14 #pragma hdrstop
15 #endif
16
17 #if wxUSE_STREAMS && wxUSE_ARCHIVE_STREAMS
18
19 #ifndef WX_PRECOMP
20 #endif
21
22 #include "wx/archive.h"
23 #include "wx/link.h"
24
25 IMPLEMENT_ABSTRACT_CLASS(wxArchiveEntry, wxObject)
26 IMPLEMENT_ABSTRACT_CLASS(wxArchiveClassFactory, wxObject)
27
28 #if wxUSE_ZIPSTREAM
29 wxFORCE_LINK_MODULE(zipstrm)
30 #endif
31
32
33 /////////////////////////////////////////////////////////////////////////////
34 // wxArchiveInputStream
35
36 wxArchiveInputStream::wxArchiveInputStream(wxInputStream& stream,
37 wxMBConv& conv)
38 : wxFilterInputStream(stream),
39 m_conv(conv)
40 {
41 }
42
43
44 /////////////////////////////////////////////////////////////////////////////
45 // wxArchiveOutputStream
46
47 wxArchiveOutputStream::wxArchiveOutputStream(wxOutputStream& stream,
48 wxMBConv& conv)
49 : wxFilterOutputStream(stream),
50 m_conv(conv)
51 {
52 }
53
54
55 /////////////////////////////////////////////////////////////////////////////
56 // wxArchiveEntry
57
58 void wxArchiveEntry::SetNotifier(wxArchiveNotifier& notifier)
59 {
60 UnsetNotifier();
61 m_notifier = &notifier;
62 m_notifier->OnEntryUpdated(*this);
63 }
64
65 wxArchiveEntry& wxArchiveEntry::operator=(const wxArchiveEntry& WXUNUSED(e))
66 {
67 m_notifier = NULL;
68 return *this;
69 }
70
71 #endif // wxUSE_STREAMS && wxUSE_ARCHIVE_STREAMS