LLGL 0.05 Beta
Loading...
Searching...
No Matches
LLGL::ArrayView< T > Class Template Reference

Constant array view container template. Keeps pointer to array and length. More...

#include <ArrayView.h>

Public Types

using value_type = const T
using size_type = std::size_t
using difference_type = std::ptrdiff_t
using const_reference = const T&
using reference = const_reference
using const_pointer = const T*
using pointer = const_pointer
using const_iterator = const T*
using iterator = const_iterator
using const_reverse_iterator = std::reverse_iterator<const_iterator>
using reverse_iterator = const_reverse_iterator

Public Member Functions

 ArrayView ()=default
 ArrayView (const ArrayView &)=default
 ArrayView (ArrayView &&)=default
ArrayView & operator= (const ArrayView &)=default
ArrayView & operator= (ArrayView &&)=default
 ArrayView (const std::initializer_list< T > &list)
 Initializes the array view with an std::initializer_list.
 ArrayView (const_pointer data, size_type size)
 Initializes the array view with a pointer to the data and size.
template<std::size_t N>
 ArrayView (const T(&data)[N])
 Initializes the array view with the specified fixed size array. The size of this container will be equal to the template parameter N.
template<template< typename, typename > class OtherContainer, typename OtherAllocator>
 ArrayView (const OtherContainer< T, OtherAllocator > &other)
bool empty () const
size_type size () const
const_pointer data () const
const_reference at (size_type pos) const
const_reference front () const
const_reference back () const
const_iterator begin () const
const_iterator cbegin () const
const_reverse_iterator rbegin () const
const_reverse_iterator crbegin () const
const_iterator end () const
const_iterator cend () const
const_reverse_iterator rend () const
const_reverse_iterator crend () const
const_reference operator[] (size_type pos) const

Detailed Description

template<typename T>
class LLGL::ArrayView< T >

Constant array view container template. Keeps pointer to array and length.

Template Parameters
TSpecifies the data type of the container elements.

Member Typedef Documentation

◆ const_iterator

template<typename T>
using LLGL::ArrayView< T >::const_iterator = const T*

◆ const_pointer

template<typename T>
using LLGL::ArrayView< T >::const_pointer = const T*

◆ const_reference

template<typename T>
using LLGL::ArrayView< T >::const_reference = const T&

◆ const_reverse_iterator

template<typename T>
using LLGL::ArrayView< T >::const_reverse_iterator = std::reverse_iterator<const_iterator>

◆ difference_type

template<typename T>
using LLGL::ArrayView< T >::difference_type = std::ptrdiff_t

◆ iterator

template<typename T>
using LLGL::ArrayView< T >::iterator = const_iterator

◆ pointer

template<typename T>
using LLGL::ArrayView< T >::pointer = const_pointer

◆ reference

template<typename T>
using LLGL::ArrayView< T >::reference = const_reference

◆ reverse_iterator

template<typename T>
using LLGL::ArrayView< T >::reverse_iterator = const_reverse_iterator

◆ size_type

template<typename T>
using LLGL::ArrayView< T >::size_type = std::size_t

◆ value_type

template<typename T>
using LLGL::ArrayView< T >::value_type = const T

Constructor & Destructor Documentation

◆ ArrayView() [1/7]

template<typename T>
LLGL::ArrayView< T >::ArrayView ( )
default

◆ ArrayView() [2/7]

template<typename T>
LLGL::ArrayView< T >::ArrayView ( const ArrayView< T > & )
default

◆ ArrayView() [3/7]

template<typename T>
LLGL::ArrayView< T >::ArrayView ( ArrayView< T > && )
default

◆ ArrayView() [4/7]

template<typename T>
LLGL::ArrayView< T >::ArrayView ( const std::initializer_list< T > & list)
inline

Initializes the array view with an std::initializer_list.

◆ ArrayView() [5/7]

template<typename T>
LLGL::ArrayView< T >::ArrayView ( const_pointer data,
size_type size )
inline

Initializes the array view with a pointer to the data and size.

◆ ArrayView() [6/7]

template<typename T>
template<std::size_t N>
LLGL::ArrayView< T >::ArrayView ( const T(&) data[N])
inline

Initializes the array view with the specified fixed size array. The size of this container will be equal to the template parameter N.

◆ ArrayView() [7/7]

template<typename T>
template<template< typename, typename > class OtherContainer, typename OtherAllocator>
LLGL::ArrayView< T >::ArrayView ( const OtherContainer< T, OtherAllocator > & other)
inline

Member Function Documentation

◆ at()

template<typename T>
const_reference LLGL::ArrayView< T >::at ( size_type pos) const
inline

◆ back()

template<typename T>
const_reference LLGL::ArrayView< T >::back ( ) const
inline

◆ begin()

template<typename T>
const_iterator LLGL::ArrayView< T >::begin ( ) const
inline

◆ cbegin()

template<typename T>
const_iterator LLGL::ArrayView< T >::cbegin ( ) const
inline

◆ cend()

template<typename T>
const_iterator LLGL::ArrayView< T >::cend ( ) const
inline

◆ crbegin()

template<typename T>
const_reverse_iterator LLGL::ArrayView< T >::crbegin ( ) const
inline

◆ crend()

template<typename T>
const_reverse_iterator LLGL::ArrayView< T >::crend ( ) const
inline

◆ data()

template<typename T>
const_pointer LLGL::ArrayView< T >::data ( ) const
inline

◆ empty()

template<typename T>
bool LLGL::ArrayView< T >::empty ( ) const
inline

◆ end()

template<typename T>
const_iterator LLGL::ArrayView< T >::end ( ) const
inline

◆ front()

template<typename T>
const_reference LLGL::ArrayView< T >::front ( ) const
inline

◆ operator=() [1/2]

template<typename T>
ArrayView & LLGL::ArrayView< T >::operator= ( ArrayView< T > && )
default

◆ operator=() [2/2]

template<typename T>
ArrayView & LLGL::ArrayView< T >::operator= ( const ArrayView< T > & )
default

◆ operator[]()

template<typename T>
const_reference LLGL::ArrayView< T >::operator[] ( size_type pos) const
inline

◆ rbegin()

template<typename T>
const_reverse_iterator LLGL::ArrayView< T >::rbegin ( ) const
inline

◆ rend()

template<typename T>
const_reverse_iterator LLGL::ArrayView< T >::rend ( ) const
inline

◆ size()

template<typename T>
size_type LLGL::ArrayView< T >::size ( ) const
inline

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