+ size_type size() const
+ {
+ return m_size;
+ }
+
+ size_type capacity() const
+ {
+ return m_capacity;
+ }
+
+ bool empty() const
+ {
+ return size() == 0;
+ }
+
+ wxVector& operator=(const wxVector& vb)
+ {
+ wxCHECK(Copy(vb), *this);
+ return *this;
+ }
+
+ void push_back(const value_type& o)
+ {
+ wxCHECK2(Alloc(size() + 1), return);
+ Append(new value_type(o));
+ }
+
+ void pop_back()
+ {
+ RemoveAt(size() - 1);
+ }
+
+ const value_type& at(size_type idx) const
+ {
+ wxASSERT(idx < m_size);
+ return *m_objects[idx];
+ }
+
+ value_type& at(size_type idx)
+ {
+ wxASSERT(idx < m_size);
+ return *m_objects[idx];
+ }
+
+ const value_type& operator[](size_type idx) const { return at(idx); }
+ value_type& operator[](size_type idx) { return at(idx); }
+ const value_type& front() const { return at(0); }
+ value_type& front() { return at(0); }
+ const value_type& back() const { return at(size() - 1); }
+ value_type& back() { return at(size() - 1); }
+
+ iterator begin() { return m_objects[0]; }
+ iterator end() { return m_objects[size()]; }
+
+ iterator erase(iterator first, iterator last)
+ {
+ size_type idx = first - begin();
+ RemoveAt(idx, last - first);
+ return begin() + idx;
+ }
+ iterator erase(iterator it)
+ {
+ size_type idx = it - begin();
+ RemoveAt(idx);
+ return begin() + idx;
+ }
+
+ iterator insert(iterator it, const value_type& v = value_type())
+ {
+ wxCHECK2(Alloc(size() + 1), return 0);
+ size_type idx = it - begin();
+ InsertAt(new value_type(v), idx);
+ return begin() + idx;
+ }
+
+private:
+ bool Alloc(size_type sz)