]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/object.h
More Motif stuff
[wxWidgets.git] / include / wx / object.h
index 83b86a7d086b4228b9764ed81a670b5d99926461..16f2aebe352d8f06d1c8b58c9822745911f48e15 100644 (file)
@@ -17,6 +17,7 @@
 #endif
 
 #include "wx/defs.h"
 #endif
 
 #include "wx/defs.h"
+#include "wx/memory.h"
 
 class WXDLLEXPORT wxObject;
 
 
 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* 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; }
    inline wxClassInfo* GetNext() const { return m_next; }
-   bool IsKindOf(wxClassInfo *info);
+   bool IsKindOf(wxClassInfo *info) const;
 
    static wxClassInfo *FindClass(char *c);
 
 
    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;\
 #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)
    { 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);
 
   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);
 
 #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
 };
 
 #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
 #endif
 
 #endif