]> git.saurik.com Git - wxWidgets.git/blame - include/wx/xrc/xmlio.h
Trying to hide evidence of my negative programming skills...
[wxWidgets.git] / include / wx / xrc / xmlio.h
CommitLineData
56d2f750
VS
1/////////////////////////////////////////////////////////////////////////////
2// Name: xmlio.h
3// Purpose: wxXmlIOHandler - XML I/O classes
4// Author: Vaclav Slavik
5// Created: 2000/07/24
6// RCS-ID: $Id$
7// Copyright: (c) 2000 Vaclav Slavik
8// Licence: wxWindows licence
9/////////////////////////////////////////////////////////////////////////////
10
11#ifndef _WX_XMLIO_H_
12#define _WX_XMLIO_H_
13
14#ifdef __GNUG__
15#pragma interface "xmlio.h"
16#endif
17
18#include "wx/defs.h"
19#include "wx/string.h"
999d9a9f 20#include "wx/xrc/xml.h"
56d2f750
VS
21
22
ea89ec17 23class WXXMLDLLEXPORT wxXmlIOHandlerExpat : public wxXmlIOHandler
56d2f750 24{
eb8671f2
VS
25public:
26 virtual wxXmlIOType GetType() { return wxXML_IO_EXPAT; }
27 virtual bool CanLoad(wxInputStream& stream);
28 virtual bool CanSave() { return FALSE; }
29
30 virtual bool Load(wxInputStream& stream, wxXmlDocument& doc);
999d9a9f
VS
31 virtual bool Save(wxOutputStream& WXUNUSED(stream), const wxXmlDocument& WXUNUSED(doc))
32 { return FALSE; }
56d2f750
VS
33};
34
35
ea89ec17 36class WXXMLDLLEXPORT wxXmlIOHandlerWriter : public wxXmlIOHandler
eb8671f2
VS
37{
38public:
39 virtual wxXmlIOType GetType() { return wxXML_IO_TEXT_OUTPUT; }
999d9a9f 40 virtual bool CanLoad(wxInputStream& WXUNUSED(stream)) { return FALSE; }
eb8671f2 41 virtual bool CanSave() { return TRUE; }
56d2f750 42
999d9a9f
VS
43 virtual bool Load(wxInputStream& WXUNUSED(stream), wxXmlDocument& WXUNUSED(doc))
44 { return FALSE; }
eb8671f2
VS
45 virtual bool Save(wxOutputStream& stream, const wxXmlDocument& doc);
46};
56d2f750 47
eb8671f2 48
ea89ec17 49class WXXMLDLLEXPORT wxXmlIOHandlerBin : public wxXmlIOHandler
56d2f750 50{
eb8671f2
VS
51public:
52 wxXmlIOHandlerBin() {}
56d2f750 53
eb8671f2
VS
54 virtual wxXmlIOType GetType() { return wxXML_IO_BIN; }
55 virtual bool CanLoad(wxInputStream& stream);
56 virtual bool CanSave() { return TRUE; }
56d2f750 57
eb8671f2
VS
58 virtual bool Load(wxInputStream& stream, wxXmlDocument& doc);
59 virtual bool Save(wxOutputStream& stream, const wxXmlDocument& doc);
60
ea89ec17 61protected:
eb8671f2
VS
62 wxString ReadHeader(wxInputStream& stream);
63 void WriteHeader(wxOutputStream& stream, const wxString& header);
56d2f750
VS
64};
65
56d2f750
VS
66
67
eb8671f2 68#if wxUSE_ZLIB
56d2f750 69
ea89ec17 70class WXXMLDLLEXPORT wxXmlIOHandlerBinZ : public wxXmlIOHandlerBin
56d2f750 71{
eb8671f2
VS
72public:
73 wxXmlIOHandlerBinZ() {}
56d2f750 74
eb8671f2
VS
75 virtual wxXmlIOType GetType() { return wxXML_IO_BINZ; }
76 virtual bool CanLoad(wxInputStream& stream);
77
78 virtual bool Load(wxInputStream& stream, wxXmlDocument& doc);
79 virtual bool Save(wxOutputStream& stream, const wxXmlDocument& doc);
56d2f750
VS
80};
81
eb8671f2
VS
82#endif
83
56d2f750
VS
84
85#endif // _WX_XMLIO_H_