- info = info->m_next;
- }
- return (wxObject*) NULL;
- }
- return (wxObject*) NULL;
-}
-
-#if wxUSE_SERIAL
-
-#include "wx/serbase.h"
-#include "wx/dynlib.h"
-#include "wx/msgdlg.h"
-
-wxObject* wxCreateStoredObject( wxInputStream &stream )
-{
- wxObjectInputStream obj_s(stream);
- return obj_s.LoadObject();
-};
-
-void wxObject::StoreObject( wxObjectOutputStream& stream )
-{
- wxString obj_name = wxString(GetClassInfo()->GetClassName()) + "_Serialize";
- wxLibrary *lib = wxTheLibraries.LoadLibrary("wxserial");
-
- if (!lib) {
- wxLogError(_("Can't load wxSerial dynamic library."));
- return;
- }
- if (!m_serialObj) {
- m_serialObj = (WXSERIAL(wxObject) *)lib->CreateObject( obj_name );
-
- if (!m_serialObj) {
- wxLogError(_("Can't find the serialization object '%s' "
- "for the object '%s'."),
- obj_name.c_str(),
- GetClassInfo()->GetClassName());
- return;
- }
- m_serialObj->SetObject(this);