Inheritance diagram for vector< T, macstl::mach_allocator< T > >:
Specialization of vector tuned for the Mach allocator:
T | The element value type. |
Public Types | |
typedef macstl::mach_allocator< T > | allocator_type |
The allocator type. | |
typedef stdext::impl::vector_base< macstl::mach_allocator< T > > | base |
The base type. | |
typedef macstl::mach_allocator< T >::const_pointer | const_iterator |
Iterator to access elements. | |
typedef macstl::mach_allocator< T >::const_pointer | const_pointer |
Pointer to access elements. | |
typedef macstl::mach_allocator< T >::const_reference | const_reference |
Reference to access elements. | |
typedef std::reverse_iterator< const_iterator > | const_reverse_iterator |
Iterator to access elements, in reverse order. | |
typedef macstl::mach_allocator< T >::difference_type | difference_type |
Represents the difference between two iterators. | |
typedef macstl::mach_allocator< T >::pointer | iterator |
Iterator to access or change elements. | |
typedef macstl::mach_allocator< T >::pointer | pointer |
Pointer to access or change elements. | |
typedef macstl::mach_allocator< T >::reference | reference |
Reference to access or change elements. | |
typedef std::reverse_iterator< iterator > | reverse_iterator |
Iterator to access or change elements, in reverse order. | |
typedef macstl::mach_allocator< T >::size_type | size_type |
Represents the size of a vector. | |
typedef macstl::mach_allocator< T >::value_type | value_type |
The element value type. | |
Public Member Functions | |
References | |
const_reference | at (size_type i) const |
Gets the element at index i, if within bounds. | |
reference | at (size_type i) |
Gets the element at index i, if within bounds. | |
const_reference | back () const |
Gets the last element. | |
reference | back () |
Gets the last element. | |
const_reference | front () const |
Gets the first element. | |
reference | front () |
Gets the first element. | |
const_reference | operator[] (size_type i) const |
Gets the element at index i. | |
reference | operator[] (size_type i) |
Gets the element at index i. | |
Erasers | |
void | clear () |
Erases the entire vector. | |
iterator | erase (iterator pos) |
Erases the element at pos. | |
iterator | erase (iterator first, iterator last) |
Erase the range first to last. | |
void | pop_back () |
Erases the last element. | |
Sizes | |
bool | empty () const |
Tests whether the vector is empty. | |
size_type | size () const |
Gets the number of elements. | |
Iterators | |
const_iterator | end () const |
Gets an iterator to the past-the-last element. | |
iterator | end () |
Gets an iterator to the past-the-last element. | |
const_reverse_iterator | rbegin () const |
Gets a reverse iterator to the last element. | |
reverse_iterator | rbegin () |
Gets a reverse iterator to the last element. | |
const_reverse_iterator | rend () const |
Gets a reverse iterator to the past-the-first element. | |
reverse_iterator | rend () |
Gets a reverse iterator to the past-the-first element. | |
Inserters | |
iterator | insert (iterator pos, const value_type &val) |
Inserts at pos a copy of val. | |
void | insert (iterator pos, size_type n, const value_type &val) |
Inserts at pos n copies of val. | |
template<typename Iter> | |
void | insert (iterator pos, Iter first, Iter last) |
Inserts at pos the range from first to last. | |
void | push_back (const value_type &val) |
Inserts the value val at the end. | |
Assignments | |
vector & | operator= (const vector &other) |
Assigns the other vector. | |
void | swap (vector &other) |
Swaps the other vector. | |
Resizers | |
void | reserve (size_type cap) |
Changes the capacity of the array to cap. | |
void | resize (size_type sz, const T &val=T()) |
Changes the size of the array to sz, filling with val elements if necessary. | |
Constructors and Destructors | |
template<typename Iter> | |
vector (Iter first, Iter last, const allocator_type &alloc=allocator_type()) | |
Constructs a vector from the range first to last, using the allocator alloc. | |
vector (const vector &other) | |
Copies the vector. | |
vector (size_type n) | |
Constructs a vector of n default-constructed elements, using allocator alloc. | |
vector (size_type n, const value_type &val, const allocator_type &alloc=allocator_type()) | |
Constructs a vector of n copies of val, using allocator alloc. | |
vector (const allocator_type &alloc=allocator_type()) | |
Constructs an empty vector, using allocator alloc. | |
~vector () | |
Destructs the vector. | |
Static Public Member Functions | |
static size_type | max_size () |
Gets the maximum possible size. |