ArrayView specialisation that handle dynamic array size. More...
#include <ArrayView.h>
Public Member Functions | |
ArrayView () | |
Construct a view to an empty array. More... | |
ArrayView (T *array_ptr, size_t array_size) | |
Construct an array view from a pointer to a buffer and its size. More... | |
template<size_t Size> | |
ArrayView (T(&elements)[Size]) | |
Construct an array view from the reference to an array. More... | |
template<size_t Size> | |
ArrayView (ArrayView< T, Size > other) | |
Construct a ArrayView object with a dynamic size from an ArrayView object with a static size. More... | |
size_t | size () const |
Return the size of the array viewed. More... | |
T & | operator[] (size_t index) |
Access to a mutable element of the array. More... | |
const T & | operator[] (size_t index) const |
Access to an immutable element of the array. More... | |
T * | data () |
Get the raw pointer to the array. More... | |
const T * | data () const |
Get the raw const pointer to the array. More... | |
ArrayView specialisation that handle dynamic array size.
Definition at line 174 of file ArrayView.h.
ArrayView | ( | ) |
Construct a view to an empty array.
Definition at line 181 of file ArrayView.h.
ArrayView | ( | T * | array_ptr, |
size_t | array_size | ||
) |
Construct an array view from a pointer to a buffer and its size.
array_ptr | Pointer to the array data |
array_size | Number of elements of T present in the array. |
Definition at line 192 of file ArrayView.h.
ArrayView | ( | T(&) | elements[Size] | ) |
Construct an array view from the reference to an array.
elements | Reference to the array viewed. |
Size | Number of elements of T presents in the array. |
Definition at line 206 of file ArrayView.h.
Construct a ArrayView object with a dynamic size from an ArrayView object with a static size.
other | The ArrayView object used to construct this. |
Definition at line 216 of file ArrayView.h.
T* data | ( | ) |
Get the raw pointer to the array.
Definition at line 262 of file ArrayView.h.
const T* data | ( | ) | const |
Get the raw const pointer to the array.
Definition at line 272 of file ArrayView.h.
T& operator[] | ( | size_t | index | ) |
Access to a mutable element of the array.
index | Element index to access. |
Definition at line 238 of file ArrayView.h.
const T& operator[] | ( | size_t | index | ) | const |
Access to an immutable element of the array.
index | Element index to access. |
Definition at line 252 of file ArrayView.h.
size_t size | ( | ) | const |
Return the size of the array viewed.
Definition at line 224 of file ArrayView.h.