+
+#ifdef _WX_WANT_DELETE_VOID
+ void operator delete ( void * buf );
+#endif
+
+#ifdef _WX_WANT_DELETE_VOID_CONSTCHAR_SIZET
+ void operator delete ( void *buf, const char *_fname, size_t _line );
+#endif
+
+#ifdef _WX_WANT_DELETE_VOID_WXCHAR_INT
+ void operator delete ( void *buf, const wxChar*, int );
+#endif
+
+#ifdef _WX_WANT_ARRAY_NEW_SIZET_WXCHAR_INT
+ void *operator new[] ( size_t size, const wxChar *fileName = NULL, int lineNum = 0 );
+#endif
+
+#ifdef _WX_WANT_ARRAY_DELETE_VOID
+ void operator delete[] ( void *buf );
+#endif
+
+#ifdef _WX_WANT_ARRAY_DELETE_VOID_WXCHAR_INT
+ void operator delete[] (void* buf, const wxChar*, int );
+#endif
+
+ // ref counted data handling methods
+
+ // get/set
+ wxObjectRefData *GetRefData() const { return m_refData; }
+ void SetRefData(wxObjectRefData *data) { m_refData = data; }
+
+ // make a 'clone' of the object
+ void Ref(const wxObject& clone);
+
+ // destroy a reference
+ void UnRef();
+
+protected:
+ // ensure that our data is not shared with anybody else: if we have no
+ // data, it is created using CreateRefData() below, if we have shared data
+ // it is copied using CloneRefData(), otherwise nothing is done
+ void AllocExclusive();
+
+ // both methods must be implemented if Unshare() is used, not pure virtual
+ // only because of the backwards compatibility reasons
+
+ // create a new m_refData
+ virtual wxObjectRefData *CreateRefData() const;
+
+ // create a new m_refData initialized with the given one
+ virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const;
+
+ wxObjectRefData *m_refData;
+};
+
+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
+{
+ friend class WXDLLIMPEXP_BASE wxDynamicClassInfo ;
+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
+ {
+#ifdef _MSC_VER
+ return (wxClassInfo*) m_classInfo;