X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/dfc0e3fb9a38ac231b12d207654afcf3de9582c2..daa084c239b94dd49f73952008ea8e36dba6c9c4:/contrib/include/wx/xml/xmlio.h diff --git a/contrib/include/wx/xml/xmlio.h b/contrib/include/wx/xml/xmlio.h index 788f1f8023..81bb543047 100644 --- a/contrib/include/wx/xml/xmlio.h +++ b/contrib/include/wx/xml/xmlio.h @@ -20,53 +20,64 @@ #include "wx/xml/xml.h" -class wxXmlIOHandlerBin : public wxXmlIOHandler +class WXDLLEXPORT wxXmlIOHandlerExpat : public wxXmlIOHandler { - public: - wxXmlIOHandlerBin() {} - - virtual wxXmlIOType GetType() { return wxXML_IO_BIN; } - virtual bool CanLoad(wxInputStream& stream); - virtual bool CanSave() { return TRUE; } - - virtual bool Load(wxInputStream& stream, wxXmlDocument& doc); - virtual bool Save(wxOutputStream& stream, const wxXmlDocument& doc); - - protected: - wxString ReadHeader(wxInputStream& stream); - void WriteHeader(wxOutputStream& stream, const wxString& header); +public: + virtual wxXmlIOType GetType() { return wxXML_IO_EXPAT; } + virtual bool CanLoad(wxInputStream& stream); + virtual bool CanSave() { return FALSE; } + + virtual bool Load(wxInputStream& stream, wxXmlDocument& doc); + virtual bool Save(wxOutputStream& stream, const wxXmlDocument& doc) { return FALSE; } }; +class WXDLLEXPORT wxXmlIOHandlerWriter : public wxXmlIOHandler +{ +public: + virtual wxXmlIOType GetType() { return wxXML_IO_TEXT_OUTPUT; } + virtual bool CanLoad(wxInputStream& stream) { return FALSE; } + virtual bool CanSave() { return TRUE; } + + virtual bool Load(wxInputStream& stream, wxXmlDocument& doc) { return FALSE; } + virtual bool Save(wxOutputStream& stream, const wxXmlDocument& doc); +}; -#if wxUSE_ZLIB -class wxXmlIOHandlerBinZ : public wxXmlIOHandlerBin +class WXDLLEXPORT wxXmlIOHandlerBin : public wxXmlIOHandler { - public: - wxXmlIOHandlerBinZ() {} +public: + wxXmlIOHandlerBin() {} + + virtual wxXmlIOType GetType() { return wxXML_IO_BIN; } + virtual bool CanLoad(wxInputStream& stream); + virtual bool CanSave() { return TRUE; } - virtual wxXmlIOType GetType() { return wxXML_IO_BINZ; } - virtual bool CanLoad(wxInputStream& stream); + virtual bool Load(wxInputStream& stream, wxXmlDocument& doc); + virtual bool Save(wxOutputStream& stream, const wxXmlDocument& doc); - virtual bool Load(wxInputStream& stream, wxXmlDocument& doc); - virtual bool Save(wxOutputStream& stream, const wxXmlDocument& doc); +protected: + wxString ReadHeader(wxInputStream& stream); + void WriteHeader(wxOutputStream& stream, const wxString& header); }; -#endif +#if wxUSE_ZLIB -class wxXmlIOHandlerLibxml : public wxXmlIOHandler +class WXDLLEXPORT wxXmlIOHandlerBinZ : public wxXmlIOHandlerBin { - public: - virtual wxXmlIOType GetType() { return wxXML_IO_LIBXML; } - virtual bool CanLoad(wxInputStream& stream); - virtual bool CanSave(); +public: + wxXmlIOHandlerBinZ() {} + + virtual wxXmlIOType GetType() { return wxXML_IO_BINZ; } + virtual bool CanLoad(wxInputStream& stream); - virtual bool Load(wxInputStream& stream, wxXmlDocument& doc); - virtual bool Save(wxOutputStream& stream, const wxXmlDocument& doc); + virtual bool Load(wxInputStream& stream, wxXmlDocument& doc); + virtual bool Save(wxOutputStream& stream, const wxXmlDocument& doc); }; +#endif + #endif // _WX_XMLIO_H_