This commit was manufactured by cvs2svn to create tag
'DEBIAN_2_4_3_1_SARGE_v_2_4_2_4'. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/tags/DEBIAN_2_4_3_1_SARGE_v_2_4_2_4@34395 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -22,7 +22,7 @@ but the price is preallocating the memory in advance. In the \helpref{memory man
|
||||
you may find some useful hints about optimizing wxArray memory usage. As for executable size, all
|
||||
wxArray functions are inline, so they do not take {\it any space at all}.
|
||||
|
||||
wxWindows has three different kinds of array. All of them derive from
|
||||
wxWidgets has three different kinds of array. All of them derive from
|
||||
wxBaseArray class which works with untyped data and can not be used directly.
|
||||
The standard macros WX\_DEFINE\_ARRAY(), WX\_DEFINE\_SORTED\_ARRAY() and
|
||||
WX\_DEFINE\_OBJARRAY() are used to define a new class deriving from it. The
|
||||
@@ -39,14 +39,14 @@ deleted when the element is removed from the array. It should be noted that
|
||||
all of wxArray's functions are inline, so it costs strictly nothing to define as
|
||||
many array types as you want (either in terms of the executable size or the
|
||||
speed) as long as at least one of them is defined and this is always the case
|
||||
because wxArrays are used by wxWindows internally. This class has one serious
|
||||
because wxArrays are used by wxWidgets internally. This class has one serious
|
||||
limitation: it can only be used for storing integral types (bool, char, short,
|
||||
int, long and their unsigned variants) or pointers (of any kind). An attempt
|
||||
to use with objects of sizeof() greater than sizeof(long) will provoke a
|
||||
runtime assertion failure, however declaring a wxArray of floats will not (on
|
||||
the machines where sizeof(float) <= sizeof(long)), yet it will {\bf not} work,
|
||||
please use wxObjArray for storing floats and doubles (NB: a more efficient
|
||||
wxArrayDouble class is scheduled for the next release of wxWindows).
|
||||
wxArrayDouble class is scheduled for the next release of wxWidgets).
|
||||
|
||||
wxSortedArray is a wxArray variant which should be used when searching in the
|
||||
array is a frequently used operation. It requires you to define an additional
|
||||
@@ -232,7 +232,7 @@ does exactly the same as \helpref{Item()}{wxarrayitem} method.
|
||||
\func{}{WX\_DEFINE\_USER\_EXPORTED\_ARRAY}{\param{}{T}, \param{}{name}, \param{}{exportspec}}
|
||||
|
||||
This macro defines a new array class named {\it name} and containing the
|
||||
elements of type {\it T}. The second form is used when compiling wxWindows as
|
||||
elements of type {\it T}. The second form is used when compiling wxWidgets as
|
||||
a DLL under Windows and array needs to be visible outside the DLL. The third is
|
||||
needed for exporting an array from a user DLL.
|
||||
|
||||
@@ -245,7 +245,7 @@ class MyClass;
|
||||
WX_DEFINE_ARRAY(MyClass *, wxArrayOfMyClass);
|
||||
\end{verbatim}
|
||||
|
||||
Note that wxWindows predefines the following standard array classes: wxArrayInt,
|
||||
Note that wxWidgets predefines the following standard array classes: wxArrayInt,
|
||||
wxArrayLong and wxArrayPtrVoid.
|
||||
|
||||
\membersection{WX\_DEFINE\_SORTED\_ARRAY}\label{wxdefinesortedarray}
|
||||
@@ -257,7 +257,7 @@ wxArrayLong and wxArrayPtrVoid.
|
||||
\func{}{WX\_DEFINE\_SORTED\_USER\_EXPORTED\_ARRAY}{\param{}{T}, \param{}{name}}
|
||||
|
||||
This macro defines a new sorted array class named {\it name} and containing
|
||||
the elements of type {\it T}. The second form is used when compiling wxWindows as
|
||||
the elements of type {\it T}. The second form is used when compiling wxWidgets as
|
||||
a DLL under Windows and array needs to be visible outside the DLL. The third is
|
||||
needed for exporting an array from a user DLL.
|
||||
|
||||
@@ -299,7 +299,7 @@ wxArrayOfMyClass another(CompareMyClassObjects);
|
||||
\func{}{WX\_DECLARE\_USER\_EXPORTED\_OBJARRAY}{\param{}{T}, \param{}{name}}
|
||||
|
||||
This macro declares a new object array class named {\it name} and containing
|
||||
the elements of type {\it T}. The second form is used when compiling wxWindows as
|
||||
the elements of type {\it T}. The second form is used when compiling wxWidgets as
|
||||
a DLL under Windows and array needs to be visible outside the DLL. The third is
|
||||
needed for exporting an array from a user DLL.
|
||||
|
||||
|
Reference in New Issue
Block a user