X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8f2b1cfd3942412889d9f7e2fd2efe27e2d049c1..fcdd53359135f790b85728c4254b97095a56dad8:/src/common/xtistrm.cpp diff --git a/src/common/xtistrm.cpp b/src/common/xtistrm.cpp index f1a55088e8..2a73a29f77 100644 --- a/src/common/xtistrm.cpp +++ b/src/common/xtistrm.cpp @@ -9,29 +9,25 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) -#pragma implementation "xtistrm.h" -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" #ifdef __BORLANDC__ -#pragma hdrstop + #pragma hdrstop #endif +#if wxUSE_EXTENDED_RTTI + +#include "wx/xtistrm.h" + #ifndef WX_PRECOMP -#include "wx/hash.h" -#include "wx/object.h" + #include "wx/object.h" + #include "wx/hash.h" + #include "wx/event.h" #endif #include "wx/tokenzr.h" #include "wx/txtstrm.h" -#include "wx/event.h" - -#if wxUSE_EXTENDED_RTTI - -#include "wx/xtistrm.h" #include "wx/beforestd.h" #include @@ -162,22 +158,24 @@ void wxWriter::WriteAllProperties( const wxObject * obj , const wxClassInfo* ci } map.erase( name ) ; } - - for( wxPropertyInfoMap::iterator iter = map.begin() ; iter != map.end() ; ++iter ) - { - const wxPropertyInfo* prop = iter->second ; - if ( prop->GetFlags() & wxPROP_OBJECT_GRAPH ) + { // Extra block for broken compilers + for( wxPropertyInfoMap::iterator iter = map.begin() ; iter != map.end() ; ++iter ) { - WriteOneProperty( obj , prop->GetDeclaringClass() , prop , persister , data ) ; + 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) ) + { // Extra block for broken compilers + for( wxPropertyInfoMap::iterator iter = map.begin() ; iter != map.end() ; ++iter ) { - WriteOneProperty( obj , prop->GetDeclaringClass() , prop , persister , data ) ; + const wxPropertyInfo* prop = iter->second ; + if ( !(prop->GetFlags() & wxPROP_OBJECT_GRAPH) ) + { + WriteOneProperty( obj , prop->GetDeclaringClass() , prop , persister , data ) ; + } } } } @@ -272,7 +270,7 @@ void wxWriter::WriteOneProperty( const wxObject *obj , const wxClassInfo* ci , c const wxEnumTypeInfo *eti = dynamic_cast( pi->GetTypeInfo() ) ; if ( eti ) { - eti->ConvertFromLong( value.Get() , value ) ; + eti->ConvertFromLong( value.wxTEMPLATED_MEMBER_CALL(Get , long) , value ) ; } else { @@ -286,7 +284,7 @@ void wxWriter::WriteOneProperty( const wxObject *obj , const wxClassInfo* ci , c if ( value.GetAsString() == pi->GetDefaultValue().GetAsString() ) return ; } - + // avoid streaming out null objects const wxClassTypeInfo* cti = dynamic_cast< const wxClassTypeInfo* > ( pi->GetTypeInfo() ) ; @@ -391,7 +389,7 @@ bool wxReader::HasObjectClassInfo( int objectID ) if ( objectID == wxNullObjectID || objectID == wxInvalidObjectID ) { wxLogError( _("Invalid or Null Object ID passed to HasObjectClassInfo" ) ) ; - return NULL ; + return false ; } return m_data->m_classInfos.find(objectID) != m_data->m_classInfos.end() ; } @@ -431,7 +429,7 @@ struct wxRuntimeDepersister::wxRuntimeDepersisterInternal return NULL ; if ( m_objects.find(objectID) == m_objects.end() ) { - wxLogError( _("Passing an unkown object to GetObject") ) ; + wxLogError( _("Passing an unknown object to GetObject") ) ; return NULL ; } @@ -580,7 +578,7 @@ void wxRuntimeDepersister::SetConnect(int eventSourceObjectID, handlerInfo->GetEventFunction() , NULL /*user data*/ , ehsink ) ; } - } + } } } @@ -842,8 +840,8 @@ void wxCodeDepersister::SetConnect(int eventSourceObjectID, } } -#include +#include "wx/arrimpl.cpp" WX_DEFINE_OBJARRAY(wxxVariantArray); -#endif +#endif // wxUSE_EXTENDED_RTTI