// Purpose: interface of wxArrayString
// Author: wxWidgets team
// RCS-ID: $Id$
-// Licence: wxWindows license
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
/**
@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
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()
@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);
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);