OTB
9.0.0
Orfeo Toolbox
|
#include <otbSpan.h>
Public Types | |
Typedefs | |
using | element_type = T |
using | value_type = std::remove_cv_t< T > |
using | index_type = std::vcl_size_t |
using | difference_type = std::ptrdiff_t |
using | pointer = T * |
using | const_pointer = T const * |
using | reference = T & |
using | const_reference = T const & |
using | iterator = T * |
using | const_iterator = T const * |
using | reverse_iterator = std::reverse_iterator< iterator > |
using | const_reverse_iterator = std::reverse_iterator< const_iterator > |
Public Member Functions | |
Constructors | |
constexpr | Span () noexcept=default |
constexpr | Span (pointer ptr, index_type count) noexcept |
constexpr | Span (pointer first, pointer last) noexcept |
template<std::vcl_size_t N> | |
constexpr | Span (element_type(&arr)[N]) noexcept |
template<class Container > | |
constexpr | Span (Container &&cont) noexcept |
template<class U > | |
constexpr | Span (const otb::Span< U > &s) noexcept |
constexpr | Span (const Span &other) noexcept=default |
Span & | operator= (Span const &) noexcept=default |
~Span ()=default | |
Iterators | |
OTB_MB_CSTXPR iterator | begin () noexcept |
OTB_MB_CSTXPR iterator | end () noexcept |
constexpr const_iterator | begin () const noexcept |
constexpr const_iterator | end () const noexcept |
constexpr const_iterator | cbegin () const noexcept |
constexpr const_iterator | cend () const noexcept |
OTB_MB_CSTXPR reverse_iterator | rbegin () noexcept |
OTB_MB_CSTXPR reverse_iterator | rend () noexcept |
constexpr const_reverse_iterator | crbegin () const noexcept |
constexpr const_reverse_iterator | crend () const noexcept |
Element access | |
OTB_MB_CSTXPR pointer | data () noexcept |
constexpr const_pointer | data () const noexcept |
OTB_MB_CSTXPR reference | front () noexcept |
constexpr const_reference | front () const noexcept |
OTB_MB_CSTXPR reference | back () noexcept |
constexpr const_reference | back () const noexcept |
OTB_MB_CSTXPR reference | operator[] (index_type p) noexcept |
constexpr const_reference | operator[] (index_type p) const noexcept |
Observers | |
constexpr index_type | size () const noexcept |
constexpr bool | empty () const noexcept |
Subviews | |
pointer | m_buffer = nullptr |
index_type | m_size = 0 |
constexpr Span | first (index_type n) const noexcept |
constexpr Span | last (index_type n) const noexcept |
constexpr Span | subspan (index_type offset, index_type count=std::numeric_limits< index_type >::max()) const noexcept |
Span class inspired by C++20 standard.
std::span
this implementation doesn't follow Lakos Rule but instead non-throwing functions are noexcept
as suggested in https://wg21.link/p1656. Beware to not expect operator[]
to always be noexcept
as it won't be anymore once this class is deprecated in favour of std::span
in a few years.using otb::Span< T >::const_iterator = T const* |
using otb::Span< T >::const_pointer = T const* |
using otb::Span< T >::const_reference = T const& |
using otb::Span< T >::const_reverse_iterator = std::reverse_iterator<const_iterator> |
using otb::Span< T >::difference_type = std::ptrdiff_t |
using otb::Span< T >::element_type = T |
using otb::Span< T >::index_type = std::vcl_size_t |
using otb::Span< T >::reverse_iterator = std::reverse_iterator<iterator> |
using otb::Span< T >::value_type = std::remove_cv_t<T> |
Converting constructor from a contiguous container.
Referenced by otb::Span< T >::first(), otb::Span< T >::last(), and otb::Span< T >::subspan().
|
inlineconstexprnoexcept |
Converting constructor from a contiguous container.
|
inlineconstexprnoexcept |
Converting constructor from a contiguous container.
Definition at line 87 of file otbSpan.h.
References otb::Span< T >::first(), and otb::Span< T >::last().
|
inlineconstexprnoexcept |
Converting constructor from a contiguous container.
|
inlineconstexprnoexcept |
Converting constructor from a contiguous container.
|
inlineconstexprnoexcept |
Converting constructor from a contiguous container.
|
constexprdefaultnoexcept |
Converting constructor from a contiguous container.
|
inlineconstexprnoexcept |
Definition at line 157 of file otbSpan.h.
References otb::Span< T >::data(), otb::Span< T >::empty(), and otb::Span< T >::size().
|
inlinenoexcept |
Definition at line 156 of file otbSpan.h.
References otb::Span< T >::data(), otb::Span< T >::empty(), and otb::Span< T >::size().
|
inlineconstexprnoexcept |
Definition at line 138 of file otbSpan.h.
References otb::Span< T >::data().
|
inlinenoexcept |
Definition at line 136 of file otbSpan.h.
References otb::Span< T >::data().
Referenced by otb::Span< T >::rend().
|
inlineconstexprnoexcept |
Definition at line 140 of file otbSpan.h.
References otb::Span< T >::data().
Referenced by otb::Span< T >::crend().
|
inlineconstexprnoexcept |
Definition at line 141 of file otbSpan.h.
References otb::Span< T >::data(), and otb::Span< T >::size().
Referenced by otb::Span< T >::crbegin().
|
inlineconstexprnoexcept |
Definition at line 146 of file otbSpan.h.
References otb::Span< T >::cend().
|
inlineconstexprnoexcept |
Definition at line 147 of file otbSpan.h.
References otb::Span< T >::cbegin().
|
inlineconstexprnoexcept |
Definition at line 153 of file otbSpan.h.
References otb::Span< T >::m_buffer.
|
inlinenoexcept |
Definition at line 152 of file otbSpan.h.
References otb::Span< T >::m_buffer.
Referenced by otb::Span< T >::back(), otb::Span< T >::begin(), otb::Span< T >::cbegin(), otb::Span< T >::cend(), otb::Span< T >::end(), otb::Span< T >::first(), otb::Span< T >::front(), otb::Span< T >::last(), otb::Span< T >::operator[](), and otb::Span< T >::subspan().
|
inlineconstexprnoexcept |
Definition at line 175 of file otbSpan.h.
References otb::Span< T >::size().
Referenced by otb::Span< T >::back(), otb::Span< T >::front(), and otb::internals::ZipIterator< TImageIterator, ConstOrMutable >::ZipIterator().
|
inlineconstexprnoexcept |
Definition at line 139 of file otbSpan.h.
References otb::Span< T >::data(), and otb::Span< T >::size().
|
inlinenoexcept |
Definition at line 137 of file otbSpan.h.
References otb::Span< T >::data(), and otb::Span< T >::size().
Referenced by otb::Span< T >::rbegin().
|
inlineconstexprnoexcept |
Definition at line 181 of file otbSpan.h.
References otb::Span< T >::data(), otb::Span< T >::size(), and otb::Span< T >::Span().
Referenced by otb::Span< T >::Span().
|
inlineconstexprnoexcept |
Definition at line 155 of file otbSpan.h.
References otb::Span< T >::data(), and otb::Span< T >::empty().
|
inlinenoexcept |
Definition at line 154 of file otbSpan.h.
References otb::Span< T >::data(), and otb::Span< T >::empty().
|
inlineconstexprnoexcept |
Definition at line 183 of file otbSpan.h.
References otb::Span< T >::data(), otb::Span< T >::size(), and otb::Span< T >::Span().
Referenced by otb::Span< T >::Span().
shallow assignment
|
inlineconstexprnoexcept |
Definition at line 165 of file otbSpan.h.
References otb::Span< T >::data(), and otb::Span< T >::size().
|
inlinenoexcept |
Definition at line 160 of file otbSpan.h.
References otb::Span< T >::data(), and otb::Span< T >::size().
|
inlinenoexcept |
Definition at line 144 of file otbSpan.h.
References otb::Span< T >::end().
|
inlinenoexcept |
Definition at line 145 of file otbSpan.h.
References otb::Span< T >::begin().
|
inlineconstexprnoexcept |
Definition at line 174 of file otbSpan.h.
References otb::Span< T >::m_size.
Referenced by otb::Span< T >::back(), otb::Span< T >::cend(), otb::Span< T >::empty(), otb::Span< T >::end(), otb::Span< T >::first(), otb::Span< T >::last(), otb::Span< T >::operator[](), otb::Span< T >::subspan(), and otb::internals::ZipIterator< TImageIterator, ConstOrMutable >::ZipIterator().
|
inlineconstexprnoexcept |
Definition at line 187 of file otbSpan.h.
References otb::Span< T >::data(), otb::Span< T >::size(), and otb::Span< T >::Span().
Definition at line 202 of file otbSpan.h.
Referenced by otb::Span< T >::data().
|
private |
Definition at line 203 of file otbSpan.h.
Referenced by otb::Span< T >::size().