X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8907154c1a8a6882c6797d1f16393ddfb23e7f3a..4f2511d706e5274a34e1521e11c1b95fed735b42:/include/wx/xtistrm.h?ds=sidebyside diff --git a/include/wx/xtistrm.h b/include/wx/xtistrm.h index c6dbcddfe3..0f62e428c7 100644 --- a/include/wx/xtistrm.h +++ b/include/wx/xtistrm.h @@ -39,12 +39,14 @@ Main interfaces for streaming out objects. // or modify the value before it is streamed-out. // ---------------------------------------------------------------------------- -class WXDLLIMPEXP_BASE wxWriter ; -class WXDLLIMPEXP_BASE wxReader ; +class WXDLLIMPEXP_FWD_BASE wxWriter ; +class WXDLLIMPEXP_FWD_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 ; } @@ -74,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)) ; @@ -148,7 +150,7 @@ private : Streaming callbacks for depersisting XML to code, or running objects */ -class WXDLLIMPEXP_BASE wxDepersister ; +class WXDLLIMPEXP_FWD_BASE wxDepersister ; /* wxReader handles streaming in a class from a arbitrary format. While walking through @@ -159,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) ; @@ -186,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; @@ -343,7 +347,7 @@ an object into a C++ initialization function. this will move to a utility lib soon */ -class WXDLLIMPEXP_BASE wxTextOutputStream ; +class WXDLLIMPEXP_FWD_BASE wxTextOutputStream ; class WXDLLIMPEXP_BASE wxCodeDepersister : public wxDepersister {