]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/vector.tex
typo
[wxWidgets.git] / docs / latex / wx / vector.tex
CommitLineData
44f2a3d1
RR
1\section{\class{wxVector<T>}}\label{wxvector}
2
a6acecec
RR
3wxVector<T> is a template class which implements most of the std::vector
4class and can be used like it. If wxWidgets is compiled in STL mode,
5wxVector will just be a typedef to std::vector. Just like for std::vector,
6objects stored in wxVector<T> need to be {\it assignable} but don't have to
7be {\it default constructible}.
8
9You can refer to the STL documentation for further information.
44f2a3d1
RR
10
11\wxheading{Derived from}
12
13No base class
14
15\wxheading{Include files}
16
17<vector.h>
18
19\wxheading{See also}
20
21\helpref{Container classes overview}{wxcontaineroverview},
22\helpref{wxList<T>}{wxlist},
6bb29886 23\helpref{wxArray<T>}{wxarray}
44f2a3d1
RR
24
25\membersection{wxVector<T>::wxVector<T>}\label{wxvectorwxvector}
26
27\func{}{wxVector<T>}{\void}
28
29\func{}{wxVector<T>}{\param{const wxVector<T>\& }{c}}
30
31Constructor.
32
33\membersection{wxVector<T>::\destruct{wxVector<T>}}\label{wxvectordtor}
34
35\func{}{\destruct{wxVector<T>}}{\void}
36
37Destructor.
38
39\membersection{wxVector<T>::operator=}\label{wxvectoroperatorassign}
40
41\func{wxVector<T>\& operator}{operator=}{\param{const wxVector<T>\& }{vb}}
42
6bb29886 43Assignment operator.
44f2a3d1
RR
44
45\membersection{wxVector<T>::at}\label{wxvectorat}
46
47\constfunc{const value\_type\&}{at}{\param{size\_type }{idx}}
48
49\func{value\_type\&}{at}{\param{size\_type }{idx}}
50
51Returns item at position {\it idx}.
52
53\membersection{wxVector<T>::back}\label{wxvectorback}
54
55\constfunc{const value\_type\&}{back}{\void}
56
57\func{value\_type\&}{back}{\void}
58
59Return last item.
60
61\membersection{wxVector<T>::begin}\label{wxvectorbegin}
62
63\constfunc{const\_iterator}{begin}{\void}
64
65\func{iterator}{begin}{\void}
66
67Return iterator to beginning of the vector.
68
69\membersection{wxVector<T>::capacity}\label{wxvectorcapacity}
70
71\constfunc{size\_type}{capacity}{\void}
72
73
74\membersection{wxVector<T>::clear}\label{wxvectorclear}
75
76\func{void}{clear}{\void}
77
78Clears the vector.
79
80\membersection{wxVector<T>::empty}\label{wxvectorempty}
81
82\constfunc{bool}{empty}{\void}
83
84Returns true if the vector is empty.
85
86\membersection{wxVector<T>::end}\label{wxvectorend}
87
88\constfunc{const\_iterator}{end}{\void}
89
90\func{iterator}{end}{\void}
91
92Returns iterator to the end of the vector.
93
94\membersection{wxVector<T>::erase}\label{wxvectorerase}
95
96\func{iterator}{erase}{\param{iterator }{it}}
97
98\func{iterator}{erase}{\param{iterator }{first}, \param{iterator }{last}}
99
6bb29886
RR
100Erase items. When using values other than built-in integrals
101or classes with reference counting this can be an inefficient
102operation.
44f2a3d1
RR
103
104\membersection{wxVector<T>::front}\label{wxvectorfront}
105
106\constfunc{const value\_type\&}{front}{\void}
107
108\func{value\_type\&}{front}{\void}
109
110Returns first item.
111
112\membersection{wxVector<T>::insert}\label{wxvectorinsert}
113
114\func{iterator}{insert}{\param{iterator }{it}, \param{const value\_type\& }{v = value\_type()}}
115
116Insert an item. When using values other than built-in integrals
6bb29886 117or classes with reference counting this can be an inefficient
44f2a3d1
RR
118operation.
119
120\membersection{wxVector<T>::operator[]}\label{wxvectoroperatorunknown}
121
122\constfunc{const value\_type\&}{operator[]}{\param{size\_type }{idx}}
123
124\func{value\_type\&}{operator[]}{\param{size\_type }{idx}}
125
126Returns item at position {\it idx}.
127
128\membersection{wxVector<T>::pop\_back}\label{wxvectorpopback}
129
130\func{void}{pop\_back}{\void}
131
132Removes the last item.
133
134\membersection{wxVector<T>::push\_back}\label{wxvectorpushback}
135
136\func{void}{push\_back}{\param{const value\_type\& }{v}}
137
138Adds an item to the end of the vector.
139
140\membersection{wxVector<T>::reserve}\label{wxvectorreserve}
141
142\func{void}{reserve}{\param{size\_type }{n}}
143
144Reserves more memory of {\it n} is greater then
145\helpref{size}{wxvectorsize}. Other this call has
146no effect.
147
148\membersection{wxVector<T>::size}\label{wxvectorsize}
149
150\constfunc{size\_type}{size}{\void}
151
152Returns the size of the vector.