X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5abefd049eaed7d83ed60ddf2750bea830ce06b6..52170c5b4419c63d6e0083df411aad420395ec98:/include/wx/list.h diff --git a/include/wx/list.h b/include/wx/list.h index 79f40cd077..a76ad27d29 100644 --- a/include/wx/list.h +++ b/include/wx/list.h @@ -54,7 +54,7 @@ extern "C" typedef int (* LINKAGEMODE wxSortCompareFunction)(const void *elem1, const void *elem2); } -class WXDLLIMPEXP_BASE wxObjectListNode; +class WXDLLIMPEXP_FWD_BASE wxObjectListNode; typedef wxObjectListNode wxNode; // @@ -91,12 +91,12 @@ private: }; #define WX_LIST_SORTFUNCTION( elT, f ) wxList_SortFunction(f) -#define VC6_WORKAROUND(elT, liT, decl) +#define WX_LIST_VC6_WORKAROUND(elT, liT, decl) #else // if defined( __VISUALC__ ) && __VISUALC__ < 1300 // == VC6 #define WX_LIST_SORTFUNCTION( elT, f ) std::greater( f ) -#define VC6_WORKAROUND(elT, liT, decl) \ +#define WX_LIST_VC6_WORKAROUND(elT, liT, decl) \ decl liT; \ \ /* Workaround for broken VC6 STL incorrectly requires a std::greater<> */ \ @@ -164,7 +164,7 @@ inline const void *wxListCastElementToVoidPtr(const wxString& str) static void DeleteFunction( _WX_LIST_ITEM_TYPE_##liT X ); \ }; \ \ - VC6_WORKAROUND(elT, liT, decl) \ + WX_LIST_VC6_WORKAROUND(elT, liT, decl) \ decl liT : public std::list \ { \ private: \ @@ -333,7 +333,7 @@ inline const void *wxListCastElementToVoidPtr(const wxString& str) ~liT() { Clear(); } \ \ /* It needs access to our EmptyList */ \ - friend decl compatibility_iterator; \ + friend class compatibility_iterator; \ } #define WX_DECLARE_LIST(elementtype, listname) \ @@ -425,7 +425,7 @@ private: extern WXDLLIMPEXP_DATA_BASE(wxListKey) wxDefaultListKey; -class WXDLLIMPEXP_BASE wxListBase; +class WXDLLIMPEXP_FWD_BASE wxListBase; class WXDLLIMPEXP_BASE wxNodeBase { @@ -487,11 +487,11 @@ private: // a double-linked list class // ----------------------------------------------------------------------------- -class WXDLLIMPEXP_BASE wxList; +class WXDLLIMPEXP_FWD_BASE wxList; -class WXDLLIMPEXP_BASE wxListBase : public wxObject +class WXDLLIMPEXP_BASE wxListBase { -friend class WXDLLIMPEXP_BASE wxNodeBase; // should be able to call DetachNode() +friend class wxNodeBase; // should be able to call DetachNode() friend class wxHashTableBase; // should be able to call untyped Find() public: @@ -1182,7 +1182,7 @@ public: #if !wxUSE_STL wxList& operator=(const wxList& list) - { (void) wxListBase::operator=(list); return *this; } + { Assign(list); return *this; } // compatibility methods void Sort(wxSortCompareFunction compfunc) { wxListBase::Sort(compfunc); } @@ -1192,11 +1192,6 @@ public: #else wxNode *Member(wxObject *object) const { return (wxNode *)Find(object); } #endif - -private: -#if !wxUSE_STL - DECLARE_DYNAMIC_CLASS(wxList) -#endif }; #if !wxUSE_STL @@ -1242,8 +1237,6 @@ public: private: void DoCopy(const wxStringList&); // common part of copy ctor and operator= - - DECLARE_DYNAMIC_CLASS(wxStringList) }; #else // if wxUSE_STL