just to write
\begin{verbatim}
-WX_DEFINE_ARRAY(int, ArrayOfDirectories);
-WX_DEFINE_SORTED_ARRAY(int, ArrayOfFiles);
+WX_DEFINE_ARRAY_INT(int, ArrayOfInts);
+WX_DEFINE_SORTED_ARRAY_INT(int, ArrayOfSortedInts);
\end{verbatim}
i.e. there is only one {\tt DEFINE} macro and no need for separate
Example:
\begin{verbatim}
-WX_DEFINE_ARRAY_INT(int, wxArrayInt);
+WX_DEFINE_ARRAY_INT(int, MyArrayInt);
class MyClass;
-WX_DEFINE_ARRAY(MyClass *, wxArrayOfMyClass);
+WX_DEFINE_ARRAY(MyClass *, ArrayOfMyClass);
\end{verbatim}
Note that wxWidgets predefines the following standard array classes: wxArrayInt,
Example:
\begin{verbatim}
-WX_DEFINE_SORTED_ARRAY_INT(wxSortedArrayInt);
+WX_DEFINE_SORTED_ARRAY_INT(int, MySortedArrayInt);
class MyClass;
-WX_DEFINE_SORTED_ARRAY(MyClass *, wxArrayOfMyClass);
+WX_DEFINE_SORTED_ARRAY(MyClass *, ArrayOfMyClass);
\end{verbatim}
You will have to initialize the objects of this class by passing a comparison
Preallocates memory for a given number of array elements. It is worth calling
when the number of items which are going to be added to the array is known in
advance because it will save unneeded memory reallocation. If the array already
-has enough memory for the given number of items, nothing happens.
+has enough memory for the given number of items, nothing happens. In any case,
+the existing contents of the array is not modified.
\membersection{wxArray::Clear}\label{wxarrayclear}
\membersection{wxArray::Index}\label{wxarrayindex}
-\func{int}{Index}{\param{T\& }{item}, \param{bool }{searchFromEnd = false}}
+\constfunc{int}{Index}{\param{T\& }{item}, \param{bool }{searchFromEnd = false}}
-\func{int}{Index}{\param{T\& }{item}}
+\constfunc{int}{Index}{\param{T\& }{item}}
The first version of the function is for wxArray and wxObjArray, the second is
for wxSortedArray only.
passed to it is less than, equal to or greater than the second one.
wxSortedArray doesn't have this function because it is always sorted.
+