]>
git.saurik.com Git - wxWidgets.git/blob - interface/vector.h
26b4ede8e1a3fd18974267397e0ff94f3e3f0b0b
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: documentation for wxVector<T> class
4 // Author: wxWidgets team
6 // Licence: wxWindows license
7 /////////////////////////////////////////////////////////////////////////////
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.
19 You can refer to the STL documentation for further information.
25 @ref overview_wxcontaineroverview "Container classes overview", wxListT,
36 wxVectorT(const wxVector
<T
>& c
);
46 Returns item at position @e idx.
48 const value_type
at(size_type idx
);
49 value_type
at(size_type idx
);
56 const value_type
back();
62 Return iterator to beginning of the vector.
64 const_iterator
begin();
79 Returns @true if the vector is empty.
85 Returns iterator to the end of the vector.
93 Erase items. When using values other than built-in integrals
94 or classes with reference counting this can be an inefficient
97 iterator
erase(iterator it
);
98 iterator
erase(iterator first
, iterator last
);
105 const value_type
front();
112 Insert an item. When using values other than built-in integrals
113 or classes with reference counting this can be an inefficient
116 iterator
insert(iterator it
);
121 wxVectorT
& operator operator=(const wxVector
<T
>& vb
);
125 Returns item at position @e idx.
127 const value_type
operator[](size_type idx
);
128 value_type
operator[](size_type idx
);
132 Removes the last item.
137 Adds an item to the end of the vector.
139 void push_back(const value_type
& v
);
142 Reserves more memory of @e n is greater then
143 wxVector::size. Other this call has
146 void reserve(size_type n
);