|
void | reserve (size_type inNewSize) |
| Reserve array space.
|
|
void | resize (size_type inNewSize) |
| Resize array to new length.
|
|
void | resize (size_type inNewSize, const T &inValue) |
| Resize array to new length and initialize all elements with inValue.
|
|
void | clear () |
| Destruct all elements and set length to zero.
|
|
template<class Iterator > |
void | assign (Iterator inBegin, Iterator inEnd) |
| Replace the contents of this array with inBegin .. inEnd.
|
|
void | assign (std::initializer_list< T > inList) |
| Replace the contents of this array with inList.
|
|
| Array ()=default |
| Default constructor.
|
|
| Array (const Allocator &inAllocator) |
| Constructor with allocator.
|
|
| Array (size_type inLength, const Allocator &inAllocator={ }) |
| Constructor with length.
|
|
| Array (size_type inLength, const T &inValue, const Allocator &inAllocator={ }) |
| Constructor with length and value.
|
|
| Array (std::initializer_list< T > inList, const Allocator &inAllocator={ }) |
| Constructor from initializer list.
|
|
| Array (const_iterator inBegin, const_iterator inEnd, const Allocator &inAllocator={ }) |
| Constructor from iterator.
|
|
| Array (const Array< T, Allocator > &inRHS) |
| Copy constructor.
|
|
| Array (Array< T, Allocator > &&inRHS) noexcept |
| Move constructor.
|
|
| ~Array () |
| Destruct all elements.
|
|
Allocator & | get_allocator () |
| Get the allocator.
|
|
const Allocator & | get_allocator () const |
|
void | push_back (const T &inValue) |
| Add element to the back of the array.
|
|
void | push_back (T &&inValue) |
|
template<class... A> |
T & | emplace_back (A &&... inValue) |
| Construct element at the back of the array.
|
|
void | pop_back () |
| Remove element from the back of the array.
|
|
bool | empty () const |
| Returns true if there are no elements in the array.
|
|
size_type | size () const |
| Returns amount of elements in the array.
|
|
size_type | capacity () const |
| Returns maximum amount of elements the array can hold.
|
|
void | shrink_to_fit () |
| Reduce the capacity of the array to match its size.
|
|
void | swap (Array< T, Allocator > &inRHS) noexcept |
| Swap the contents of two arrays.
|
|
template<class Iterator > |
void | insert (const_iterator inPos, Iterator inBegin, Iterator inEnd) |
|
void | insert (const_iterator inPos, const T &inValue) |
|
void | erase (const_iterator inIter) |
| Remove one element from the array.
|
|
void | erase (const_iterator inBegin, const_iterator inEnd) |
| Remove multiple element from the array.
|
|
const_iterator | begin () const |
| Iterators.
|
|
const_iterator | end () const |
|
const_iterator | cbegin () const |
|
const_iterator | cend () const |
|
iterator | begin () |
|
iterator | end () |
|
const T * | data () const |
|
T * | data () |
|
T & | operator[] (size_type inIdx) |
| Access element.
|
|
const T & | operator[] (size_type inIdx) const |
|
T & | at (size_type inIdx) |
| Access element.
|
|
const T & | at (size_type inIdx) const |
|
const T & | front () const |
| First element in the array.
|
|
T & | front () |
|
const T & | back () const |
| Last element in the array.
|
|
T & | back () |
|
Array< T, Allocator > & | operator= (const Array< T, Allocator > &inRHS) |
| Assignment operator.
|
|
Array< T, Allocator > & | operator= (Array< T, Allocator > &&inRHS) noexcept |
| Assignment move operator.
|
|
Array< T, Allocator > & | operator= (std::initializer_list< T > inRHS) |
| Assignment operator.
|
|
bool | operator== (const Array< T, Allocator > &inRHS) const |
| Comparing arrays.
|
|
bool | operator!= (const Array< T, Allocator > &inRHS) const |
|
uint64 | GetHash () const |
| Get hash for this array.
|
|
template<class T, class Allocator = STLAllocator<T>>
class Array< T, Allocator >
Simple replacement for std::vector
Major differences:
- Memory is not initialized to zero (this was causing a lot of page faults when deserializing large MeshShapes / HeightFieldShapes)
- Iterators are simple pointers (for now)
- No exception safety
- No specialization like std::vector<bool> has
- Not all functions have been implemented