X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/382f12e41917abf78fb7f00d786c7ead112e4df4..d3fa4bc22e84e3ca4d88cc1772f2d414140a1017:/interface/wx/arrstr.h?ds=sidebyside diff --git a/interface/wx/arrstr.h b/interface/wx/arrstr.h index 228126f769..2a00a1b03a 100644 --- a/interface/wx/arrstr.h +++ b/interface/wx/arrstr.h @@ -3,7 +3,7 @@ // Purpose: interface of wxArrayString // Author: wxWidgets team // RCS-ID: $Id$ -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// /** @@ -41,7 +41,10 @@ a specialization of wxArray class for the wxString member data: it is not implemented like this, but it does have all of the wxArray functions. - @todo what about stl? how does it integrate? + It also has the full set of std::vector compatible + methods, including nested @c iterator and @c const_iterator classes which + should be used in the new code for forward compatibility with the future + wxWidgets versions. @library{wxbase} @category{containers} @@ -157,14 +160,20 @@ public: @see operator[] for the operator version. */ - wxString& Item(size_t nIndex) const; + //@{ + wxString& Item(size_t nIndex); + const wxString& Item(size_t nIndex) const; + //@} /** Returns the last element of the array. Attempt to access the last element of an empty array will result in assert failure in debug build, however no checks are done in release mode. */ - wxString& Last() const; + //@{ + wxString& Last(); + const wxString& Last() const; + //@} /** Removes the first item matching this value. An assert failure is provoked by @@ -276,10 +285,12 @@ class wxSortedArrayString : public wxArrayString public: /** - Copy constructor. Note that when an array is assigned to a sorted array, - its contents is automatically sorted during construction. + Conversion constructor. + + Constructs a sorted array with the same contents as the (possibly + unsorted) "array" argument. */ - wxArrayString(const wxArrayString& array); + wxSortedArrayString(const wxArrayString& array); /** @copydoc wxArrayString::Add() @@ -305,6 +316,8 @@ public: @warning This function should not be used with sorted arrays because it could break the order of items and, for example, subsequent calls to Index() would then not work! + + @warning In STL mode, Insert is private and simply invokes wxFAIL_MSG. */ void Insert(const wxString& str, size_t nIndex, size_t copies = 1); @@ -315,6 +328,8 @@ public: break the order of items and, for example, subsequent calls to Index() would then not work! Also, sorting a wxSortedArrayString doesn't make sense because its elements are always already sorted. + + @warning In STL mode, Sort is private and simply invokes wxFAIL_MSG. */ void Sort(bool reverseOrder = false); void Sort(CompareFunction compareFunction);