X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/cab1a6053dce9f0a2dcd87d8e2d12d8633f4785f..e0062c047ecb5a7d4790b980777dfa70869f4834:/include/wx/xtistrm.h diff --git a/include/wx/xtistrm.h b/include/wx/xtistrm.h index 3aa8af1ac5..023675a6f5 100644 --- a/include/wx/xtistrm.h +++ b/include/wx/xtistrm.h @@ -12,10 +12,6 @@ #ifndef _WX_XTISTRMH__ #define _WX_XTISTRMH__ -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) -#pragma interface "xtistrm.h" -#endif - #include "wx/wx.h" #if wxUSE_EXTENDED_RTTI @@ -49,6 +45,8 @@ class WXDLLIMPEXP_BASE wxReader ; class WXDLLIMPEXP_BASE wxPersister { public : + virtual ~wxPersister() {} + // will be called before an object is written, may veto by returning false virtual bool BeforeWriteObject( wxWriter *WXUNUSED(writer) , const wxObject *WXUNUSED(object) , const wxClassInfo *WXUNUSED(classInfo) , wxxVariantArray &WXUNUSED(metadata)) { return true ; } @@ -78,7 +76,7 @@ class WXDLLIMPEXP_BASE wxWriter : public wxObject { public : wxWriter() ; - ~wxWriter() ; + virtual ~wxWriter() ; // with this call you start writing out a new top-level object void WriteObject(const wxObject *object, const wxClassInfo *classInfo , wxPersister *persister , const wxString &name , wxxVariantArray &WXUNUSED(metadata)) ; @@ -163,7 +161,7 @@ class WXDLLIMPEXP_BASE wxReader : public wxObject { public : wxReader() ; - ~wxReader() ; + virtual ~wxReader() ; // the only thing wxReader knows about is the class info by object ID wxClassInfo *GetObjectClassInfo(int objectID) ; @@ -190,6 +188,8 @@ private : class WXDLLIMPEXP_BASE wxDepersister { public : + virtual ~wxDepersister() {} + // allocate the new object on the heap, that object will have the passed in ID virtual void AllocateObject(int objectID, wxClassInfo *classInfo, wxxVariantArray &metadata) = 0;