+ node = node->GetNext();
+ }
+ }
+}
+void wxWriter::WriteAllProperties( const wxObject * obj , const wxClassInfo* ci , wxPersister *persister, wxWriterInternalPropertiesData * data )
+{
+ wxPropertyInfoMap map ;
+ ci->GetProperties( map ) ;
+ for ( int i = 0 ; i < ci->GetCreateParamCount() ; ++i )
+ {
+ wxString name = ci->GetCreateParamName(i) ;
+ const wxPropertyInfo* prop = map.find(name)->second ;
+ wxASSERT_MSG( prop , wxT("Create Parameter not found in declared RTTI Parameters") ) ;
+ WriteOneProperty( obj , prop->GetDeclaringClass() , prop , persister , data ) ;
+ map.erase( name ) ;
+ }
+
+ for( wxPropertyInfoMap::iterator iter = map.begin() ; iter != map.end() ; ++iter )
+ {
+ const wxPropertyInfo* prop = iter->second ;
+ if ( prop->GetFlags() & wxPROP_OBJECT_GRAPH )
+ {
+ WriteOneProperty( obj , prop->GetDeclaringClass() , prop , persister , data ) ;
+ }
+ }
+
+ for( wxPropertyInfoMap::iterator iter = map.begin() ; iter != map.end() ; ++iter )
+ {
+ const wxPropertyInfo* prop = iter->second ;
+ if ( !(prop->GetFlags() & wxPROP_OBJECT_GRAPH) )
+ {
+ WriteOneProperty( obj , prop->GetDeclaringClass() , prop , persister , data ) ;
+ }
+ }
+}
+
+void wxWriter::WriteOneProperty( const wxObject *obj , const wxClassInfo* ci , const wxPropertyInfo* pi , wxPersister *persister , wxWriterInternalPropertiesData *data )
+{
+ // make sure that we are picking the correct object for accessing the property
+ const wxDynamicObject* dynobj = dynamic_cast< const wxDynamicObject* > (obj ) ;
+ if ( dynobj && (dynamic_cast<const wxDynamicClassInfo*>(ci) == NULL) )
+ obj = dynobj->GetSuperClassInstance() ;
+
+ DoBeginWriteProperty( pi ) ;
+ if ( pi->GetTypeInfo()->GetKind() == wxT_COLLECTION )
+ {
+ wxxVariantArray data ;
+ pi->GetAccessor()->GetPropertyCollection(obj, data) ;
+ const wxTypeInfo * elementType = dynamic_cast< const wxCollectionTypeInfo* >( pi->GetTypeInfo() )->GetElementType() ;
+ for ( size_t i = 0 ; i < data.GetCount() ; ++i )
+ {
+ DoBeginWriteElement() ;
+ wxxVariant value = data[i] ;
+ if ( persister->BeforeWriteProperty( this , pi , value ) )