]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/object.h
restored wxBuildOptions class, for backward compatibility with wx-2.4
[wxWidgets.git] / include / wx / object.h
index bdb127321bb1ad789a3d1c28044010717835b46e..2f5ffd3b5e97e50b1bff8731673c072d5778374b 100644 (file)
@@ -13,7 +13,7 @@
 #ifndef _WX_OBJECTH__
 #define _WX_OBJECTH__
 
-#if defined(__GNUG__) && !defined(__APPLE__)
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
 #pragma interface "object.h"
 #endif
 
@@ -105,11 +105,13 @@ public:
                  ( m_baseInfo2 && m_baseInfo2->IsKindOf(info) ) );
     }
 
+#ifdef WXWIN_COMPATIBILITY_2_4
     // Initializes parent pointers and hash table for fast searching.
-    static void     InitializeClasses();
-
+    wxDEPRECATED( static void     InitializeClasses() );
     // Cleans up hash table used for fast searching.
-    static void     CleanUpClasses();
+    wxDEPRECATED( static void     CleanUpClasses() );
+#endif
+    static void     CleanUp();
     
 public:
     const wxChar            *m_className;
@@ -145,6 +147,11 @@ protected:
 
 WXDLLIMPEXP_BASE wxObject *wxCreateDynamicObject(const wxChar *name);
 
+#ifdef WXWIN_COMPATIBILITY_2_4
+inline void wxClassInfo::InitializeClasses() {}
+inline void wxClassInfo::CleanUpClasses() {}
+#endif
+
 // ----------------------------------------------------------------------------
 // Dynamic class macros
 // ----------------------------------------------------------------------------
@@ -408,11 +415,6 @@ inline void wxCheckCast(void *ptr)
 
 #endif // WXDEBUG && wxUSE_MEMORY_TRACING
 
-#if wxUSE_STD_IOSTREAM && (defined(__WXDEBUG__) || wxUSE_DEBUG_CONTEXT)
-// needed by wxObject::Dump
-#include "wx/iosfwrap.h"
-#endif
-
 // ----------------------------------------------------------------------------
 // wxObject: the root class of wxWindows object hierarchy
 // ----------------------------------------------------------------------------
@@ -476,11 +478,6 @@ public:
     void operator delete[] (void* buf, const wxChar*, int );
 #endif
 
-
-#if wxUSE_STD_IOSTREAM && (defined(__WXDEBUG__) || wxUSE_DEBUG_CONTEXT)
-    virtual void Dump(wxSTD ostream& str);
-#endif
-
     // ref counted data handling methods
 
     // get/set
@@ -535,6 +532,35 @@ inline wxObject *wxCheckDynamicCast(wxObject *obj, wxClassInfo *classInfo)
     return obj && obj->GetClassInfo()->IsKindOf(classInfo) ? obj : NULL;
 }
 
+#if wxUSE_EXTENDED_RTTI
+class WXDLLIMPEXP_BASE wxDynamicObject : public wxObject
+{
+public:
+    // instantiates this object with an instance of its superclass
+    wxDynamicObject(wxObject* superClassInstance, const wxDynamicClassInfo *info) ;
+    ~wxDynamicObject();
+
+    void SetProperty (const wxChar *PropertyName, const wxxVariant &Value);
+    wxxVariant GetProperty (const wxChar *PropertyName) const ;
+
+    // get the runtime identity of this object
+    wxClassInfo *GetClassInfo() const
+    {
+               return const_cast<wxClassInfo*>((const wxClassInfo*)m_classInfo);
+    }
+
+    wxObject* GetSuperClassInstance() const
+    {
+        return m_superClassInstance ;
+    }
+private :
+    wxObject *m_superClassInstance ;
+    const wxDynamicClassInfo *m_classInfo;
+    struct wxDynamicObjectInternal;
+    wxDynamicObjectInternal *m_data;
+};
+#endif
+
 // ----------------------------------------------------------------------------
 // more debugging macros
 // ----------------------------------------------------------------------------