1 \section{\class{wxVector<T>
}}\label{wxvector
}
3 wxVector<T> is a template class which implements most of the std::vector
4 class and can be used like it. If wxWidgets is compiled in STL mode,
5 wxVector will just be a typedef to std::vector. Just like for std::vector,
6 objects stored in wxVector<T> need to be
{\it assignable
} but don't have to
7 be
{\it default constructible
}.
9 You can refer to the STL documentation for further information.
11 \wxheading{Derived from
}
15 \wxheading{Include files
}
21 \helpref{Container classes overview
}{wxcontaineroverview
},
22 \helpref{wxList<T>
}{wxlist
},
23 \helpref{wxArray<T>
}{wxarray
}
25 \membersection{wxVector<T>::wxVector<T>
}\label{wxvectorwxvector
}
27 \func{}{wxVector<T>
}{\void}
29 \func{}{wxVector<T>
}{\param{const wxVector<T>\&
}{c
}}
33 \membersection{wxVector<T>::
\destruct{wxVector<T>
}}\label{wxvectordtor
}
35 \func{}{\destruct{wxVector<T>
}}{\void}
39 \membersection{wxVector<T>::operator=
}\label{wxvectoroperatorassign
}
41 \func{wxVector<T>\& operator
}{operator=
}{\param{const wxVector<T>\&
}{vb
}}
45 \membersection{wxVector<T>::at
}\label{wxvectorat
}
47 \constfunc{const value
\_type\&
}{at
}{\param{size
\_type }{idx
}}
49 \func{value
\_type\&
}{at
}{\param{size
\_type }{idx
}}
51 Returns item at position
{\it idx
}.
53 \membersection{wxVector<T>::back
}\label{wxvectorback
}
55 \constfunc{const value
\_type\&
}{back
}{\void}
57 \func{value
\_type\&
}{back
}{\void}
61 \membersection{wxVector<T>::begin
}\label{wxvectorbegin
}
63 \constfunc{const
\_iterator}{begin
}{\void}
65 \func{iterator
}{begin
}{\void}
67 Return iterator to beginning of the vector.
69 \membersection{wxVector<T>::capacity
}\label{wxvectorcapacity
}
71 \constfunc{size
\_type}{capacity
}{\void}
74 \membersection{wxVector<T>::clear
}\label{wxvectorclear
}
76 \func{void
}{clear
}{\void}
80 \membersection{wxVector<T>::empty
}\label{wxvectorempty
}
82 \constfunc{bool
}{empty
}{\void}
84 Returns true if the vector is empty.
86 \membersection{wxVector<T>::end
}\label{wxvectorend
}
88 \constfunc{const
\_iterator}{end
}{\void}
90 \func{iterator
}{end
}{\void}
92 Returns iterator to the end of the vector.
94 \membersection{wxVector<T>::erase
}\label{wxvectorerase
}
96 \func{iterator
}{erase
}{\param{iterator
}{it
}}
98 \func{iterator
}{erase
}{\param{iterator
}{first
},
\param{iterator
}{last
}}
100 Erase items. When using values other than built-in integrals
101 or classes with reference counting this can be an inefficient
104 \membersection{wxVector<T>::front
}\label{wxvectorfront
}
106 \constfunc{const value
\_type\&
}{front
}{\void}
108 \func{value
\_type\&
}{front
}{\void}
112 \membersection{wxVector<T>::insert
}\label{wxvectorinsert
}
114 \func{iterator
}{insert
}{\param{iterator
}{it
},
\param{const value
\_type\&
}{v = value
\_type()
}}
116 Insert an item. When using values other than built-in integrals
117 or classes with reference counting this can be an inefficient
120 \membersection{wxVector<T>::operator
[]}\label{wxvectoroperatorunknown
}
122 \constfunc{const value
\_type\&
}{operator
[]}{\param{size
\_type }{idx
}}
124 \func{value
\_type\&
}{operator
[]}{\param{size
\_type }{idx
}}
126 Returns item at position
{\it idx
}.
128 \membersection{wxVector<T>::pop
\_back}\label{wxvectorpopback
}
130 \func{void
}{pop
\_back}{\void}
132 Removes the last item.
134 \membersection{wxVector<T>::push
\_back}\label{wxvectorpushback
}
136 \func{void
}{push
\_back}{\param{const value
\_type\&
}{v
}}
138 Adds an item to the end of the vector.
140 \membersection{wxVector<T>::reserve
}\label{wxvectorreserve
}
142 \func{void
}{reserve
}{\param{size
\_type }{n
}}
144 Reserves more memory of
{\it n
} is greater then
145 \helpref{size
}{wxvectorsize
}. Other this call has
148 \membersection{wxVector<T>::size
}\label{wxvectorsize
}
150 \constfunc{size
\_type}{size
}{\void}
152 Returns the size of the vector.