]> git.saurik.com Git - wxWidgets.git/blame - interface/vector.h
latex include not properly working for links and titlepage
[wxWidgets.git] / interface / vector.h
CommitLineData
23324ae1
FM
1/////////////////////////////////////////////////////////////////////////////
2// Name: vector.h
3// Purpose: documentation for wxVector<T> class
4// Author: wxWidgets team
5// RCS-ID: $Id$
6// Licence: wxWindows license
7/////////////////////////////////////////////////////////////////////////////
8
9/**
10 @class wxVectorT
11 @wxheader{vector.h}
7c913512 12
23324ae1
FM
13 wxVectorT is a template class which implements most of the std::vector
14 class and can be used like it. If wxWidgets is compiled in STL mode,
15 wxVector will just be a typedef to std::vector. Just like for std::vector,
16 objects stored in wxVectorT need to be @e assignable but don't have to
17 be @e default constructible.
7c913512 18
23324ae1 19 You can refer to the STL documentation for further information.
7c913512 20
23324ae1
FM
21 @library{wxbase}
22 @category{FIXME}
7c913512 23
23324ae1
FM
24 @seealso
25 @ref overview_wxcontaineroverview "Container classes overview", wxListT,
26 wxArrayT
27*/
7c913512 28class wxVector<T>
23324ae1
FM
29{
30public:
31 //@{
32 /**
33 Constructor.
34 */
35 wxVectorT();
7c913512 36 wxVectorT(const wxVector<T>& c);
23324ae1
FM
37 //@}
38
39 /**
40 Destructor.
41 */
42 ~wxVectorT();
43
44 //@{
45 /**
46 Returns item at position @e idx.
47 */
48 const value_type at(size_type idx);
7c913512 49 value_type at(size_type idx);
23324ae1
FM
50 //@}
51
52 //@{
53 /**
54 Return last item.
55 */
56 const value_type back();
7c913512 57 value_type back();
23324ae1
FM
58 //@}
59
60 //@{
61 /**
62 Return iterator to beginning of the vector.
63 */
64 const_iterator begin();
7c913512 65 iterator begin();
23324ae1
FM
66 //@}
67
68 /**
69
70 */
71 size_type capacity();
72
73 /**
74 Clears the vector.
75 */
76 void clear();
77
78 /**
79 Returns @true if the vector is empty.
80 */
81 bool empty();
82
83 //@{
84 /**
85 Returns iterator to the end of the vector.
86 */
87 const_iterator end();
7c913512 88 iterator end();
23324ae1
FM
89 //@}
90
91 //@{
92 /**
7c913512 93 Erase items. When using values other than built-in integrals
23324ae1
FM
94 or classes with reference counting this can be an inefficient
95 operation.
96 */
97 iterator erase(iterator it);
7c913512 98 iterator erase(iterator first, iterator last);
23324ae1
FM
99 //@}
100
101 //@{
102 /**
103 Returns first item.
104 */
105 const value_type front();
7c913512 106 value_type front();
23324ae1
FM
107 //@}
108
109 /**
110 )
111
7c913512 112 Insert an item. When using values other than built-in integrals
23324ae1
FM
113 or classes with reference counting this can be an inefficient
114 operation.
115 */
116 iterator insert(iterator it);
117
118 /**
119 Assignment operator.
120 */
121 wxVectorT& operator operator=(const wxVector<T>& vb);
122
123 //@{
124 /**
125 Returns item at position @e idx.
126 */
127 const value_type operator[](size_type idx);
7c913512 128 value_type operator[](size_type idx);
23324ae1
FM
129 //@}
130
131 /**
132 Removes the last item.
133 */
134 void pop_back();
135
136 /**
137 Adds an item to the end of the vector.
138 */
139 void push_back(const value_type& v);
140
141 /**
7c913512 142 Reserves more memory of @e n is greater then
23324ae1
FM
143 wxVector::size. Other this call has
144 no effect.
145 */
146 void reserve(size_type n);
147};