An interface for all objects that can be both iterated over and directly indexed. More...
#include <arrayLike.hpp>
Public Member Functions | |
virtual int | length () const noexcept=0 |
Get the length of the array. | |
![]() | |
virtual | ~indexable () noexcept |
Virtual destructor. | |
virtual T | at (int index) const =0 |
Function to get the object at the given index. | |
virtual T | operator[] (int index) const |
Function to get the object at the given index. | |
![]() | |
virtual | ~iterable () noexcept |
Virtual destructor. | |
virtual ITER | begin () const noexcept=0 |
Get an iterator for the first element in this object. | |
virtual ITER | end () const noexcept=0 |
Get an iterator after the last element of this object. | |
An interface for all objects that can be both iterated over and directly indexed.
|
pure virtualnoexcept |
Get the length of the array.
Implemented in z::core::array< T >, z::core::array< zstring * >, z::core::circularBuffer< TYPE, LEN >, z::core::string< E >, z::core::string< ascii >, and z::core::string< z::utf8 >.