-typedef int (CMPFUNC_CONV *CMPFUNC##T)(T *pItem1, T *pItem2); \
-classexp name : public base \
-{ \
-public: \
- T& operator[](size_t uiIndex) const \
- { return (T&)(base::operator[](uiIndex)); } \
- T& Item(size_t uiIndex) const \
- { return (T&)/*const cast*/base::operator[](uiIndex); } \
- T& Last() const \
- { return Item(Count() - 1); } \
- \
- int Index(T e, bool bFromEnd = FALSE) const \
- { return base::Index(e, bFromEnd); } \
- \
- void Add(T Item, size_t nInsert = 1) \
- { insert(end(), nInsert, Item); } \
- void Insert(T Item, size_t uiIndex, size_t nInsert = 1) \
- { insert(begin() + uiIndex, nInsert, Item); } \
- \
- void RemoveAt(size_t uiIndex, size_t nRemove = 1) \
- { base::RemoveAt(uiIndex, nRemove); } \
- void Remove(T Item) \
- { int iIndex = Index(Item); \
- wxCHECK2_MSG( iIndex != wxNOT_FOUND, return, \
- _WX_ERROR_REMOVE); \
- RemoveAt((size_t)iIndex); } \
- \
- void Sort(CMPFUNC##T fCmp) { base::Sort((CMPFUNC)fCmp); } \
-}
+ _WX_DECLARE_BASEARRAY(T, name, classexp)
+
+#define _WX_DEFINE_TYPEARRAY_PTR(T, name, base, classexp) \
+ _WX_DEFINE_TYPEARRAY(T, name, base, classexp)