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