Embedded Template Library 1.0
Loading...
Searching...
No Matches
etl::poly_span< TBase, Extent > Class Template Reference

Poly Span - Fixed Extent. More...

#include <poly_span.h>

Classes

struct  char_ptr_type
 

Public Types

typedef TBase element_type
 
typedef etl::remove_cv< TBase >::type value_type
 
typedef size_t size_type
 
typedef TBasereference
 
typedef const TBaseconst_reference
 
typedef TBasepointer
 
typedef const TBaseconst_pointer
 
typedef private_poly_span::iterator< TBaseiterator
 
typedef ETL_OR_STD::reverse_iterator< iteratorreverse_iterator
 

Public Member Functions

ETL_CONSTEXPR poly_span () ETL_NOEXCEPT
 Default constructor.
 
template<typename TIterator , typename TSize >
ETL_CONSTEXPR poly_span (const TIterator begin_, const TSize) ETL_NOEXCEPT
 Construct from iterator + size.
 
template<typename TIterator >
ETL_CONSTEXPR poly_span (const TIterator begin_, const TIterator)
 Construct from iterators.
 
template<typename U , size_t N>
ETL_CONSTEXPR poly_span (U(&begin_)[N]) ETL_NOEXCEPT
 Construct from C array.
 
template<typename U , size_t N>
ETL_CONSTEXPR poly_span (etl::array< U, N > &a) ETL_NOEXCEPT
 Construct from etl::array.
 
template<typename U , size_t N>
ETL_CONSTEXPR poly_span (const etl::array< U, N > &a) ETL_NOEXCEPT
 Construct from etl::array.
 
ETL_CONSTEXPR poly_span (const poly_span< TBase, Extent > &other) ETL_NOEXCEPT
 Copy constructor.
 
template<typename UBase >
ETL_CONSTEXPR poly_span (const poly_span< UBase, Extent > &other) ETL_NOEXCEPT
 Copy constructor.
 
ETL_NODISCARD ETL_CONSTEXPR reference front () const ETL_NOEXCEPT
 Returns a reference to the first element.
 
ETL_NODISCARD ETL_CONSTEXPR reference back () const ETL_NOEXCEPT
 Returns a reference to the last element.
 
ETL_NODISCARD ETL_CONSTEXPR pointer data () const ETL_NOEXCEPT
 Returns a pointer to the first element of the internal storage.
 
ETL_NODISCARD ETL_CONSTEXPR iterator begin () const ETL_NOEXCEPT
 Returns an iterator to the beginning of the poly_span.
 
ETL_NODISCARD ETL_CONSTEXPR iterator end () const ETL_NOEXCEPT
 Returns an iterator to the end of the poly_span.
 
ETL_CONSTEXPR reverse_iterator rbegin () const ETL_NOEXCEPT
 
ETL_CONSTEXPR reverse_iterator rend () const ETL_NOEXCEPT
 Returns a reverse iterator to the end of the poly_span.
 
ETL_NODISCARD ETL_CONSTEXPR bool empty () const ETL_NOEXCEPT
 Returns true if the poly_span size is zero.
 
ETL_NODISCARD ETL_CONSTEXPR size_t size () const ETL_NOEXCEPT
 Returns the size of the poly_span.
 
ETL_NODISCARD ETL_CONSTEXPR size_t size_of_element () const ETL_NOEXCEPT
 Returns the size of the type stored in the poly_span.
 
ETL_NODISCARD ETL_CONSTEXPR size_t size_bytes () const ETL_NOEXCEPT
 Returns the size of the poly_span in bytes.
 
ETL_CONSTEXPR14 poly_spanoperator= (const poly_span &other) ETL_NOEXCEPT
 Assign from a poly_span.
 
template<typename UBase >
ETL_CONSTEXPR14 poly_spanoperator= (const poly_span< UBase, Extent > &other) ETL_NOEXCEPT
 Assign from a poly_span.
 
ETL_CONSTEXPR reference operator[] (size_t i) const
 Returns a reference to the indexed value.
 
template<size_t COUNT>
ETL_NODISCARD ETL_CONSTEXPR etl::poly_span< element_type, COUNTfirst () const ETL_NOEXCEPT
 Obtains a poly_span that is a view over the first COUNT elements of this poly_span.
 
ETL_NODISCARD ETL_CONSTEXPR etl::poly_span< element_type, etl::dynamic_extent > first (size_t count) const
 Obtains a poly_span that is a view over the first count elements of this poly_span.
 
template<size_t COUNT>
ETL_NODISCARD ETL_CONSTEXPR etl::poly_span< element_type, COUNTlast () const ETL_NOEXCEPT
 Obtains a poly_span that is a view over the last COUNT elements of this poly_span.
 
ETL_NODISCARD ETL_CONSTEXPR etl::poly_span< element_type, etl::dynamic_extent > last (size_t count) const ETL_NOEXCEPT
 Obtains a poly_span that is a view over the last count elements of this poly_span.
 
template<size_t OFFSET, size_t COUNT>
etl::poly_span< element_type, COUNT !=etl::dynamic_extent ? COUNT :Extent - OFFSETsubspan () const
 Obtains a poly_span that is a view from OFFSET over the next COUNT elements of this poly_span.
 
ETL_NODISCARD ETL_CONSTEXPR etl::poly_span< element_type, etl::dynamic_extent > subspan (size_t offset, size_t count=etl::dynamic_extent) const ETL_NOEXCEPT
 Obtains a poly_span that is a view from 'offset' over the next 'count' elements of this poly_span.
 

Static Public Attributes

static ETL_CONSTANT size_t extent = Extent
 

Protected Types

typedef char_ptr_type< TBase >::type char_ptr_t
 

Protected Member Functions

pointer element_at (size_t index) const ETL_NOEXCEPT
 
 poly_span (TBase *pbegin_, size_t offset_, size_t, size_t element_size_) ETL_NOEXCEPT
 

Detailed Description

template<typename TBase, size_t Extent = etl::dynamic_extent>
class etl::poly_span< TBase, Extent >

Poly Span - Fixed Extent.

Constructor & Destructor Documentation

◆ poly_span()

template<typename TBase , size_t Extent = etl::dynamic_extent>
etl::poly_span< TBase, Extent >::poly_span ( TBase pbegin_,
size_t  offset_,
size_t  ,
size_t  element_size_ 
)
inlineprotected

Construct from iterator + offset + element size extent_ is ignored.


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