]> git.saurik.com Git - wxWidgets.git/blame - src/common/archive.cpp
Applied #15375 to stop event-sending in generic wxSpinCtrl ctor (eco)
[wxWidgets.git] / src / common / archive.cpp
CommitLineData
00375592 1/////////////////////////////////////////////////////////////////////////////
8898456d 2// Name: src/common/archive.cpp
00375592
VZ
3// Purpose: Streams for archive formats
4// Author: Mike Wetherell
00375592
VZ
5// Copyright: (c) Mike Wetherell
6// Licence: wxWindows licence
7/////////////////////////////////////////////////////////////////////////////
8
00375592
VZ
9// For compilers that support precompilation, includes "wx.h".
10#include "wx/wxprec.h"
11
12#ifdef __BORLANDC__
8898456d 13 #pragma hdrstop
00375592
VZ
14#endif
15
8898456d
WS
16#if wxUSE_STREAMS && wxUSE_ARCHIVE_STREAMS
17
00375592 18#include "wx/archive.h"
00375592
VZ
19
20IMPLEMENT_ABSTRACT_CLASS(wxArchiveEntry, wxObject)
1b79dad4 21IMPLEMENT_ABSTRACT_CLASS(wxArchiveClassFactory, wxFilterClassFactoryBase)
00375592
VZ
22
23
24/////////////////////////////////////////////////////////////////////////////
25// wxArchiveInputStream
26
27wxArchiveInputStream::wxArchiveInputStream(wxInputStream& stream,
28 wxMBConv& conv)
29 : wxFilterInputStream(stream),
30 m_conv(conv)
31{
32}
33
1b79dad4
MW
34wxArchiveInputStream::wxArchiveInputStream(wxInputStream *stream,
35 wxMBConv& conv)
36 : wxFilterInputStream(stream),
37 m_conv(conv)
38{
39}
40
00375592
VZ
41
42/////////////////////////////////////////////////////////////////////////////
43// wxArchiveOutputStream
44
45wxArchiveOutputStream::wxArchiveOutputStream(wxOutputStream& stream,
46 wxMBConv& conv)
47 : wxFilterOutputStream(stream),
48 m_conv(conv)
49{
50}
51
1b79dad4
MW
52wxArchiveOutputStream::wxArchiveOutputStream(wxOutputStream *stream,
53 wxMBConv& conv)
54 : wxFilterOutputStream(stream),
55 m_conv(conv)
56{
57}
58
00375592
VZ
59
60/////////////////////////////////////////////////////////////////////////////
61// wxArchiveEntry
62
63void wxArchiveEntry::SetNotifier(wxArchiveNotifier& notifier)
64{
65 UnsetNotifier();
66 m_notifier = &notifier;
67 m_notifier->OnEntryUpdated(*this);
68}
69
f44eaed6 70wxArchiveEntry& wxArchiveEntry::operator=(const wxArchiveEntry& WXUNUSED(e))
00375592 71{
f44eaed6 72 m_notifier = NULL;
00375592
VZ
73 return *this;
74}
75
1b79dad4
MW
76
77/////////////////////////////////////////////////////////////////////////////
78// wxArchiveClassFactory
79
80wxArchiveClassFactory *wxArchiveClassFactory::sm_first = NULL;
81
82void wxArchiveClassFactory::Remove()
83{
84 if (m_next != this)
85 {
86 wxArchiveClassFactory **pp = &sm_first;
87
88 while (*pp != this)
89 pp = &(*pp)->m_next;
90
91 *pp = m_next;
92
93 m_next = this;
94 }
95}
96
9e8e867f 97#endif // wxUSE_STREAMS && wxUSE_ARCHIVE_STREAMS