]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/object.h
wxMessageBox off the main thread lost result code.
[wxWidgets.git] / include / wx / object.h
index ef260e496cecdc084104105c9cb3a996bc8004f0..04c6512254b4ba211b00fdc124164b5b7f79bd73 100644 (file)
@@ -4,7 +4,6 @@
 // Author:      Julian Smart
 // Modified by: Ron Lee
 // Created:     01/02/97
-// RCS-ID:      $Id$
 // Copyright:   (c) 1997 Julian Smart
 //              (c) 2001 Ron Lee <ron@debian.org>
 // Licence:     wxWindows licence
 
 #include "wx/memory.h"
 
+#define wxDECLARE_CLASS_INFO_ITERATORS()                                     \
+class WXDLLIMPEXP_BASE const_iterator                                    \
+    {                                                                        \
+    typedef wxHashTable_Node Node;                                       \
+    public:                                                                  \
+    typedef const wxClassInfo* value_type;                               \
+    typedef const value_type& const_reference;                           \
+    typedef const_iterator itor;                                         \
+    typedef value_type* ptr_type;                                        \
+    \
+    Node* m_node;                                                        \
+    wxHashTable* m_table;                                                \
+    public:                                                                  \
+    typedef const_reference reference_type;                              \
+    typedef ptr_type pointer_type;                                       \
+    \
+    const_iterator(Node* node, wxHashTable* table)                       \
+    : m_node(node), m_table(table) { }                               \
+    const_iterator() : m_node(NULL), m_table(NULL) { }                   \
+    value_type operator*() const;                                        \
+    itor& operator++();                                                  \
+    const itor operator++(int);                                          \
+    bool operator!=(const itor& it) const                                \
+            { return it.m_node != m_node; }                                  \
+            bool operator==(const itor& it) const                                \
+            { return it.m_node == m_node; }                                  \
+    };                                                                       \
+    \
+    static const_iterator begin_classinfo();                                 \
+    static const_iterator end_classinfo()
+
 // based on the value of wxUSE_EXTENDED_RTTI symbol,
 // only one of the RTTI system will be compiled:
 // - the "old" one (defined by rtti.h) or
@@ -164,9 +194,8 @@ inline T *wxCheckCast(const void *ptr, T * = NULL)
     #define _WX_WANT_DELETE_VOID_CONSTCHAR_SIZET
 #endif
 
-// Only VC++ 6 and CodeWarrior get overloaded delete that matches new
-#if (defined(__VISUALC__) && (__VISUALC__ >= 1200)) || \
-        (defined(__MWERKS__) && (__MWERKS__ >= 0x2400))
+// Only VC++ 6 gets overloaded delete that matches new
+#if (defined(__VISUALC__) && (__VISUALC__ >= 1200))
     #define _WX_WANT_DELETE_VOID_WXCHAR_INT
 #endif
 
@@ -182,12 +211,6 @@ inline T *wxCheckCast(const void *ptr, T * = NULL)
     #if !defined(__VISUALC__)
         #define _WX_WANT_ARRAY_DELETE_VOID
     #endif
-
-    // Only CodeWarrior 6 or higher
-    #if defined(__MWERKS__) && (__MWERKS__ >= 0x2400)
-        #define _WX_WANT_ARRAY_DELETE_VOID_WXCHAR_INT
-    #endif
-
 #endif // wxUSE_ARRAY_MEMORY_OPERATORS
 
 #endif // wxUSE_MEMORY_TRACING