]> git.saurik.com Git - wxWidgets.git/blame - include/wx/xrc/xmlio.h
Applied wxImage -> wxCursor patch, tool window event table fix
[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
cc30b233
VS
30 virtual bool Load(wxInputStream& stream, wxXmlDocument& doc,
31 const wxString& encoding);
999d9a9f
VS
32 virtual bool Save(wxOutputStream& WXUNUSED(stream), const wxXmlDocument& WXUNUSED(doc))
33 { return FALSE; }
56d2f750
VS
34};
35
36
ea89ec17 37class WXXMLDLLEXPORT wxXmlIOHandlerWriter : public wxXmlIOHandler
eb8671f2
VS
38{
39public:
40 virtual wxXmlIOType GetType() { return wxXML_IO_TEXT_OUTPUT; }
999d9a9f 41 virtual bool CanLoad(wxInputStream& WXUNUSED(stream)) { return FALSE; }
eb8671f2 42 virtual bool CanSave() { return TRUE; }
56d2f750 43
cc30b233
VS
44 virtual bool Load(wxInputStream& WXUNUSED(stream), wxXmlDocument& WXUNUSED(doc),
45 const wxString& WXUNUSED(encoding))
999d9a9f 46 { return FALSE; }
eb8671f2
VS
47 virtual bool Save(wxOutputStream& stream, const wxXmlDocument& doc);
48};
56d2f750 49
eb8671f2 50
ea89ec17 51class WXXMLDLLEXPORT wxXmlIOHandlerBin : public wxXmlIOHandler
56d2f750 52{
eb8671f2
VS
53public:
54 wxXmlIOHandlerBin() {}
56d2f750 55
eb8671f2
VS
56 virtual wxXmlIOType GetType() { return wxXML_IO_BIN; }
57 virtual bool CanLoad(wxInputStream& stream);
58 virtual bool CanSave() { return TRUE; }
56d2f750 59
cc30b233
VS
60 virtual bool Load(wxInputStream& stream, wxXmlDocument& doc,
61 const wxString& encoding);
eb8671f2
VS
62 virtual bool Save(wxOutputStream& stream, const wxXmlDocument& doc);
63
ea89ec17 64protected:
eb8671f2
VS
65 wxString ReadHeader(wxInputStream& stream);
66 void WriteHeader(wxOutputStream& stream, const wxString& header);
56d2f750
VS
67};
68
56d2f750
VS
69
70
eb8671f2 71#if wxUSE_ZLIB
56d2f750 72
ea89ec17 73class WXXMLDLLEXPORT wxXmlIOHandlerBinZ : public wxXmlIOHandlerBin
56d2f750 74{
eb8671f2
VS
75public:
76 wxXmlIOHandlerBinZ() {}
56d2f750 77
eb8671f2
VS
78 virtual wxXmlIOType GetType() { return wxXML_IO_BINZ; }
79 virtual bool CanLoad(wxInputStream& stream);
80
cc30b233
VS
81 virtual bool Load(wxInputStream& stream, wxXmlDocument& doc,
82 const wxString& encoding);
eb8671f2 83 virtual bool Save(wxOutputStream& stream, const wxXmlDocument& doc);
56d2f750
VS
84};
85
eb8671f2
VS
86#endif
87
56d2f750
VS
88
89#endif // _WX_XMLIO_H_