• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/amule/wxWidgets-2.8.12/docs/latex/wx/

Lines Matching refs:array

2 %% Name:        array.tex
7 %% RCS-ID: $Id: array.tex 43029 2006-11-04 12:42:03Z VZ $
15 array-like data structure i.e. the member access time is constant (and not
23 automatically expand the array but provokes an assertion failure instead in
27 The array classes were designed to be reasonably efficient, both in terms of
29 array item access is, of course, constant (independent of the number of elements)
36 wxWidgets has three different kinds of array. All of them derive from
49 deleted when the element is removed from the array. It should be noted that
51 many array types as you want (either in terms of the executable size or the
63 array is a frequently used operation. It requires you to define an additional
64 function for comparing two elements of the array element type and always stores
70 an array much less often than searched inside it, so wxSortedArray may lead to
76 they are removed from the array (invoking the correct destructor) and copies
81 <wx/arrimpl.cpp> and define the array class with WX\_DEFINE\_OBJARRAY() macro
82 from a point where the full (as opposed to `forward') declaration of the array
89 // we must forward declare the array because it is used inside the class
139 type, e.g. shorts, in an array of larger one, e.g. {\tt ARRAY\_INT}, does
154 \membersection{Macros for template array definition}\label{arraymacros}
156 To use an array you must first define the array class. This is done with the
157 help of the macros in this section. The class of array elements must be (at
175 default for the array iterators by these macros only makes sense if the array
178 {\tt \_PTR} versions of the macros above. For example, to define an array of
186 wxObject types. There are separate macros for declaring an array of a simple type,
195 To create an array of a simple type, simply append the type you want in CAPS to
196 the array definition.
198 For example, for an integer array, you'd use one of the following variants:
216 derive your own classes from the array classes.
224 Automatic array memory management is quite trivial: the array starts by
234 going to put in the array and will prevent the array code from reallocating the
242 Functions in this section return the total number of array elements and allow to
243 retrieve them - possibly using just the C array indexing $[]$ operator which
288 This macro defines a new array class named {\it name} and containing the
290 a DLL under Windows and array needs to be visible outside the DLL. The third is
291 needed for exporting an array from a user DLL.
302 Note that wxWidgets predefines the following standard array classes: wxArrayInt,
313 This macro defines a new sorted array class named {\it name} and containing
315 a DLL under Windows and array needs to be visible outside the DLL. The third is
316 needed for exporting an array from a user DLL.
328 function to the array object constructor like this:
355 This macro declares a new object array class named {\it name} and containing
357 a DLL under Windows and array needs to be visible outside the DLL. The third is
358 needed for exporting an array from a user DLL.
368 the array class - otherwise you would get link errors.
378 This macro defines the methods of the array class {\it name} not defined by the
381 declaration of the class of array elements in scope! If you forget to do the
408 \func{void}{WX\_APPEND\_ARRAY}{\param{wxArray\& }{array}, \param{wxArray\& }{other}}
410 This macro may be used to append all elements of the {\it other} array to the
411 {\it array}. The two arrays must be of the same type.
415 \func{void}{WX\_PREPEND\_ARRAY}{\param{wxArray\& }{array}, \param{wxArray\& }{other}}
417 This macro may be used to prepend all elements of the {\it other} array to the
418 {\it array}. The two arrays must be of the same type.
422 \func{void}{WX\_CLEAR\_ARRAY}{\param{wxArray\& }{array}}
424 This macro may be used to delete all elements of the array before emptying it.
434 Default constructor initializes an empty array object.
440 two arguments of type {\it T} where {\it T} is the array element type and which
446 \func{}{wxArray}{\param{const wxArray\& }{array}}
448 \func{}{wxSortedArray}{\param{const wxSortedArray\& }{array}}
450 \func{}{wxObjArray}{\param{const wxObjArray\& }{array}}
452 \func{wxArray\&}{operator$=$}{\param{const wxArray\& }{array}}
454 \func{wxSortedArray\&}{operator$=$}{\param{const wxSortedArray\& }{array}}
456 \func{wxObjArray\&}{operator$=$}{\param{const wxObjArray\& }{array}}
458 The copy constructors and assignment operators perform a shallow array copy
459 (i.e. they don't copy the objects pointed to even if the source array contains
461 the array element are copied too) for wxObjArray.
471 The wxObjArray destructor deletes all the items owned by the array. This is not
483 Appends the given number of {\it copies} of the {\it item} to the array
488 them: if you give a pointer to the array, it will take ownership of it, i.e.
489 will delete it when the item is deleted from the array. If you give a reference
490 to the array, however, the array will make a copy of the item and will not take
492 because the other array types never take ownership of their elements. Also note
497 elements of one array to another one but it is more efficient to use
505 Preallocates memory for a given number of array elements. It is worth calling
506 when the number of items which are going to be added to the array is known in
507 advance because it will save unneeded memory reallocation. If the array already
509 the existing contents of the array is not modified.
516 frees the memory allocated to the array.
529 Removes the element from the array, but, unlike,
537 Empties the array. For wxObjArray classes, this destroys all of the array
539 array of being empty - this function does not free the allocated memory, use
546 Return the number of items in the array.
557 Searches the element in the array, starting from either beginning or the end
563 in the sorted array is used for wxSortedArray (this is why searchFromEnd
567 array is {\bf not} used by this function. It searches exactly the given
568 element in the array and so will only succeed if this element had been
569 previously added to the array, but fail even if another, identical, element is
570 in the array.
580 Insert the given number of {\it copies} of the {\it item} into the array before
582 item in such way that it will become the first array element.
591 Returns true if the array is empty, false otherwise.
597 Returns the item at the given position in the array. If {\it index} is out of
601 The returned value is of type "reference to the array element type" for all of
602 the array classes.
608 Returns the last element in the array, i.e. is the same as Item(GetCount() - 1).
609 An assert failure is raised in the debug mode if the array is empty.
611 The returned value is of type "reference to the array element type" for all of
612 the array classes.
618 Removes an element from the array by value: the first item of the
619 array equal to {\it item} is removed, an assert failure will result from an
620 attempt to remove an item which doesn't exist in the array.
622 When an element is removed from wxObjArray it is deleted by the array - use
628 T *item = array[n];
630 array.Remove(n)
640 Removes {\it count} elements starting at {\it index} from the array. When an
641 element is removed from wxObjArray it is deleted by the array - use
647 T *item = array[n];
649 array.RemoveAt(n)
659 This function ensures that the number of array elements is at least
660 {\it count}. If the array has already {\it count} or more items, nothing is
672 Frees all memory unused by the array. If the program knows that no new items
673 will be added to the array it may call Shrink() to reduce its memory usage.
674 However, if a new item is added to the array, some extra memory will be
687 where {\it T} is the type of the array elements. I.e. it is a function returning
690 Sorts the array using the specified compare function: this function should