]> git.saurik.com Git - wxWidgets.git/blame - interface/vector.h
remove wxTextAttr::CreateFont(); return wxNullFont from GetFont() if we have no font...
[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 24 @seealso
4cc4bfaf 25 @ref overview_wxcontaineroverview, wxListT, wxArrayT
23324ae1 26*/
7c913512 27class wxVector<T>
23324ae1
FM
28{
29public:
30 //@{
31 /**
32 Constructor.
33 */
34 wxVectorT();
7c913512 35 wxVectorT(const wxVector<T>& c);
23324ae1
FM
36 //@}
37
38 /**
39 Destructor.
40 */
41 ~wxVectorT();
42
43 //@{
44 /**
45 Returns item at position @e idx.
46 */
47 const value_type at(size_type idx);
7c913512 48 value_type at(size_type idx);
23324ae1
FM
49 //@}
50
51 //@{
52 /**
53 Return last item.
54 */
55 const value_type back();
7c913512 56 value_type back();
23324ae1
FM
57 //@}
58
59 //@{
60 /**
61 Return iterator to beginning of the vector.
62 */
63 const_iterator begin();
7c913512 64 iterator begin();
23324ae1
FM
65 //@}
66
67 /**
68
69 */
70 size_type capacity();
71
72 /**
73 Clears the vector.
74 */
75 void clear();
76
77 /**
78 Returns @true if the vector is empty.
79 */
80 bool empty();
81
82 //@{
83 /**
84 Returns iterator to the end of the vector.
85 */
86 const_iterator end();
7c913512 87 iterator end();
23324ae1
FM
88 //@}
89
90 //@{
91 /**
7c913512 92 Erase items. When using values other than built-in integrals
23324ae1
FM
93 or classes with reference counting this can be an inefficient
94 operation.
95 */
96 iterator erase(iterator it);
7c913512 97 iterator erase(iterator first, iterator last);
23324ae1
FM
98 //@}
99
100 //@{
101 /**
102 Returns first item.
103 */
104 const value_type front();
7c913512 105 value_type front();
23324ae1
FM
106 //@}
107
108 /**
109 )
7c913512 110 Insert an item. When using values other than built-in integrals
23324ae1
FM
111 or classes with reference counting this can be an inefficient
112 operation.
113 */
114 iterator insert(iterator it);
115
116 /**
117 Assignment operator.
118 */
119 wxVectorT& operator operator=(const wxVector<T>& vb);
120
121 //@{
122 /**
123 Returns item at position @e idx.
124 */
125 const value_type operator[](size_type idx);
7c913512 126 value_type operator[](size_type idx);
23324ae1
FM
127 //@}
128
129 /**
130 Removes the last item.
131 */
132 void pop_back();
133
134 /**
135 Adds an item to the end of the vector.
136 */
137 void push_back(const value_type& v);
138
139 /**
4cc4bfaf 140 Reserves more memory of @a n is greater then
23324ae1
FM
141 wxVector::size. Other this call has
142 no effect.
143 */
144 void reserve(size_type n);
145};