libzed 1.9.9
A general-purpose library for quick and simple data manipulation.
 
Loading...
Searching...
No Matches
z::core::arrayLike< T, ITER > Interface Template Referenceabstract

An interface for all objects that can be both iterated over and directly indexed. More...

#include <arrayLike.hpp>

Inheritance diagram for z::core::arrayLike< T, ITER >:
z::core::indexable< T > z::core::iterable< ITER > z::core::array< zstring * > z::core::string< E >

Public Member Functions

virtual int length () const noexcept=0
 Get the length of the array.
 
- Public Member Functions inherited from z::core::indexable< T >
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.
 
- Public Member Functions inherited from z::core::iterable< ITER >
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.
 

Detailed Description

template<typename T, typename ITER>
interface z::core::arrayLike< T, ITER >

An interface for all objects that can be both iterated over and directly indexed.

Member Function Documentation

◆ length()

template<typename T , typename ITER >
virtual int z::core::arrayLike< T, ITER >::length ( ) const
pure virtualnoexcept

Get the length of the array.

Returns
The number of objects in 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 >.


The documentation for this interface was generated from the following file: