git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14023
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// -----------------------------------------------------------------------------
// a double-linked list class
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
// a double-linked list class
// -----------------------------------------------------------------------------
class WXDLLEXPORT wxListBase : public wxObject
{
friend class wxNodeBase; // should be able to call DetachNode()
class WXDLLEXPORT wxListBase : public wxObject
{
friend class wxNodeBase; // should be able to call DetachNode()
void Sort(wxSortCompareFunction compfunc) { wxListBase::Sort(compfunc); }
wxNode *Member(wxObject *object) const { return (wxNode *)Find(object); }
void Sort(wxSortCompareFunction compfunc) { wxListBase::Sort(compfunc); }
wxNode *Member(wxObject *object) const { return (wxNode *)Find(object); }
+
+private:
+ DECLARE_DYNAMIC_CLASS(wxList)
};
// -----------------------------------------------------------------------------
};
// -----------------------------------------------------------------------------
private:
void DoCopy(const wxStringList&); // common part of copy ctor and operator=
private:
void DoCopy(const wxStringList&); // common part of copy ctor and operator=
+
+ DECLARE_DYNAMIC_CLASS(wxStringList)
};
#endif // wxLIST_COMPATIBILITY
};
#endif // wxLIST_COMPATIBILITY
+// ============================================================================
+// compatibility section from now on
+// ============================================================================
+
+#ifdef wxLIST_COMPATIBILITY
+
// -----------------------------------------------------------------------------
// wxList (a.k.a. wxObjectList)
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
// wxList (a.k.a. wxObjectList)
// -----------------------------------------------------------------------------
+IMPLEMENT_DYNAMIC_CLASS(wxList, wxObject)
+
void wxObjectListNode::DeleteData()
{
delete (wxObject *)GetData();
void wxObjectListNode::DeleteData()
{
delete (wxObject *)GetData();
// wxStringList
// -----------------------------------------------------------------------------
// wxStringList
// -----------------------------------------------------------------------------
+IMPLEMENT_DYNAMIC_CLASS(wxStringList, wxObject)
+
// instead of WX_DEFINE_LIST(wxStringListBase) we define this function
// ourselves
void wxStringListNode::DeleteData()
// instead of WX_DEFINE_LIST(wxStringListBase) we define this function
// ourselves
void wxStringListNode::DeleteData()
+
+#endif // wxLIST_COMPATIBILITY
+