-/////////////////////////////////////////////////////////////////////////////\r
-// Name: wx/xtistrm.h\r
-// Purpose: streaming runtime metadata information (extended class info)\r
-// Author: Stefan Csomor\r
-// Modified by:\r
-// Created: 27/07/03\r
-// RCS-ID: $Id: xtistrm.h 47827 2007-07-31 19:25:09Z FM $\r
-// Copyright: (c) 2003 Stefan Csomor\r
-// Licence: wxWindows licence\r
-/////////////////////////////////////////////////////////////////////////////\r
-\r
-#ifndef _CODEDEPERSISTER_\r
-#define _CODEDEPERSISTER_\r
-\r
-#include "wx/defs.h"\r
-\r
-/*\r
-wxObjectCodeReaderCallback implements the callbacks that will depersist\r
-an object into a C++ initialization function.\r
-*/\r
-\r
-class WXDLLIMPEXP_BASE wxTextOutputStream;\r
-\r
-class WXDLLIMPEXP_BASE wxObjectCodeReaderCallback: public wxObjectWriterCallback\r
-{\r
-private:\r
- struct wxObjectCodeReaderCallbackInternal;\r
- wxObjectCodeReaderCallbackInternal * m_data;\r
- wxTextOutputStream *m_fp;\r
- wxString ValueAsCode( const wxVariantBase ¶m );\r
-\r
-public:\r
- wxObjectCodeReaderCallback(wxTextOutputStream *out);\r
- virtual ~wxObjectCodeReaderCallback();\r
-\r
- // allocate the new object on the heap, that object will have the passed in ID\r
- virtual void AllocateObject(int objectID, wxClassInfo *classInfo,\r
- wxVariantBaseArray &metadata);\r
-\r
- // initialize the already allocated object having the ID objectID \r
- // with the Create method creation parameters which are objects are \r
- // having their Ids passed in objectIDValues having objectId <> wxInvalidObjectID\r
-\r
- virtual void CreateObject(int objectID,\r
- const wxClassInfo *classInfo,\r
- int paramCount,\r
- wxVariantBase *variantValues,\r
- int *objectIDValues,\r
- const wxClassInfo **objectClassInfos,\r
- wxVariantBaseArray &metadata\r
- );\r
-\r
- // construct the new object on the heap, that object will have the \r
- // passed in ID (for objects that don't support allocate-create type \r
- // of creation) creation parameters which are objects are having their \r
- // Ids passed in objectIDValues having objectId <> wxInvalidObjectID\r
-\r
- virtual void ConstructObject(int objectID,\r
- const wxClassInfo *classInfo,\r
- int paramCount,\r
- wxVariantBase *VariantValues,\r
- int *objectIDValues,\r
- const wxClassInfo **objectClassInfos,\r
- wxVariantBaseArray &metadata);\r
-\r
- // destroy the heap-allocated object having the ID objectID, this may \r
- // be used if an object is embedded in another object and set via value \r
- // semantics, so the intermediate object can be destroyed after safely\r
- virtual void DestroyObject(int objectID, wxClassInfo *classInfo);\r
-\r
- // set the corresponding property\r
- virtual void SetProperty(int objectID,\r
- const wxClassInfo *classInfo,\r
- const wxPropertyInfo* propertyInfo,\r
- const wxVariantBase &variantValue);\r
-\r
- // sets the corresponding property (value is an object)\r
- virtual void SetPropertyAsObject(int objectId,\r
- const wxClassInfo *classInfo,\r
- const wxPropertyInfo* propertyInfo,\r
- int valueObjectId);\r
-\r
- // adds an element to a property collection\r
- virtual void AddToPropertyCollection( int objectID,\r
- const wxClassInfo *classInfo,\r
- const wxPropertyInfo* propertyInfo,\r
- const wxVariantBase &VariantValue);\r
-\r
- // sets the corresponding property (value is an object)\r
- virtual void AddToPropertyCollectionAsObject(int objectID,\r
- const wxClassInfo *classInfo,\r
- const wxPropertyInfo* propertyInfo,\r
- int valueObjectId);\r
-\r
- // sets the corresponding event handler\r
- virtual void SetConnect(int eventSourceObjectID,\r
- const wxClassInfo *eventSourceClassInfo,\r
- const wxPropertyInfo *delegateInfo,\r
- const wxClassInfo *eventSinkClassInfo,\r
- const wxHandlerInfo* handlerInfo,\r
- int eventSinkObjectID );\r
-};\r
-\r
-#endif\r
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/xtistrm.h
+// Purpose: streaming runtime metadata information (extended class info)
+// Author: Stefan Csomor
+// Modified by:
+// Created: 27/07/03
+// RCS-ID: $Id$
+// Copyright: (c) 2003 Stefan Csomor
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _CODEDEPERSISTER_
+#define _CODEDEPERSISTER_
+
+#include "wx/defs.h"
+#include "wx/sstream.h"
+
+/*
+wxObjectCodeReaderCallback implements the callbacks that will depersist
+an object into a C++ initialization function.
+*/
+
+class WXDLLIMPEXP_BASE wxTextOutputStream;
+
+class WXDLLIMPEXP_BASE wxObjectCodeReaderCallback: public wxObjectReaderCallback
+{
+private:
+ struct wxObjectCodeReaderCallbackInternal;
+ wxObjectCodeReaderCallbackInternal * m_data;
+ wxString& m_headerincludes;
+ wxString& m_source;
+
+public:
+ wxObjectCodeReaderCallback(wxString& headerincludes, wxString &source);
+ virtual ~wxObjectCodeReaderCallback();
+
+ // allocate the new object on the heap, that object will have the passed in ID
+ virtual void AllocateObject(int objectID, wxClassInfo *classInfo,
+ wxStringToAnyHashMap &metadata);
+
+ // initialize the already allocated object having the ID objectID
+ // with the Create method creation parameters which are objects are
+ // having their Ids passed in objectIDValues having objectId <> wxInvalidObjectID
+
+ virtual void CreateObject(int objectID,
+ const wxClassInfo *classInfo,
+ int paramCount,
+ wxAny *variantValues,
+ int *objectIDValues,
+ const wxClassInfo **objectClassInfos,
+ wxStringToAnyHashMap &metadata
+ );
+
+ // construct the new object on the heap, that object will have the
+ // passed in ID (for objects that don't support allocate-create type
+ // of creation) creation parameters which are objects are having their
+ // Ids passed in objectIDValues having objectId <> wxInvalidObjectID
+
+ virtual void ConstructObject(int objectID,
+ const wxClassInfo *classInfo,
+ int paramCount,
+ wxAny *VariantValues,
+ int *objectIDValues,
+ const wxClassInfo **objectClassInfos,
+ wxStringToAnyHashMap &metadata);
+
+ // destroy the heap-allocated object having the ID objectID, this may
+ // be used if an object is embedded in another object and set via value
+ // semantics, so the intermediate object can be destroyed after safely
+ virtual void DestroyObject(int objectID, wxClassInfo *classInfo);
+
+ // set the corresponding property
+ virtual void SetProperty(int objectID,
+ const wxClassInfo *classInfo,
+ const wxPropertyInfo* propertyInfo,
+ const wxAny &variantValue);
+
+ // sets the corresponding property (value is an object)
+ virtual void SetPropertyAsObject(int objectId,
+ const wxClassInfo *classInfo,
+ const wxPropertyInfo* propertyInfo,
+ int valueObjectId);
+
+ // adds an element to a property collection
+ virtual void AddToPropertyCollection( int objectID,
+ const wxClassInfo *classInfo,
+ const wxPropertyInfo* propertyInfo,
+ const wxAny &VariantValue);
+
+ // sets the corresponding property (value is an object)
+ virtual void AddToPropertyCollectionAsObject(int objectID,
+ const wxClassInfo *classInfo,
+ const wxPropertyInfo* propertyInfo,
+ int valueObjectId);
+
+ // sets the corresponding event handler
+ virtual void SetConnect(int eventSourceObjectID,
+ const wxClassInfo *eventSourceClassInfo,
+ const wxPropertyInfo *delegateInfo,
+ const wxClassInfo *eventSinkClassInfo,
+ const wxHandlerInfo* handlerInfo,
+ int eventSinkObjectID );
+
+ // utility function exposed for callbacks
+ wxString ValueAsCode( const wxAny ¶m );
+};
+
+#endif