X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fc7a2a602b4bd9308be21bc07e40a680f483438e..a8eaaeb23796c69ea0f67cbd48fc5f667d9823d0:/include/wx/object.h diff --git a/include/wx/object.h b/include/wx/object.h index bfecd72a2a..bbc627fe60 100644 --- a/include/wx/object.h +++ b/include/wx/object.h @@ -28,6 +28,14 @@ class WXDLLIMPEXP_BASE wxObject; #if wxUSE_DYNAMIC_CLASSES +#ifndef wxUSE_EXTENDED_RTTI +#define wxUSE_EXTENDED_RTTI 0 +#endif + +#if wxUSE_EXTENDED_RTTI +#include "wx/xti.h" +#else + // ---------------------------------------------------------------------------- // conditional compilation // ---------------------------------------------------------------------------- @@ -104,6 +112,7 @@ public: static void CleanUpClasses(); + public: const wxChar *m_className; const wxChar *m_baseClassName1; @@ -146,8 +155,7 @@ WXDLLIMPEXP_BASE wxObject *wxCreateDynamicObject(const wxChar *name); { return &name::sm_class##name; } #define DECLARE_DYNAMIC_CLASS_NO_ASSIGN(name) \ - private: \ - name& operator=(const name&); \ + DECLARE_NO_ASSIGN_CLASS(name) \ DECLARE_DYNAMIC_CLASS(name) #define DECLARE_DYNAMIC_CLASS_NO_COPY(name) \ @@ -199,6 +207,9 @@ WXDLLIMPEXP_BASE wxObject *wxCreateDynamicObject(const wxChar *name); #define IMPLEMENT_CLASS IMPLEMENT_ABSTRACT_CLASS #define IMPLEMENT_CLASS2 IMPLEMENT_ABSTRACT_CLASS2 +#endif // !wxUSE_EXTENDED_RTTI + + // ----------------------------------- // for pluggable classes // ----------------------------------- @@ -266,7 +277,6 @@ name##PluginSentinel m_pluginsentinel; #define IMPLEMENT_USER_EXPORTED_ABSTRACT_PLUGGABLE_CLASS2(name, basename1, basename2) \ IMPLEMENT_ABSTRACT_PLUGGABLE_CLASS2(name, basename1, basename2) - #define CLASSINFO(name) (&name::sm_class##name) #else // !wxUSE_DYNAMIC_CLASSES @@ -299,7 +309,6 @@ name##PluginSentinel m_pluginsentinel; #endif // wxUSE_DYNAMIC_CLASSES - #define wxIS_KIND_OF(obj, className) obj->IsKindOf(&className::sm_class##className) // Just seems a bit nicer-looking (pretend it's not a macro) @@ -407,16 +416,16 @@ class WXDLLIMPEXP_BASE wxObject private: void InitFrom(const wxObject& other); - + public: wxObject() { m_refData = NULL; } virtual ~wxObject() { UnRef(); } - + wxObject(const wxObject& other) { InitFrom(other); } - + wxObject& operator=(const wxObject& other) { if ( this != &other )