]>
git.saurik.com Git - wxWidgets.git/blob - interface/vector.h
2476ab8c405e890f96c445aae886f5e1407fde2b
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, wxListT, wxArrayT
35 wxVectorT(const wxVector
<T
>& c
);
45 Returns item at position @e idx.
47 const value_type
at(size_type idx
);
48 const value_type
at(size_type idx
);
55 const value_type
back();
56 const value_type
back();
61 Return iterator to beginning of the vector.
63 const_iterator
begin();
64 const iterator
begin();
70 size_type
capacity() const;
78 Returns @true if the vector is empty.
84 Returns iterator to the end of the vector.
92 Erase items. When using values other than built-in integrals
93 or classes with reference counting this can be an inefficient
96 iterator
erase(iterator it
);
97 iterator
erase(iterator first
, iterator last
);
104 const value_type
front();
105 const value_type
front();
110 Insert an item. When using values other than built-in integrals
111 or classes with reference counting this can be an inefficient
114 iterator
insert(iterator it
);
119 wxVectorT
& operator operator=(const wxVector
<T
>& vb
);
123 Returns item at position @e idx.
125 const value_type
operator[](size_type idx
);
126 const value_type
operator[](size_type idx
);
130 Removes the last item.
135 Adds an item to the end of the vector.
137 void push_back(const value_type
& v
);
140 Reserves more memory of @a n is greater then
141 wxVector::size. Other this call has
144 void reserve(size_type n
);