]> git.saurik.com Git - wxWidgets.git/commitdiff
added wxRTTI macros to wxList and wxStringList
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 6 Feb 2002 01:38:08 +0000 (01:38 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 6 Feb 2002 01:38:08 +0000 (01:38 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14023 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/list.h
src/common/list.cpp

index cfccbf371d7a38344669439a93541bbfadce4f7a..e166f1423c339563fdcaf79b00417b5a5c5f59a8 100644 (file)
@@ -186,6 +186,7 @@ private:
 // -----------------------------------------------------------------------------
 // a double-linked list class
 // -----------------------------------------------------------------------------
+
 class WXDLLEXPORT wxListBase : public wxObject
 {
 friend class wxNodeBase;        // should be able to call DetachNode()
@@ -506,6 +507,9 @@ public:
     void Sort(wxSortCompareFunction compfunc) { wxListBase::Sort(compfunc); }
 
     wxNode *Member(wxObject *object) const { return (wxNode *)Find(object); }
+
+private:
+    DECLARE_DYNAMIC_CLASS(wxList)
 };
 
 // -----------------------------------------------------------------------------
@@ -543,6 +547,8 @@ public:
 
 private:
     void DoCopy(const wxStringList&); // common part of copy ctor and operator=
+
+    DECLARE_DYNAMIC_CLASS(wxStringList)
 };
 
 #endif // wxLIST_COMPATIBILITY
index 018d554addc56270f8ced71bb4366f1c4e401dde..e94aa517a827b61ba52324dec3c76594d229af5f 100644 (file)
@@ -532,10 +532,18 @@ void wxListBase::Sort(const wxSortCompareFunction compfunc)
     delete[] objArray;
 }
 
+// ============================================================================
+// compatibility section from now on
+// ============================================================================
+
+#ifdef wxLIST_COMPATIBILITY
+
 // -----------------------------------------------------------------------------
 // wxList (a.k.a. wxObjectList)
 // -----------------------------------------------------------------------------
 
+IMPLEMENT_DYNAMIC_CLASS(wxList, wxObject)
+
 void wxObjectListNode::DeleteData()
 {
     delete (wxObject *)GetData();
@@ -545,6 +553,8 @@ void wxObjectListNode::DeleteData()
 // wxStringList
 // -----------------------------------------------------------------------------
 
+IMPLEMENT_DYNAMIC_CLASS(wxStringList, wxObject)
+
 // instead of WX_DEFINE_LIST(wxStringListBase) we define this function
 // ourselves
 void wxStringListNode::DeleteData()
@@ -670,3 +680,6 @@ void wxStringList::Sort()
 
     delete [] array;
 }
+
+#endif // wxLIST_COMPATIBILITY
+