|
AZ_FORCE_INLINE | vector () |
| Construct an empty vector.
|
|
AZ_FORCE_INLINE | vector (const allocator_type &allocator) |
|
| vector (size_type numElements) |
|
| vector (size_type numElements, const_reference value) |
|
| vector (size_type numElements, const_reference value, const allocator_type &allocator) |
|
template<class InputIterator > |
| vector (InputIterator first, InputIterator last, const allocator_type &allocator=allocator_type()) |
|
template<class R , class = enable_if_t<Internal::container_compatible_range<R, value_type>>> |
| vector (from_range_t, R &&rg, const allocator_type &alloc=Allocator()) |
|
| vector (initializer_list< T > ilist, const allocator_type &allocator=allocator_type()) |
|
| vector (const this_type &rhs) |
|
| vector (this_type &&rhs) |
|
| vector (this_type &&rhs, const allocator_type &allocator) |
|
this_type & | operator= (this_type &&rhs) |
|
void | assign_rv (this_type &&rhs) |
|
void | push_back (value_type &&value) |
|
template<class ... Args> |
reference | emplace_back (Args &&... args) |
|
template<class R > |
auto | append_range (R &&rg) -> enable_if_t< Internal::container_compatible_range< R, T > > |
|
iterator | insert (const_iterator pos, value_type &&value) |
|
template<class ... Args> |
iterator | emplace (const_iterator pos, Args &&... args) |
|
this_type & | operator= (const this_type &rhs) |
|
AZ_FORCE_INLINE size_type | size () const |
|
AZ_FORCE_INLINE size_type | max_size () const |
|
AZ_FORCE_INLINE bool | empty () const |
|
void | reserve (size_type numElements) |
|
void | shrink_to_fit () |
|
AZ_FORCE_INLINE size_type | capacity () const |
|
AZ_FORCE_INLINE iterator | begin () |
|
AZ_FORCE_INLINE const_iterator | begin () const |
|
AZ_FORCE_INLINE iterator | end () |
|
AZ_FORCE_INLINE const_iterator | end () const |
|
AZ_FORCE_INLINE reverse_iterator | rbegin () |
|
AZ_FORCE_INLINE const_reverse_iterator | rbegin () const |
|
AZ_FORCE_INLINE reverse_iterator | rend () |
|
AZ_FORCE_INLINE const_reverse_iterator | rend () const |
|
AZ_FORCE_INLINE const_iterator | cbegin () const |
|
AZ_FORCE_INLINE const_iterator | cend () const |
|
AZ_FORCE_INLINE const_reverse_iterator | crbegin () const |
|
AZ_FORCE_INLINE const_reverse_iterator | crend () const |
|
AZ_FORCE_INLINE void | resize (size_type newSize) |
|
void | resize_no_construct (size_type newSize) |
|
AZ_FORCE_INLINE void | resize (size_type newSize, const_reference value) |
|
AZ_FORCE_INLINE reference | at (size_type position) |
|
AZ_FORCE_INLINE const_reference | at (size_type position) const |
|
AZ_FORCE_INLINE reference | operator[] (size_type position) |
|
AZ_FORCE_INLINE const_reference | operator[] (size_type position) const |
|
AZ_FORCE_INLINE reference | front () |
|
AZ_FORCE_INLINE const_reference | front () const |
|
AZ_FORCE_INLINE reference | back () |
|
AZ_FORCE_INLINE const_reference | back () const |
|
void | push_back (const_reference value) |
|
void | pop_back () |
|
void | assign (size_type numElements, const_reference value) |
|
template<class InputIterator > |
AZ_FORCE_INLINE void | assign (const InputIterator &first, const InputIterator &last) |
|
template<class R > |
auto | assign_range (R &&rg) -> enable_if_t< Internal::container_compatible_range< R, value_type > > |
|
void | assign (initializer_list< T > iList) |
|
iterator | insert (const_iterator insertPos, const_reference value) |
|
iterator | insert (const_iterator insertPos, size_type numElements, const_reference value) |
|
template<class InputIterator > |
iterator | insert (const_iterator insertPos, InputIterator first, InputIterator last) |
|
template<class R > |
auto | insert_range (const_iterator insertPos, R &&rg) -> enable_if_t< Internal::container_compatible_range< R, value_type >, iterator > |
|
iterator | insert (const_iterator insertPos, initializer_list< T > ilist) |
|
iterator | erase (const_iterator elementIter) |
|
iterator | erase (const_iterator first, const_iterator last) |
|
AZ_FORCE_INLINE void | clear () |
|
AZ_INLINE void | swap (this_type &rhs) |
|
|
|
AZ_FORCE_INLINE pointer | data () |
| TR1 Extension. Return pointer to the vector data. The vector data is guaranteed to be stored as an array.
|
|
AZ_FORCE_INLINE const_pointer | data () const |
|
AZ_FORCE_INLINE allocator_type & | get_allocator () |
| The only difference from the standard is that we return the allocator instance, not a copy.
|
|
AZ_FORCE_INLINE const allocator_type & | get_allocator () const |
|
void | set_allocator (const allocator_type &allocator) |
| Set the vector allocator. If different than then current all elements will be reallocated.
|
|
AZ_FORCE_INLINE bool | validate () const |
|
AZ_FORCE_INLINE int | validate_iterator (const const_iterator &iter) const |
| Validates an iter iterator. Returns a combination of iterator_status_flag.
|
|
AZ_FORCE_INLINE int | validate_iterator (const const_reverse_iterator &iter) const |
|
AZ_FORCE_INLINE void | leak_and_reset () |
|
void | set_capacity (size_type numElements) |
|
template<class T, class Allocator = AZStd::allocator>
class AZStd::vector< T, Allocator >
The vector container (AKA dynamic array) is complaint with CStd (23.2.4). In addition we introduce the following extensions.
- The vector keeps all elements in a single memory block. When it grows it reallocated all elements. The rule for growing is that we allocate every time the 50% more memory then then current number of elements. This way to insert ~1000 elements 1 by 1 it will take 17 allocations. Of course if you know that in advance it will be smart to set the capacity in advance, this way you will have only 1 allocation AZStdExamples. When you need a vector with preset capacity use fixed_vector.