Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

std::vector Class Template Reference

#include <stl_vector.h>

Inheritance diagram for std::vector:

Inheritance graph
[legend]
Collaboration diagram for std::vector:

Collaboration graph
[legend]
List of all members.

Public Types

typedef _Tp value_type
typedef value_typepointer
typedef const value_typeconst_pointer
typedef __normal_iterator<
pointer, vector_type
iterator
typedef __normal_iterator<
const_pointer, vector_type
const_iterator
typedef value_typereference
typedef const value_typeconst_reference
typedef size_t size_type
typedef ptrdiff_t difference_type
typedef _Base::allocator_type allocator_type
typedef reverse_iterator<const_iteratorconst_reverse_iterator
typedef reverse_iterator<iteratorreverse_iterator

Public Methods

allocator_type get_allocator () const
iterator begin ()
const_iterator begin () const
iterator end ()
const_iterator end () const
reverse_iterator rbegin ()
const_reverse_iterator rbegin () const
reverse_iterator rend ()
const_reverse_iterator rend () const
size_type size () const
size_type max_size () const
size_type capacity () const
bool empty () const
reference operator[] (size_type __n)
const_reference operator[] (size_type __n) const
void _M_range_check (size_type __n) const
reference at (size_type __n)
const_reference at (size_type __n) const
 vector (const allocator_type &__a=allocator_type())
 vector (size_type __n, const _Tp &__value, const allocator_type &__a=allocator_type())
 vector (size_type __n)
 vector (const vector< _Tp, _Alloc > &__x)
template<class _InputIterator>  vector (_InputIterator __first, _InputIterator __last, const allocator_type &__a=allocator_type())
template<class _Integer> void _M_initialize_aux (_Integer __n, _Integer __value, __true_type)
template<class _InputIterator> void _M_initialize_aux (_InputIterator __first, _InputIterator __last, __false_type)
 ~vector ()
vector<_Tp, _Alloc>& operator= (const vector< _Tp, _Alloc > &__x)
void reserve (size_type __n)
void assign (size_type __n, const _Tp &__val)
void _M_fill_assign (size_type __n, const _Tp &__val)
template<class _InputIterator> void assign (_InputIterator __first, _InputIterator __last)
template<class _Integer> void _M_assign_dispatch (_Integer __n, _Integer __val, __true_type)
template<class _InputIter> void _M_assign_dispatch (_InputIter __first, _InputIter __last, __false_type)
template<class _InputIterator> void _M_assign_aux (_InputIterator __first, _InputIterator __last, input_iterator_tag)
template<class _ForwardIterator> void _M_assign_aux (_ForwardIterator __first, _ForwardIterator __last, forward_iterator_tag)
reference front ()
const_reference front () const
reference back ()
const_reference back () const
void push_back (const _Tp &__x)
void push_back ()
void swap (vector< _Tp, _Alloc > &__x)
iterator insert (iterator __position, const _Tp &__x)
iterator insert (iterator __position)
template<class _InputIterator> void insert (iterator __pos, _InputIterator __first, _InputIterator __last)
template<class _Integer> void _M_insert_dispatch (iterator __pos, _Integer __n, _Integer __val, __true_type)
template<class _InputIterator> void _M_insert_dispatch (iterator __pos, _InputIterator __first, _InputIterator __last, __false_type)
void insert (iterator __pos, size_type __n, const _Tp &__x)
void _M_fill_insert (iterator __pos, size_type __n, const _Tp &__x)
void pop_back ()
iterator erase (iterator __position)
iterator erase (iterator __first, iterator __last)
void resize (size_type __new_size, const _Tp &__x)
void resize (size_type __new_size)
void clear ()

Protected Methods

void _M_insert_aux (iterator __position, const _Tp &__x)
void _M_insert_aux (iterator __position)
template<class _ForwardIterator> pointer _M_allocate_and_copy (size_type __n, _ForwardIterator __first, _ForwardIterator __last)
template<class _InputIterator> void _M_range_initialize (_InputIterator __first, _InputIterator __last, input_iterator_tag)
template<class _ForwardIterator> void _M_range_initialize (_ForwardIterator __first, _ForwardIterator __last, forward_iterator_tag)
template<class _InputIterator> void _M_range_insert (iterator __pos, _InputIterator __first, _InputIterator __last, input_iterator_tag)
template<class _ForwardIterator> void _M_range_insert (iterator __pos, _ForwardIterator __first, _ForwardIterator __last, forward_iterator_tag)

Private Types

typedef _Vector_base<_Tp,
_Alloc
_Base
typedef vector<_Tp, _Allocvector_type

Private Methods

 __glibcpp_class_requires (_Tp, _SGIAssignableConcept)

template<class _Tp, class _Alloc = allocator<_Tp>> class std::vector


Member Typedef Documentation

template<class _Tp, class _Alloc = allocator<_Tp>>
typedef _Vector_base<_Tp, _Alloc> std::vector<_Tp, _Alloc>::_Base [private]
 

Reimplemented from std::_Vector_base.

Definition at line 124 of file stl_vector.h.

template<class _Tp, class _Alloc = allocator<_Tp>>
typedef _Base::allocator_type std::vector<_Tp, _Alloc>::allocator_type
 

Reimplemented from std::_Vector_base.

Definition at line 137 of file stl_vector.h.

template<class _Tp, class _Alloc = allocator<_Tp>>
typedef __normal_iterator<const_pointer, vector_type> std::vector<_Tp, _Alloc>::const_iterator
 

Definition at line 131 of file stl_vector.h.

Referenced by begin(), capacity(), and end().

template<class _Tp, class _Alloc = allocator<_Tp>>
typedef const value_type* std::vector<_Tp, _Alloc>::const_pointer
 

Definition at line 129 of file stl_vector.h.

template<class _Tp, class _Alloc = allocator<_Tp>>
typedef const value_type& std::vector<_Tp, _Alloc>::const_reference
 

Definition at line 133 of file stl_vector.h.

template<class _Tp, class _Alloc = allocator<_Tp>>
typedef reverse_iterator<const_iterator> std::vector<_Tp, _Alloc>::const_reverse_iterator
 

Definition at line 140 of file stl_vector.h.

Referenced by rbegin(), and rend().

template<class _Tp, class _Alloc = allocator<_Tp>>
typedef ptrdiff_t std::vector<_Tp, _Alloc>::difference_type
 

Definition at line 135 of file stl_vector.h.

template<class _Tp, class _Alloc = allocator<_Tp>>
typedef __normal_iterator<pointer, vector_type> std::vector<_Tp, _Alloc>::iterator
 

Definition at line 130 of file stl_vector.h.

Referenced by begin(), end(), and insert().

template<class _Tp, class _Alloc = allocator<_Tp>>
typedef value_type* std::vector<_Tp, _Alloc>::pointer
 

Definition at line 128 of file stl_vector.h.

template<class _Tp, class _Alloc = allocator<_Tp>>
typedef value_type& std::vector<_Tp, _Alloc>::reference
 

Definition at line 132 of file stl_vector.h.

template<class _Tp, class _Alloc = allocator<_Tp>>
typedef reverse_iterator<iterator> std::vector<_Tp, _Alloc>::reverse_iterator
 

Definition at line 141 of file stl_vector.h.

Referenced by rbegin(), and rend().

template<class _Tp, class _Alloc = allocator<_Tp>>
typedef size_t std::vector<_Tp, _Alloc>::size_type
 

Definition at line 134 of file stl_vector.h.

Referenced by capacity(), max_size(), and size().

template<class _Tp, class _Alloc = allocator<_Tp>>
typedef _Tp std::vector<_Tp, _Alloc>::value_type
 

Definition at line 127 of file stl_vector.h.

template<class _Tp, class _Alloc = allocator<_Tp>>
typedef vector<_Tp, _Alloc> std::vector<_Tp, _Alloc>::vector_type [private]
 

Definition at line 125 of file stl_vector.h.


Constructor & Destructor Documentation

template<class _Tp, class _Alloc = allocator<_Tp>>
std::vector<_Tp, _Alloc>::vector<_Tp, _Alloc> ( const allocator_type & __a = allocator_type() ) [inline, explicit]
 

Definition at line 192 of file stl_vector.h.

template<class _Tp, class _Alloc = allocator<_Tp>>
std::vector<_Tp, _Alloc>::vector<_Tp, _Alloc> ( size_type __n,
const _Tp & __value,
const allocator_type & __a = allocator_type() ) [inline]
 

Definition at line 195 of file stl_vector.h.

template<class _Tp, class _Alloc = allocator<_Tp>>
std::vector<_Tp, _Alloc>::vector<_Tp, _Alloc> ( size_type __n ) [inline, explicit]
 

Definition at line 200 of file stl_vector.h.

template<class _Tp, class _Alloc = allocator<_Tp>>
std::vector<_Tp, _Alloc>::vector<_Tp, _Alloc> ( const vector< _Tp, _Alloc > & __x ) [inline]
 

Definition at line 204 of file stl_vector.h.

template<class _Tp, class _Alloc = allocator<_Tp>>
template<class _InputIterator>
std::vector<_Tp, _Alloc>::vector<_Tp, _Alloc> ( _InputIterator __first,
_InputIterator __last,
const allocator_type & __a = allocator_type() ) [inline]
 

Definition at line 210 of file stl_vector.h.

template<class _Tp, class _Alloc = allocator<_Tp>>
std::vector<_Tp, _Alloc>::~vector<_Tp, _Alloc> ( ) [inline]
 

Definition at line 229 of file stl_vector.h.


Member Function Documentation

template<class _Tp, class _Alloc = allocator<_Tp>>
template<class _ForwardIterator>
pointer std::vector<_Tp, _Alloc>::_M_allocate_and_copy ( size_type __n,
_ForwardIterator __first,
_ForwardIterator __last ) [inline, protected]
 

Definition at line 375 of file stl_vector.h.

Referenced by reserve().

template<class _Tp, class _Alloc = allocator<_Tp>>
template<class _ForwardIterator>
void std::vector<_Tp, _Alloc>::_M_assign_aux ( _ForwardIterator __first,
_ForwardIterator __last,
forward_iterator_tag )
 

template<class _Tp, class _Alloc = allocator<_Tp>>
template<class _InputIterator>
void std::vector<_Tp, _Alloc>::_M_assign_aux ( _InputIterator __first,
_InputIterator __last,
input_iterator_tag )
 

Referenced by _M_assign_dispatch().

template<class _Tp, class _Alloc = allocator<_Tp>>
template<class _InputIter>
void std::vector<_Tp, _Alloc>::_M_assign_dispatch ( _InputIter __first,
_InputIter __last,
__false_type ) [inline]
 

Definition at line 263 of file stl_vector.h.

template<class _Tp, class _Alloc = allocator<_Tp>>
template<class _Integer>
void std::vector<_Tp, _Alloc>::_M_assign_dispatch ( _Integer __n,
_Integer __val,
__true_type ) [inline]
 

Definition at line 259 of file stl_vector.h.

Referenced by assign().

template<class _Tp, class _Alloc = allocator<_Tp>>
void std::vector<_Tp, _Alloc>::_M_fill_assign ( size_type __n,
const _Tp & __val )
 

Referenced by _M_assign_dispatch(), and assign().

template<class _Tp, class _Alloc = allocator<_Tp>>
void std::vector<_Tp, _Alloc>::_M_fill_insert ( iterator __pos,
size_type __n,
const _Tp & __x )
 

Referenced by _M_insert_dispatch(), and insert().

template<class _Tp, class _Alloc = allocator<_Tp>>
template<class _InputIterator>
void std::vector<_Tp, _Alloc>::_M_initialize_aux ( _InputIterator __first,
_InputIterator __last,
__false_type ) [inline]
 

Definition at line 224 of file stl_vector.h.

template<class _Tp, class _Alloc = allocator<_Tp>>
template<class _Integer>
void std::vector<_Tp, _Alloc>::_M_initialize_aux ( _Integer __n,
_Integer __value,
__true_type ) [inline]
 

Definition at line 217 of file stl_vector.h.

Referenced by vector().

template<class _Tp, class _Alloc = allocator<_Tp>>
void std::vector<_Tp, _Alloc>::_M_insert_aux ( iterator __position ) [protected]
 

template<class _Tp, class _Alloc = allocator<_Tp>>
void std::vector<_Tp, _Alloc>::_M_insert_aux ( iterator __position,
const _Tp & __x ) [protected]
 

Referenced by insert(), and push_back().

template<class _Tp, class _Alloc = allocator<_Tp>>
template<class _InputIterator>
void std::vector<_Tp, _Alloc>::_M_insert_dispatch ( iterator __pos,
_InputIterator __first,
_InputIterator __last,
__false_type ) [inline]
 

Definition at line 334 of file stl_vector.h.

template<class _Tp, class _Alloc = allocator<_Tp>>
template<class _Integer>
void std::vector<_Tp, _Alloc>::_M_insert_dispatch ( iterator __pos,
_Integer __n,
_Integer __val,
__true_type ) [inline]
 

Definition at line 329 of file stl_vector.h.

Referenced by insert().

template<class _Tp, class _Alloc = allocator<_Tp>>
void std::vector<_Tp, _Alloc>::_M_range_check ( size_type __n ) const [inline]
 

Definition at line 182 of file stl_vector.h.

Referenced by at().

template<class _Tp, class _Alloc = allocator<_Tp>>
template<class _ForwardIterator>
void std::vector<_Tp, _Alloc>::_M_range_initialize ( _ForwardIterator __first,
_ForwardIterator __last,
forward_iterator_tag ) [inline, protected]
 

Definition at line 396 of file stl_vector.h.

template<class _Tp, class _Alloc = allocator<_Tp>>
template<class _InputIterator>
void std::vector<_Tp, _Alloc>::_M_range_initialize ( _InputIterator __first,
_InputIterator __last,
input_iterator_tag ) [inline, protected]
 

Definition at line 387 of file stl_vector.h.

Referenced by _M_initialize_aux().

template<class _Tp, class _Alloc = allocator<_Tp>>
template<class _ForwardIterator>
void std::vector<_Tp, _Alloc>::_M_range_insert ( iterator __pos,
_ForwardIterator __first,
_ForwardIterator __last,
forward_iterator_tag ) [protected]
 

template<class _Tp, class _Alloc = allocator<_Tp>>
template<class _InputIterator>
void std::vector<_Tp, _Alloc>::_M_range_insert ( iterator __pos,
_InputIterator __first,
_InputIterator __last,
input_iterator_tag ) [protected]
 

Referenced by _M_insert_dispatch().

template<class _Tp, class _Alloc = allocator<_Tp>>
std::vector<_Tp, _Alloc>::__glibcpp_class_requires ( _Tp,
_SGIAssignableConcept ) [private]
 

template<class _Tp, class _Alloc = allocator<_Tp>>
template<class _InputIterator>
void std::vector<_Tp, _Alloc>::assign ( _InputIterator __first,
_InputIterator __last ) [inline]
 

Definition at line 253 of file stl_vector.h.

template<class _Tp, class _Alloc = allocator<_Tp>>
void std::vector<_Tp, _Alloc>::assign ( size_type __n,
const _Tp & __val ) [inline]
 

Definition at line 249 of file stl_vector.h.

template<class _Tp, class _Alloc = allocator<_Tp>>
const_reference std::vector<_Tp, _Alloc>::at ( size_type __n ) const [inline]
 

Definition at line 189 of file stl_vector.h.

template<class _Tp, class _Alloc = allocator<_Tp>>
reference std::vector<_Tp, _Alloc>::at ( size_type __n ) [inline]
 

Definition at line 187 of file stl_vector.h.

template<class _Tp, class _Alloc = allocator<_Tp>>
const_reference std::vector<_Tp, _Alloc>::back ( ) const [inline]
 

Definition at line 277 of file stl_vector.h.

template<class _Tp, class _Alloc = allocator<_Tp>>
reference std::vector<_Tp, _Alloc>::back ( ) [inline]
 

Definition at line 276 of file stl_vector.h.

template<class _Tp, class _Alloc = allocator<_Tp>>
const_iterator std::vector<_Tp, _Alloc>::begin ( ) const [inline]
 

Definition at line 156 of file stl_vector.h.

template<class _Tp, class _Alloc = allocator<_Tp>>
iterator std::vector<_Tp, _Alloc>::begin ( ) [inline]
 

Definition at line 155 of file stl_vector.h.

Referenced by capacity(), clear(), empty(), front(), insert(), operator[](), rend(), resize(), and size().

template<class _Tp, class _Alloc = allocator<_Tp>>
size_type std::vector<_Tp, _Alloc>::capacity ( ) const [inline]
 

Definition at line 174 of file stl_vector.h.

Referenced by reserve().

template<class _Tp, class _Alloc = allocator<_Tp>>
void std::vector<_Tp, _Alloc>::clear ( ) [inline]
 

Definition at line 370 of file stl_vector.h.

template<class _Tp, class _Alloc = allocator<_Tp>>
bool std::vector<_Tp, _Alloc>::empty ( ) const [inline]
 

Definition at line 176 of file stl_vector.h.

template<class _Tp, class _Alloc = allocator<_Tp>>
const_iterator std::vector<_Tp, _Alloc>::end ( ) const [inline]
 

Definition at line 159 of file stl_vector.h.

template<class _Tp, class _Alloc = allocator<_Tp>>
iterator std::vector<_Tp, _Alloc>::end ( ) [inline]
 

Definition at line 158 of file stl_vector.h.

Referenced by back(), clear(), empty(), erase(), insert(), push_back(), rbegin(), resize(), and size().

template<class _Tp, class _Alloc = allocator<_Tp>>
iterator std::vector<_Tp, _Alloc>::erase ( iterator __first,
iterator __last ) [inline]
 

Definition at line 356 of file stl_vector.h.

template<class _Tp, class _Alloc = allocator<_Tp>>
iterator std::vector<_Tp, _Alloc>::erase ( iterator __position ) [inline]
 

Definition at line 349 of file stl_vector.h.

Referenced by clear(), and resize().

template<class _Tp, class _Alloc = allocator<_Tp>>
const_reference std::vector<_Tp, _Alloc>::front ( ) const [inline]
 

Definition at line 275 of file stl_vector.h.

template<class _Tp, class _Alloc = allocator<_Tp>>
reference std::vector<_Tp, _Alloc>::front ( ) [inline]
 

Definition at line 274 of file stl_vector.h.

template<class _Tp, class _Alloc = allocator<_Tp>>
allocator_type std::vector<_Tp, _Alloc>::get_allocator ( ) const [inline]
 

Reimplemented from std::_Vector_alloc_base.

Definition at line 138 of file stl_vector.h.

template<class _Tp, class _Alloc = allocator<_Tp>>
void std::vector<_Tp, _Alloc>::insert ( iterator __pos,
size_type __n,
const _Tp & __x ) [inline]
 

Definition at line 340 of file stl_vector.h.

template<class _Tp, class _Alloc = allocator<_Tp>>
template<class _InputIterator>
void std::vector<_Tp, _Alloc>::insert ( iterator __pos,
_InputIterator __first,
_InputIterator __last ) [inline]
 

Definition at line 323 of file stl_vector.h.

template<class _Tp, class _Alloc = allocator<_Tp>>
iterator std::vector<_Tp, _Alloc>::insert ( iterator __position ) [inline]
 

Definition at line 311 of file stl_vector.h.

template<class _Tp, class _Alloc = allocator<_Tp>>
iterator std::vector<_Tp, _Alloc>::insert ( iterator __position,
const _Tp & __x ) [inline]
 

Definition at line 301 of file stl_vector.h.

Referenced by resize().

template<class _Tp, class _Alloc = allocator<_Tp>>
size_type std::vector<_Tp, _Alloc>::max_size ( ) const [inline]
 

Definition at line 172 of file stl_vector.h.

template<class _Tp, class _Alloc = allocator<_Tp>>
vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator= ( const vector< _Tp, _Alloc > & __x )
 

template<class _Tp, class _Alloc = allocator<_Tp>>
const_reference std::vector<_Tp, _Alloc>::operator[] ( size_type __n ) const [inline]
 

Definition at line 180 of file stl_vector.h.

template<class _Tp, class _Alloc = allocator<_Tp>>
reference std::vector<_Tp, _Alloc>::operator[] ( size_type __n ) [inline]
 

Definition at line 179 of file stl_vector.h.

template<class _Tp, class _Alloc = allocator<_Tp>>
void std::vector<_Tp, _Alloc>::pop_back ( ) [inline]
 

Definition at line 345 of file stl_vector.h.

template<class _Tp, class _Alloc = allocator<_Tp>>
void std::vector<_Tp, _Alloc>::push_back ( ) [inline]
 

Definition at line 287 of file stl_vector.h.

Referenced by _M_range_initialize().

template<class _Tp, class _Alloc = allocator<_Tp>>
void std::vector<_Tp, _Alloc>::push_back ( const _Tp & __x ) [inline]
 

Definition at line 279 of file stl_vector.h.

template<class _Tp, class _Alloc = allocator<_Tp>>
const_reverse_iterator std::vector<_Tp, _Alloc>::rbegin ( ) const [inline]
 

Definition at line 163 of file stl_vector.h.

template<class _Tp, class _Alloc = allocator<_Tp>>
reverse_iterator std::vector<_Tp, _Alloc>::rbegin ( ) [inline]
 

Definition at line 161 of file stl_vector.h.

template<class _Tp, class _Alloc = allocator<_Tp>>
const_reverse_iterator std::vector<_Tp, _Alloc>::rend ( ) const [inline]
 

Definition at line 167 of file stl_vector.h.

template<class _Tp, class _Alloc = allocator<_Tp>>
reverse_iterator std::vector<_Tp, _Alloc>::rend ( ) [inline]
 

Definition at line 165 of file stl_vector.h.

template<class _Tp, class _Alloc = allocator<_Tp>>
void std::vector<_Tp, _Alloc>::reserve ( size_type __n ) [inline]
 

Definition at line 232 of file stl_vector.h.

template<class _Tp, class _Alloc = allocator<_Tp>>
void std::vector<_Tp, _Alloc>::resize ( size_type __new_size ) [inline]
 

Definition at line 369 of file stl_vector.h.

template<class _Tp, class _Alloc = allocator<_Tp>>
void std::vector<_Tp, _Alloc>::resize ( size_type __new_size,
const _Tp & __x ) [inline]
 

Definition at line 363 of file stl_vector.h.

Referenced by resize().

template<class _Tp, class _Alloc = allocator<_Tp>>
size_type std::vector<_Tp, _Alloc>::size ( ) const [inline]
 

Definition at line 170 of file stl_vector.h.

Referenced by _M_range_check(), reserve(), and resize().

template<class _Tp, class _Alloc = allocator<_Tp>>
void std::vector<_Tp, _Alloc>::swap ( vector< _Tp, _Alloc > & __x ) [inline]
 

Definition at line 295 of file stl_vector.h.


The documentation for this class was generated from the following file:
Generated at Tue May 1 16:30:35 2001 for libstdc++-v3 by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001