Open 3D Engine AzCore API Reference
2305.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
|
#include <vector.h>
Public Types | |
typedef T * | pointer |
typedef const T * | const_pointer |
typedef T & | reference |
typedef const T & | const_reference |
typedef pointer | iterator_impl |
typedef const_pointer | const_iterator_impl |
typedef iterator_impl | iterator |
typedef const_iterator_impl | const_iterator |
using | difference_type = iter_difference_t< iterator > |
using | size_type = make_unsigned_t< difference_type > |
typedef AZStd::reverse_iterator < iterator > | reverse_iterator |
typedef AZStd::reverse_iterator < const_iterator > | const_reverse_iterator |
typedef T | value_type |
typedef Allocator | allocator_type |
typedef value_type | node_type |
Allocation node type. Common for all AZStd containers. In vectors case we allocate always "sizeof(node_type)*capacity" block. | |
Public Member Functions | |
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 > | |
is_integral ()) | |
ilist | end () |
ilist | m_last (0) |
ilist | m_end (0) |
ilist | m_allocator (rhs.m_allocator) |
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) |
Extensions | |
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) |
Public Attributes | |
template<class InputIterator > | |
__pad0__: m_allocator(allocator) { construct_iter(first | |
template<class InputIterator > | |
last | |
template<class R , class = enable_if_t<Internal::container_compatible_range<R, value_type>>> | |
__pad1__: m_allocator(alloc) { assign_range(AZStd::forward<R>(rg)) | |
__pad2__: vector(ilist.begin() | |
ilist | allocator |
Protected Attributes | |
pointer | m_start {} |
Pointer to the first allocated element of the array. | |
pointer | m_last {} |
Pointer after the last used element. | |
pointer | m_end {} |
Pointer after the last allocated element. | |
allocator_type | m_allocator |
Instance of the allocator. | |
The vector container (AKA dynamic array) is complaint with CStd (23.2.4). In addition we introduce the following extensions.
|
inline |
Resets the container without deallocating any memory or calling any destructor. This function should be used when we need very quick tear down. Generally it's used for temporary vectors and we can just nuke them that way. In addition the provided Allocators, has leak and reset flag which will enable automatically this behavior. So this function should be used in special cases AZStdExamples.
|
inline |
Extension it will set the increase size without calling default constructors. This is provided so we can use the vector as a generic buffer where we don't have to pay the cost of elements that we will construct over.
|
inline |
Set the capacity of the vector, if necessary it will destroy elements at the end of the container to match the new capacity.
ilist AZStd::vector< T, Allocator >::allocator |