X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/df5168c427b51f1ab2b3200a5c8f7626b3d24aae..ff1b5f81af5dce8dac0c134f0e01adffc5334347:/include/wx/arrstr.h diff --git a/include/wx/arrstr.h b/include/wx/arrstr.h index 9573613632..de3508e9c8 100644 --- a/include/wx/arrstr.h +++ b/include/wx/arrstr.h @@ -15,17 +15,20 @@ #include "wx/defs.h" #include "wx/string.h" -int WXDLLIMPEXP_BASE wxStringSortAscending(wxString*, wxString*); -int WXDLLIMPEXP_BASE wxStringSortDescending(wxString*, wxString*); +WXDLLIMPEXP_BASE int wxStringSortAscending(wxString*, wxString*); +WXDLLIMPEXP_BASE int wxStringSortDescending(wxString*, wxString*); #if wxUSE_STL #include "wx/dynarray.h" typedef int (*CMPFUNCwxString)(wxString*, wxString*); -WX_DECLARE_EXPORTED_BASEARRAY(wxString, wxBaseArrayStringBase); -WX_DEFINE_EXPORTED_TYPEARRAY(wxString, wxArrayStringBase, - wxBaseArrayStringBase); +typedef wxString _wxArraywxBaseArrayStringBase; +_WX_DECLARE_BASEARRAY_2(_wxArraywxBaseArrayStringBase, wxBaseArrayStringBase, + wxArray_SortFunction, + class WXDLLIMPEXP_BASE); +WX_DEFINE_USER_EXPORTED_TYPEARRAY(wxString, wxArrayStringBase, + wxBaseArrayStringBase, WXDLLIMPEXP_BASE); _WX_DEFINE_SORTED_TYPEARRAY_2(wxString, wxSortedArrayStringBase, wxBaseArrayStringBase, = wxStringSortAscending, class WXDLLIMPEXP_BASE, CMPFUNCwxString); @@ -35,6 +38,8 @@ class WXDLLIMPEXP_BASE wxArrayString : public wxArrayStringBase public: wxArrayString() { } wxArrayString(const wxArrayString& a) : wxArrayStringBase(a) { } + + int Index(const wxChar* sz, bool bCase = true, bool bFromEnd = false) const; }; class WXDLLIMPEXP_BASE wxSortedArrayString : public wxSortedArrayStringBase @@ -53,6 +58,8 @@ public: for ( size_t n = 0; n < src.size(); n++ ) Add(src[n]); } + + int Index(const wxChar* sz, bool bCase = true, bool bFromEnd = false) const; }; #else // if !wxUSE_STL @@ -201,9 +208,9 @@ public: // FIXME: same in dynarray.h class reverse_iterator { - typedef wxArrayString name; - typedef name::reference reference; - typedef name::pointer pointer; + typedef wxString value_type; + typedef value_type* pointer; + typedef value_type& reference; typedef reverse_iterator itor; friend itor operator+(int o, const itor& it); friend itor operator+(const itor& it, int o); @@ -227,9 +234,9 @@ public: class const_reverse_iterator { - typedef wxArrayString name; - typedef name::const_reference reference; - typedef name::const_pointer pointer; + typedef wxString value_type; + typedef const value_type* pointer; + typedef const value_type& reference; typedef const_reverse_iterator itor; friend itor operator+(int o, const itor& it); friend itor operator+(const itor& it, int o);