matio-cpp
v0.2.5
A C++ wrapper of the matio library, with memory ownership handling, to read and write .mat files.
|
#include <matioCpp/Span.h>
Public Types | |
using | element_type = ElementType |
using | value_type = std::remove_cv_t< ElementType > |
using | index_type = std::ptrdiff_t |
using | pointer = element_type * |
using | reference = element_type & |
using | const_reference = const element_type & |
using | iterator = details::span_iterator< Span< ElementType, Extent >, false > |
using | const_iterator = details::span_iterator< Span< ElementType, Extent >, true > |
using | reverse_iterator = std::reverse_iterator< iterator > |
using | const_reverse_iterator = std::reverse_iterator< const_iterator > |
using | size_type = index_type |
Public Member Functions | |
template<bool Dependent = false, class = std::enable_if_t<(Dependent || Extent <= 0)>> | |
MATIOCPP_CONSTEXPR | Span () noexcept |
MATIOCPP_CONSTEXPR | Span (pointer ptr, index_type count) |
MATIOCPP_CONSTEXPR | Span (pointer firstElem, pointer lastElem) |
template<std::size_t N> | |
MATIOCPP_CONSTEXPR | Span (element_type(&arr)[N]) noexcept |
template<std::size_t N, class ArrayElementType = std::remove_const_t<element_type>> | |
MATIOCPP_CONSTEXPR | Span (std::array< ArrayElementType, N > &arr) noexcept |
template<std::size_t N> | |
MATIOCPP_CONSTEXPR | Span (const std::array< std::remove_const_t< element_type >, N > &arr) noexcept |
template<class Container , class = std::enable_if_t<SpanUtils::has_data_method<Container>::value && SpanUtils::has_size_method<Container>::value>> | |
MATIOCPP_CONSTEXPR | Span (Container &cont) |
template<class Container , class = std::enable_if_t<SpanUtils::has_data_method<Container>::value && SpanUtils::has_size_method<Container>::value>> | |
MATIOCPP_CONSTEXPR | Span (const Container &cont) |
MATIOCPP_CONSTEXPR | Span (const Span &other) noexcept=default |
template<class OtherElementType , std::ptrdiff_t OtherExtent, class = std::enable_if_t< details::is_allowed_extent_conversion<OtherExtent, Extent>::value && details::is_allowed_element_type_conversion<OtherElementType, element_type>::value>> | |
MATIOCPP_CONSTEXPR | Span (const Span< OtherElementType, OtherExtent > &other) |
~Span () noexcept=default | |
MATIOCPP_CONSTEXPR Span & | operator= (const Span &other) noexcept=default |
template<std::ptrdiff_t Count> | |
MATIOCPP_CONSTEXPR Span< element_type, Count > | first () const |
template<std::ptrdiff_t Count> | |
MATIOCPP_CONSTEXPR Span< element_type, Count > | last () const |
template<std::ptrdiff_t Offset, std::ptrdiff_t Count = dynamic_extent> | |
MATIOCPP_CONSTEXPR auto | subspan () const -> typename details::calculate_subspan_type< ElementType, Extent, Offset, Count >::type |
MATIOCPP_CONSTEXPR Span< element_type, dynamic_extent > | first (index_type count) const |
MATIOCPP_CONSTEXPR Span< element_type, dynamic_extent > | last (index_type count) const |
MATIOCPP_CONSTEXPR Span< element_type, dynamic_extent > | subspan (index_type offset, index_type count=dynamic_extent) const |
MATIOCPP_CONSTEXPR index_type | size () const noexcept |
MATIOCPP_CONSTEXPR index_type | size_bytes () const noexcept |
MATIOCPP_CONSTEXPR bool | empty () const noexcept |
MATIOCPP_CONSTEXPR reference | operator[] (index_type idx) const |
MATIOCPP_CONSTEXPR const_reference | getVal (index_type idx) const |
MATIOCPP_CONSTEXPR bool | setVal (index_type idx, const_reference val) |
MATIOCPP_CONSTEXPR reference | at (index_type idx) const |
MATIOCPP_CONSTEXPR reference | operator() (index_type idx) const |
MATIOCPP_CONSTEXPR pointer | data () const noexcept |
MATIOCPP_CONSTEXPR iterator | begin () const noexcept |
MATIOCPP_CONSTEXPR iterator | end () const noexcept |
MATIOCPP_CONSTEXPR const_iterator | cbegin () const noexcept |
MATIOCPP_CONSTEXPR const_iterator | cend () const noexcept |
MATIOCPP_CONSTEXPR reverse_iterator | rbegin () const noexcept |
MATIOCPP_CONSTEXPR reverse_iterator | rend () const noexcept |
MATIOCPP_CONSTEXPR const_reverse_iterator | crbegin () const noexcept |
MATIOCPP_CONSTEXPR const_reverse_iterator | crend () const noexcept |
Static Public Attributes | |
static constexpr index_type | extent { Extent } |
using matioCpp::Span< ElementType, Extent >::const_iterator = details::span_iterator<Span<ElementType, Extent>, true> |
using matioCpp::Span< ElementType, Extent >::const_reference = const element_type& |
using matioCpp::Span< ElementType, Extent >::const_reverse_iterator = std::reverse_iterator<const_iterator> |
using matioCpp::Span< ElementType, Extent >::element_type = ElementType |
using matioCpp::Span< ElementType, Extent >::index_type = std::ptrdiff_t |
using matioCpp::Span< ElementType, Extent >::iterator = details::span_iterator<Span<ElementType, Extent>, false> |
using matioCpp::Span< ElementType, Extent >::pointer = element_type* |
using matioCpp::Span< ElementType, Extent >::reference = element_type& |
using matioCpp::Span< ElementType, Extent >::reverse_iterator = std::reverse_iterator<iterator> |
using matioCpp::Span< ElementType, Extent >::size_type = index_type |
using matioCpp::Span< ElementType, Extent >::value_type = std::remove_cv_t<ElementType> |
|
inlinenoexcept |
|
inline |
|
inline |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inline |
|
inline |
|
defaultnoexcept |
|
inline |
|
defaultnoexcept |
|
inline |
Definition at line 548 of file Span.h.
References matioCpp::Span< ElementType, Extent >::operator[]().
|
inlinenoexcept |
Definition at line 553 of file Span.h.
Referenced by matioCpp::Variable::initializeComplexVariable(), matioCpp::operator<(), matioCpp::operator==(), and matioCpp::Span< ElementType, Extent >::rend().
|
inlinenoexcept |
Definition at line 556 of file Span.h.
Referenced by matioCpp::Span< ElementType, Extent >::crend().
|
inlinenoexcept |
Definition at line 557 of file Span.h.
References matioCpp::Span< ElementType, Extent >::size().
Referenced by matioCpp::Span< ElementType, Extent >::crbegin().
|
inlinenoexcept |
Definition at line 562 of file Span.h.
References matioCpp::Span< ElementType, Extent >::cend().
|
inlinenoexcept |
Definition at line 563 of file Span.h.
References matioCpp::Span< ElementType, Extent >::cbegin().
|
inlinenoexcept |
Definition at line 550 of file Span.h.
Referenced by matioCpp::Span< ElementType, Extent >::first(), matioCpp::Variable::initializeComplexVector(), matioCpp::Span< ElementType, Extent >::last(), matioCpp::make_span(), matioCpp::details::span_iterator< Span, IsConst >::operator*(), matioCpp::details::span_iterator< Span, IsConst >::operator->(), matioCpp::Span< ElementType, Extent >::operator[](), matioCpp::Span< ElementType, Extent >::setVal(), and matioCpp::Span< ElementType, Extent >::subspan().
|
inlinenoexcept |
Definition at line 531 of file Span.h.
References matioCpp::Span< ElementType, Extent >::size().
|
inlinenoexcept |
Definition at line 554 of file Span.h.
References matioCpp::Span< ElementType, Extent >::size().
Referenced by matioCpp::Variable::initializeComplexVariable(), matioCpp::operator<(), matioCpp::operator==(), and matioCpp::Span< ElementType, Extent >::rbegin().
|
inline |
Definition at line 483 of file Span.h.
References matioCpp::Span< ElementType, Extent >::data(), and matioCpp::Span< ElementType, Extent >::size().
|
inline |
Definition at line 507 of file Span.h.
References matioCpp::Span< ElementType, Extent >::data(), and matioCpp::Span< ElementType, Extent >::size().
|
inline |
Definition at line 540 of file Span.h.
References matioCpp::Span< ElementType, Extent >::operator[]().
|
inline |
Definition at line 490 of file Span.h.
References matioCpp::Span< ElementType, Extent >::data(), and matioCpp::Span< ElementType, Extent >::size().
|
inline |
Definition at line 513 of file Span.h.
References matioCpp::dynamic_extent, and matioCpp::Span< ElementType, Extent >::size().
|
inline |
Definition at line 549 of file Span.h.
References matioCpp::Span< ElementType, Extent >::operator[]().
|
defaultnoexcept |
|
inline |
Definition at line 534 of file Span.h.
References matioCpp::Span< ElementType, Extent >::data().
Referenced by matioCpp::Span< ElementType, Extent >::at(), matioCpp::Span< ElementType, Extent >::getVal(), and matioCpp::Span< ElementType, Extent >::operator()().
|
inlinenoexcept |
Definition at line 559 of file Span.h.
References matioCpp::Span< ElementType, Extent >::end().
|
inlinenoexcept |
Definition at line 560 of file Span.h.
References matioCpp::Span< ElementType, Extent >::begin().
|
inline |
Definition at line 541 of file Span.h.
References matioCpp::Span< ElementType, Extent >::data().
|
inlinenoexcept |
Definition at line 526 of file Span.h.
Referenced by matioCpp::Span< ElementType, Extent >::cend(), matioCpp::Span< ElementType, Extent >::empty(), matioCpp::Span< ElementType, Extent >::end(), matioCpp::Span< ElementType, Extent >::first(), matioCpp::Variable::initializeComplexVariable(), matioCpp::Variable::initializeComplexVector(), matioCpp::Span< ElementType, Extent >::last(), matioCpp::details::span_iterator< Span, IsConst >::operator*(), matioCpp::details::span_iterator< Span, IsConst >::operator++(), matioCpp::details::span_iterator< Span, IsConst >::operator+=(), matioCpp::details::span_iterator< Span, IsConst >::operator->(), matioCpp::Span< ElementType, Extent >::size_bytes(), and matioCpp::Span< ElementType, Extent >::subspan().
|
inlinenoexcept |
Definition at line 527 of file Span.h.
References matioCpp::Span< ElementType, Extent >::size().
|
inline |
Definition at line 498 of file Span.h.
References matioCpp::Span< ElementType, Extent >::data(), matioCpp::dynamic_extent, and matioCpp::Span< ElementType, Extent >::size().
|
inline |
|
staticconstexpr |