]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/vector.tex
better documentation for wxWindow::SetSizerAndFit()
[wxWidgets.git] / docs / latex / wx / vector.tex
1 \section{\class{wxVector<T>}}\label{wxvector}
2
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}.
8
9 You can refer to the STL documentation for further information.
10
11 \wxheading{Derived from}
12
13 No 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},
23 \helpref{wxArray<T>}{wxarray}
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
31 Constructor.
32
33 \membersection{wxVector<T>::\destruct{wxVector<T>}}\label{wxvectordtor}
34
35 \func{}{\destruct{wxVector<T>}}{\void}
36
37 Destructor.
38
39 \membersection{wxVector<T>::operator=}\label{wxvectoroperatorassign}
40
41 \func{wxVector<T>\& operator}{operator=}{\param{const wxVector<T>\& }{vb}}
42
43 Assignment operator.
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
51 Returns 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
59 Return last item.
60
61 \membersection{wxVector<T>::begin}\label{wxvectorbegin}
62
63 \constfunc{const\_iterator}{begin}{\void}
64
65 \func{iterator}{begin}{\void}
66
67 Return 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
78 Clears the vector.
79
80 \membersection{wxVector<T>::empty}\label{wxvectorempty}
81
82 \constfunc{bool}{empty}{\void}
83
84 Returns 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
92 Returns 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
100 Erase items. When using values other than built-in integrals
101 or classes with reference counting this can be an inefficient
102 operation.
103
104 \membersection{wxVector<T>::front}\label{wxvectorfront}
105
106 \constfunc{const value\_type\&}{front}{\void}
107
108 \func{value\_type\&}{front}{\void}
109
110 Returns 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
116 Insert an item. When using values other than built-in integrals
117 or classes with reference counting this can be an inefficient
118 operation.
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
126 Returns item at position {\it idx}.
127
128 \membersection{wxVector<T>::pop\_back}\label{wxvectorpopback}
129
130 \func{void}{pop\_back}{\void}
131
132 Removes the last item.
133
134 \membersection{wxVector<T>::push\_back}\label{wxvectorpushback}
135
136 \func{void}{push\_back}{\param{const value\_type\& }{v}}
137
138 Adds 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
144 Reserves more memory of {\it n} is greater then
145 \helpref{size}{wxvectorsize}. Other this call has
146 no effect.
147
148 \membersection{wxVector<T>::size}\label{wxvectorsize}
149
150 \constfunc{size\_type}{size}{\void}
151
152 Returns the size of the vector.