X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0c32066b58849e52e4d76e30982414d9f4daae6a..dfc5454127ac2195e10deebb216d82c674e757df:/include/wx/object.h diff --git a/include/wx/object.h b/include/wx/object.h index 83b86a7d08..16f2aebe35 100644 --- a/include/wx/object.h +++ b/include/wx/object.h @@ -17,6 +17,7 @@ #endif #include "wx/defs.h" +#include "wx/memory.h" class WXDLLEXPORT wxObject; @@ -56,9 +57,9 @@ class WXDLLEXPORT wxClassInfo inline wxClassInfo* GetBaseClass2() const { return m_baseInfo2; } inline int GetSize(void) const { return m_objectSize; } inline wxObjectConstructorFn GetConstructor() const { return m_objectConstructor; } - inline wxClassInfo* GetFirst() const { return sm_first; } + static inline wxClassInfo* GetFirst() { return sm_first; } inline wxClassInfo* GetNext() const { return m_next; } - bool IsKindOf(wxClassInfo *info); + bool IsKindOf(wxClassInfo *info) const; static wxClassInfo *FindClass(char *c); @@ -95,7 +96,7 @@ wxObject* WXDLLEXPORT wxCreateStoredObject( wxInputStream& stream ); #define DECLARE_DYNAMIC_CLASS(name) \ public:\ static wxClassInfo sm_class##name;\ - wxClassInfo *GetClassInfo() \ + wxClassInfo *GetClassInfo() const \ { return &name::sm_class##name; } #define DECLARE_ABSTRACT_CLASS(name) DECLARE_DYNAMIC_CLASS(name) @@ -173,9 +174,9 @@ class WXDLLEXPORT wxObject wxObject(void); virtual ~wxObject(void); - virtual wxClassInfo *GetClassInfo(void) { return &sm_classwxObject; } + virtual wxClassInfo *GetClassInfo(void) const { return &sm_classwxObject; } - bool IsKindOf(wxClassInfo *info); + bool IsKindOf(wxClassInfo *info) const; #if WXDEBUG && USE_MEMORY_TRACING void * operator new (size_t size, char * fileName = NULL, int lineNum = 0); @@ -232,10 +233,10 @@ private: }; #if WXDEBUG && USE_GLOBAL_MEMORY_OPERATORS -#ifndef WXDEBUG_NEW -#define WXDEBUG_NEW new(__FILE__,__LINE__) -#endif -#define new WXDEBUG_NEW +//#ifndef WXDEBUG_NEW +//#define WXDEBUG_NEW new(__FILE__,__LINE__) +//#endif +#define new new(__FILE__,__LINE__) #endif #endif