]> git.saurik.com Git - wxWidgets.git/blobdiff - interface/wx/dynarray.h
compilation fix for wxUSE_STL build after latest changes
[wxWidgets.git] / interface / wx / dynarray.h
index 4046bc52301059dd7d1023b8ade23963a981e155..84c4e16e0ab80ed3ca42d453ec983f22fdd2ea0b 100644 (file)
     @section array_predef Predefined array types
 
     wxWidgets defines the following dynamic array types:
-    - wxArrayShort
-    - wxArrayInt
-    - wxArrayDouble
-    - wxArrayLong
-    - wxArrayPtrVoid
+    - ::wxArrayShort
+    - ::wxArrayInt
+    - ::wxArrayDouble
+    - ::wxArrayLong
+    - ::wxArrayPtrVoid
 
     To use them you don't need any macro; you just need to include @c dynarray.h.
 
 
     @see @ref overview_container, wxList<T>, wxVector<T>
 */
+template <typename T>
 class wxArray<T>
 {
 public:
@@ -552,7 +553,7 @@ public:
         See also WX_CLEAR_ARRAY() macro which deletes all elements of a wxArray
         (supposed to contain pointers).
     */
-    Remove(T item);
+    void Remove(T item);
 
     /**
         Removes @a count elements starting at @a index from the array. When an
@@ -570,7 +571,7 @@ public:
         See also WX_CLEAR_ARRAY() macro which deletes all elements of a wxArray
         (supposed to contain pointers).
     */
-    RemoveAt(size_t index, size_t count = 1);
+    void RemoveAt(size_t index, size_t count = 1);
 
     //@}
 
@@ -595,6 +596,7 @@ public:
               another, identical, element is in the array.
     */
     int Index(T& item, bool searchFromEnd = false) const;
+
     /**
         This version of Index() is for wxSortedArray only.
 
@@ -603,7 +605,7 @@ public:
         @c wxNOT_FOUND is returned if the element is not found, otherwise the
         index of the element is returned.
     */
-    const int Index(T& item) const;
+    int Index(T& item) const;
 
     /**
         Search for a place to insert @a item into the sorted array (binary
@@ -794,3 +796,13 @@ public:
 */
 #define WX_PREPEND_ARRAY(wxArray_arrayToModify, wxArray_arrayToBePrepended)
 
+//@{
+/**
+    Predefined specialization of wxArray<T> for standard types.
+*/
+typedef wxArray<int> wxArrayInt;
+typedef wxArray<long> wxArrayLong;
+typedef wxArray<short> wxArrayShort;
+typedef wxArray<double> wxArrayDouble;
+typedef wxArray<void*> wxArrayPtrVoid;
+//@}