|
|
| HeapArray ()=default |
| | Create an empty array.
|
| |
|
| HeapArray (const HeapArray &other) |
| | Copy constructor.
|
| |
|
| HeapArray (HeapArray &&other) noexcept |
| | Move constructor.
|
| |
| | HeapArray (const ArraySlice< const T > &data) |
| | Create an array. More...
|
| |
|
HeapArray & | operator= (const HeapArray &other) |
| | Copy assignment.
|
| |
|
HeapArray & | operator= (HeapArray &&other) noexcept |
| | Move assignment.
|
| |
| | HeapArray (IAllocator *pAllocator) |
| | Create an array. More...
|
| |
| | HeapArray (USize size, const T &value={}) |
| | Create an array. More...
|
| |
| | HeapArray (IAllocator *pAllocator, USize size, const T &value={}) |
| | Create an array. More...
|
| |
| void | Resize (USize size, const T &value={}) |
| | Set size of the array. More...
|
| |
| ArraySlice< T > | operator() (USize beginIndex, USize endIndex) const noexcept |
| | Create a subslice from this array. More...
|
| |
| T & | operator[] (USize index) const noexcept |
| | Get an element by index. More...
|
| |
| SSize | IndexOf (const T &value) const |
| | Get index of the first element equal to the passed value. More...
|
| |
| SSize | LastIndexOf (const T &value) const |
| | Get index of the last element equal to the passed value. More...
|
| |
| bool | Contains (const T &value) |
| | Check if the element is present in the array. More...
|
| |
|
USize | Length () const |
| | \bried Length of the array.
|
| |
|
bool | Empty () const |
| | Check if the array is empty.
|
| |
|
bool | Any () const |
| | Check if the array has any elements.
|
| |
|
void | Reset () |
| | Reset the array to empty state.
|
| |
|
T * | Data () |
| | Get pointer to the beginning of the array.
|
| |
|
const T * | Data () const |
| | Get pointer to the beginning of the array.
|
| |
| USize | CopyDataTo (ArraySlice< T > destination) const |
| | Copy data from this array to a slice. More...
|
| |
|
const T * | begin () const |
| |
|
const T * | end () const |
| |
|
| operator ArraySlice< const T > () const |
| |
|
| operator ArraySlice< T > () |
| |
template<class T>
class UN::HeapArray< T >
Fixed-size heap-allocated array.
This class is mostly used for interoperability with other languages, should not be used internally or in the user code, std::vector is preferred in such cases.