+
+#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();
+
+ // Make sure this object has only one reference
+ void UnShare() { AllocExclusive(); }
+
+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 AllocExclusive() 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) ;
+ virtual ~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;