Fixes for bugs #1218219 and #1218254.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36191 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba
2005-11-17 14:36:32 +00:00
parent 8b0df0e138
commit 1ac74d83a3
2 changed files with 50 additions and 30 deletions

View File

@@ -1,3 +1,14 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Name: array.tex
%% Purpose: wxArray
%% Author: wxWidgets Team
%% Modified by:
%% Created:
%% RCS-ID: $Id$
%% Copyright: (c) wxWidgets Team
%% License: wxWindows license
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{\class{wxArray}}\label{wxarray}
This section describes the so called {\it dynamic arrays}. This is a C
@@ -161,7 +172,11 @@ default for the array iterators by these macros only makes sense if the array
element type is not a pointer itself and, although it still works, this
provokes warnings from some compilers and to avoid them you should use the
{\tt \_PTR} versions of the macros above. For example, to define an array of
pointers to {\tt double} you should use.
pointers to {\tt double} you should use:
\begin{verbatim}
WX_DEFINE_ARRAY_PTR(double *, MyArrayOfDoublePointers);
\end{verbatim}
Note that the above macros are generally only useful for
wxObject types. There are separate macros for declaring an array of a simple type,
@@ -185,10 +200,6 @@ For example, for an integer array, you'd use one of the following variants:
\helpref{WX\_DEFINE\_SORTED\_EXPORTED\_ARRAY\_INT}{wxdefinesortedarray}\\
\helpref{WX\_DEFINE\_SORTED\_USER\_EXPORTED\_ARRAY\_INT}{wxdefinesortedarray}\\
\begin{verbatim}
WX_DEFINE_ARRAY_PTR(double *, MyArrayOfDoublePointers);
\end{verbatim}
\membersection{Constructors and destructors}\label{arrayconstructorsdestructors}
Array classes are 100\% C++ objects and as such they have the appropriate copy
@@ -277,7 +288,7 @@ needed for exporting an array from a user DLL.
Example:
\begin{verbatim}
WX_DEFINE_ARRAY_INT(wxArrayInt);
WX_DEFINE_ARRAY_INT(int, wxArrayInt);
class MyClass;
WX_DEFINE_ARRAY(MyClass *, wxArrayOfMyClass);
@@ -668,4 +679,3 @@ return a negative, zero or positive value according to whether the first element
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.

View File

@@ -1,3 +1,14 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Name: list.tex
%% Purpose: wxList
%% Author: wxWidgets Team
%% Modified by:
%% Created:
%% RCS-ID: $Id$
%% Copyright: (c) wxWidgets Team
%% License: wxWindows license
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{\class{wxList}}\label{wxlist}
wxList classes provide linked list functionality for wxWidgets, and for an
@@ -51,7 +62,7 @@ macros):
// also have MyList::Node type which is the type-safe version of wxNode.
MyList list;
MyListElement element;
list.Append(element); // ok
list.Append(&element); // ok
list.Append(17); // error: incorrect type
// let's iterate over the list
@@ -343,4 +354,3 @@ Example:
list.Sort(listcompare);
}
\end{verbatim}