+class WXDLLIMPEXP_BASE wxObjectConstructorWriter: public wxObjectWriterFunctor
+{
+public:
+ wxObjectConstructorWriter(const wxClassTypeInfo* cti,
+ wxObjectCodeReaderCallback* writer) :
+ m_cti(cti),m_writer(writer)
+ {}
+
+ virtual void operator()(const wxObject *vobj)
+ {
+ const wxClassInfo* ci = m_cti->GetClassInfo();
+
+ for ( int i = 0; i < ci->GetCreateParamCount(); ++i )
+ {
+ wxString name = ci->GetCreateParamName(i);
+ const wxPropertyInfo* prop = ci->FindPropertyInfo(name);
+ if ( i > 0 )
+ m_constructor += ", ";
+ wxAny value;
+ prop->GetAccessor()->GetProperty(vobj, value);
+ m_constructor+= m_writer->ValueAsCode(value);
+ }
+ }
+
+ const wxString& GetConstructorString() const { return m_constructor;}
+private:
+ const wxClassTypeInfo* m_cti;
+ wxObjectCodeReaderCallback* m_writer;
+ wxString m_constructor;
+};
+
+wxString wxObjectCodeReaderCallback::ValueAsCode( const wxAny ¶m )