distortos  v0.4.0
object-oriented C++ RTOS for microcontrollers
estd::ContiguousRange< T > Class Template Reference

ContiguousRange template class is a pair of iterators to contiguous sequence of elements in memory. More...

#include <ContiguousRange.hpp>

Public Types

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

Public Member Functions

constexpr ContiguousRange (const iterator beginn, const iterator endd) noexcept
 ContiguousRange's constructor. More...
 
constexpr ContiguousRange () noexcept
 Empty ContiguousRange's constructor. More...
 
constexpr ContiguousRange (const iterator beginn, size_t sizee) noexcept
 ContiguousRange's constructor using iterator and size. More...
 
template<size_t N>
constexpr ContiguousRange (T(&array)[N]) noexcept
 ContiguousRange's constructor using C-style array. More...
 
template<size_t N>
constexpr ContiguousRange (std::array< T, N > &array) noexcept
 ContiguousRange's constructor using std::array. More...
 
template<size_t N>
constexpr ContiguousRange (const std::array< typename std::remove_const< T >::type, N > &array) noexcept
 ContiguousRange's constructor using const std::array. More...
 
constexpr ContiguousRange (T &value) noexcept
 ContiguousRange's constructor using single value. More...
 
template<typename TT = T, typename = typename std::enable_if<std::is_const<TT>::value == true>::type>
constexpr ContiguousRange (const ContiguousRange< typename std::remove_const< TT >::type > &other) noexcept
 ContiguousRange's converting constructor. More...
 
reference operator[] (const size_type i) const noexcept
 ContiguousRange's subscript operator. More...
 
constexpr iterator begin () const noexcept
 
constexpr const_iterator cbegin () const noexcept
 
constexpr const_iterator cend () const noexcept
 
constexpr const_reverse_iterator crbegin () const noexcept
 
constexpr const_reverse_iterator crend () const noexcept
 
constexpr iterator end () const noexcept
 
constexpr reverse_iterator rbegin () const noexcept
 
constexpr reverse_iterator rend () const noexcept
 
constexpr size_type size () const noexcept
 

Private Attributes

iterator begin_
 iterator to first element in the range More...
 
iterator end_
 iterator to "one past the last" element in the range More...
 

Detailed Description

template<typename T>
class estd::ContiguousRange< T >

ContiguousRange template class is a pair of iterators to contiguous sequence of elements in memory.

Template Parameters
Tis the type of data in the range

Member Typedef Documentation

◆ const_iterator

template<typename T>
using estd::ContiguousRange< T >::const_iterator = const value_type*

const_iterator type

◆ const_pointer

template<typename T>
using estd::ContiguousRange< T >::const_pointer = const value_type*

const_pointer type

◆ const_reference

template<typename T>
using estd::ContiguousRange< T >::const_reference = const value_type&

const_reference type

◆ const_reverse_iterator

template<typename T>
using estd::ContiguousRange< T >::const_reverse_iterator = std::reverse_iterator<const_iterator>

const_reverse_iterator type

◆ difference_type

template<typename T>
using estd::ContiguousRange< T >::difference_type = std::ptrdiff_t

difference_type type

◆ iterator

template<typename T>
using estd::ContiguousRange< T >::iterator = value_type*

iterator type

◆ pointer

template<typename T>
using estd::ContiguousRange< T >::pointer = value_type*

pointer type

◆ reference

template<typename T>
using estd::ContiguousRange< T >::reference = value_type&

reference type

◆ reverse_iterator

template<typename T>
using estd::ContiguousRange< T >::reverse_iterator = std::reverse_iterator<iterator>

reverse_iterator type

◆ size_type

template<typename T>
using estd::ContiguousRange< T >::size_type = std::size_t

size_type type

◆ value_type

template<typename T>
using estd::ContiguousRange< T >::value_type = T

value_type type

Constructor & Destructor Documentation

◆ ContiguousRange() [1/8]

template<typename T>
constexpr estd::ContiguousRange< T >::ContiguousRange ( const iterator  beginn,
const iterator  endd 
)
inlinenoexcept

ContiguousRange's constructor.

Parameters
[in]beginnis an iterator to first element in the range
[in]enddis an iterator to "one past the last" element in the range

◆ ContiguousRange() [2/8]

template<typename T>
constexpr estd::ContiguousRange< T >::ContiguousRange ( )
inlinenoexcept

Empty ContiguousRange's constructor.

◆ ContiguousRange() [3/8]

template<typename T>
constexpr estd::ContiguousRange< T >::ContiguousRange ( const iterator  beginn,
size_t  sizee 
)
inlinenoexcept

ContiguousRange's constructor using iterator and size.

Parameters
[in]beginnis an iterator to first element in the range
[in]sizeeis the number of elements in the range

◆ ContiguousRange() [4/8]

template<typename T>
template<size_t N>
constexpr estd::ContiguousRange< T >::ContiguousRange ( T(&)  array[N])
inlineexplicitnoexcept

ContiguousRange's constructor using C-style array.

Template Parameters
Nis the number of elements in the array
Parameters
[in]arrayis the array used to initialize the range

◆ ContiguousRange() [5/8]

template<typename T>
template<size_t N>
constexpr estd::ContiguousRange< T >::ContiguousRange ( std::array< T, N > &  array)
inlineexplicitnoexcept

ContiguousRange's constructor using std::array.

Template Parameters
Nis the number of elements in the array
Parameters
[in]arrayis the array used to initialize the range

◆ ContiguousRange() [6/8]

template<typename T>
template<size_t N>
constexpr estd::ContiguousRange< T >::ContiguousRange ( const std::array< typename std::remove_const< T >::type, N > &  array)
inlineexplicitnoexcept

ContiguousRange's constructor using const std::array.

Template Parameters
Nis the number of elements in the array
Parameters
[in]arrayis the const array used to initialize the range

◆ ContiguousRange() [7/8]

template<typename T>
constexpr estd::ContiguousRange< T >::ContiguousRange ( T &  value)
inlineexplicitnoexcept

ContiguousRange's constructor using single value.

Parameters
[in]valueis a reference to variable used to initialize the range

◆ ContiguousRange() [8/8]

template<typename T>
template<typename TT = T, typename = typename std::enable_if<std::is_const<TT>::value == true>::type>
constexpr estd::ContiguousRange< T >::ContiguousRange ( const ContiguousRange< typename std::remove_const< TT >::type > &  other)
inlineexplicitnoexcept

ContiguousRange's converting constructor.

This constructor is enabled only if T is const. It can be used to convert non-const range to const range.

Parameters
[in]otheris a reference to source of conversion

Member Function Documentation

◆ begin()

template<typename T>
constexpr iterator estd::ContiguousRange< T >::begin ( ) const
inlinenoexcept
Returns
iterator to first element in the range
Here is the caller graph for this function:

◆ cbegin()

template<typename T>
constexpr const_iterator estd::ContiguousRange< T >::cbegin ( ) const
inlinenoexcept
Returns
const_iterator to first element in the range

◆ cend()

template<typename T>
constexpr const_iterator estd::ContiguousRange< T >::cend ( ) const
inlinenoexcept
Returns
const_iterator to "one past the last" element in the range

◆ crbegin()

template<typename T>
constexpr const_reverse_iterator estd::ContiguousRange< T >::crbegin ( ) const
inlinenoexcept
Returns
const_reverse_iterator to first element in the reversed range (last element of the non-reversed range)

◆ crend()

template<typename T>
constexpr const_reverse_iterator estd::ContiguousRange< T >::crend ( ) const
inlinenoexcept
Returns
const_reverse_iterator to "one past the last" element in the reversed range ("one before the first" element of the non-reversed range)

◆ end()

template<typename T>
constexpr iterator estd::ContiguousRange< T >::end ( ) const
inlinenoexcept
Returns
iterator to "one past the last" element in the range
Here is the caller graph for this function:

◆ operator[]()

template<typename T>
reference estd::ContiguousRange< T >::operator[] ( const size_type  i) const
inlinenoexcept

ContiguousRange's subscript operator.

Parameters
[in]iis the index of element that will be accessed
Returns
reference to element at given index

◆ rbegin()

template<typename T>
constexpr reverse_iterator estd::ContiguousRange< T >::rbegin ( ) const
inlinenoexcept
Returns
reverse_iterator to first element in the reversed range (last element of the non-reversed range)
Here is the caller graph for this function:

◆ rend()

template<typename T>
constexpr reverse_iterator estd::ContiguousRange< T >::rend ( ) const
inlinenoexcept
Returns
reverse_iterator to "one past the last" element in the reversed range ("one before the first" element of the non-reversed range)
Here is the caller graph for this function:

◆ size()

template<typename T>
constexpr size_type estd::ContiguousRange< T >::size ( ) const
inlinenoexcept
Returns
number of elements in the range
Here is the caller graph for this function:

Member Data Documentation

◆ begin_

template<typename T>
iterator estd::ContiguousRange< T >::begin_
private

iterator to first element in the range

◆ end_

template<typename T>
iterator estd::ContiguousRange< T >::end_
private

iterator to "one past the last" element in the range


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