-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 lItem, size_t nInsert = 1) \
- { insert(end(), nInsert, lItem); } \
- void Insert(T lItem, size_t uiIndex, size_t nInsert = 1) \
- { insert(begin() + uiIndex, nInsert, lItem); } \
- \
- void RemoveAt(size_t uiIndex, size_t nRemove = 1) \
- { base::RemoveAt(uiIndex, nRemove); } \
- void Remove(T lItem) \
- { int iIndex = Index(lItem); \
- wxCHECK2_MSG( iIndex != wxNOT_FOUND, return, \
- _WX_ERROR_REMOVE); \
- RemoveAt((size_t)iIndex); } \
- \
- void Sort(CMPFUNC##T fCmp) { base::Sort((CMPFUNC)fCmp); } \
-}