matio-cpp  v0.2.5
A C++ wrapper of the matio library, with memory ownership handling, to read and write .mat files.
matioCpp::details::span_iterator< Span, IsConst > Class Template Reference

#include <matioCpp/Span.h>

Public Types

using iterator_category = std::random_access_iterator_tag
 
using value_type = std::remove_cv_t< element_type_ >
 
using difference_type = typename Span::index_type
 
using reference = std::conditional_t< IsConst, const element_type_, element_type_ > &
 
using pointer = std::add_pointer_t< reference >
 

Public Member Functions

 span_iterator ()=default
 
MATIOCPP_CONSTEXPR span_iterator (const Span *span, typename Span::index_type idx) noexcept
 
template<bool B, std::enable_if_t<!B &&IsConst > * = nullptr>
MATIOCPP_CONSTEXPR span_iterator (const span_iterator< Span, B > &other) noexcept
 
MATIOCPP_CONSTEXPR reference operator* () const
 
MATIOCPP_CONSTEXPR pointer operator-> () const
 
MATIOCPP_CONSTEXPR span_iteratoroperator++ ()
 
MATIOCPP_CONSTEXPR span_iterator operator++ (int)
 
MATIOCPP_CONSTEXPR span_iteratoroperator-- ()
 
MATIOCPP_CONSTEXPR span_iterator operator-- (int)
 
MATIOCPP_CONSTEXPR span_iterator operator+ (difference_type n) const
 
MATIOCPP_CONSTEXPR span_iteratoroperator+= (difference_type n)
 
MATIOCPP_CONSTEXPR span_iterator operator- (difference_type n) const
 
MATIOCPP_CONSTEXPR span_iteratoroperator-= (difference_type n)
 
MATIOCPP_CONSTEXPR difference_type operator- (span_iterator rhs) const
 
MATIOCPP_CONSTEXPR reference operator[] (difference_type n) const
 

Data Fields

friend span_iterator< Span, true >
 

Protected Attributes

const Spanspan_ = nullptr
 
std::ptrdiff_t index_ = 0
 

Friends

MATIOCPP_CONSTEXPR friend bool operator== (span_iterator lhs, span_iterator rhs) noexcept
 
MATIOCPP_CONSTEXPR friend bool operator!= (span_iterator lhs, span_iterator rhs) noexcept
 
MATIOCPP_CONSTEXPR friend bool operator< (span_iterator lhs, span_iterator rhs) noexcept
 
MATIOCPP_CONSTEXPR friend bool operator<= (span_iterator lhs, span_iterator rhs) noexcept
 
MATIOCPP_CONSTEXPR friend bool operator> (span_iterator lhs, span_iterator rhs) noexcept
 
MATIOCPP_CONSTEXPR friend bool operator>= (span_iterator lhs, span_iterator rhs) noexcept
 

Detailed Description

template<class Span, bool IsConst>
class matioCpp::details::span_iterator< Span, IsConst >

Definition at line 176 of file Span.h.

Member Typedef Documentation

◆ difference_type

template<class Span , bool IsConst>
using matioCpp::details::span_iterator< Span, IsConst >::difference_type = typename Span::index_type

Definition at line 184 of file Span.h.

◆ iterator_category

template<class Span , bool IsConst>
using matioCpp::details::span_iterator< Span, IsConst >::iterator_category = std::random_access_iterator_tag

Definition at line 182 of file Span.h.

◆ pointer

template<class Span , bool IsConst>
using matioCpp::details::span_iterator< Span, IsConst >::pointer = std::add_pointer_t<reference>

Definition at line 187 of file Span.h.

◆ reference

template<class Span , bool IsConst>
using matioCpp::details::span_iterator< Span, IsConst >::reference = std::conditional_t<IsConst, const element_type_, element_type_>&

Definition at line 186 of file Span.h.

◆ value_type

template<class Span , bool IsConst>
using matioCpp::details::span_iterator< Span, IsConst >::value_type = std::remove_cv_t<element_type_>

Definition at line 183 of file Span.h.

Constructor & Destructor Documentation

◆ span_iterator() [1/3]

template<class Span , bool IsConst>
matioCpp::details::span_iterator< Span, IsConst >::span_iterator ( )
default

◆ span_iterator() [2/3]

template<class Span , bool IsConst>
MATIOCPP_CONSTEXPR matioCpp::details::span_iterator< Span, IsConst >::span_iterator ( const Span span,
typename Span::index_type  idx 
)
inlinenoexcept

Definition at line 191 of file Span.h.

◆ span_iterator() [3/3]

template<class Span , bool IsConst>
template<bool B, std::enable_if_t<!B &&IsConst > * = nullptr>
MATIOCPP_CONSTEXPR matioCpp::details::span_iterator< Span, IsConst >::span_iterator ( const span_iterator< Span, B > &  other)
inlinenoexcept

Definition at line 197 of file Span.h.

Member Function Documentation

◆ operator*()

◆ operator+()

template<class Span , bool IsConst>
MATIOCPP_CONSTEXPR span_iterator matioCpp::details::span_iterator< Span, IsConst >::operator+ ( difference_type  n) const
inline

Definition at line 242 of file Span.h.

◆ operator++() [1/2]

◆ operator++() [2/2]

template<class Span , bool IsConst>
MATIOCPP_CONSTEXPR span_iterator matioCpp::details::span_iterator< Span, IsConst >::operator++ ( int  )
inline

Definition at line 221 of file Span.h.

◆ operator+=()

◆ operator-() [1/2]

template<class Span , bool IsConst>
MATIOCPP_CONSTEXPR span_iterator matioCpp::details::span_iterator< Span, IsConst >::operator- ( difference_type  n) const
inline

Definition at line 255 of file Span.h.

◆ operator-() [2/2]

template<class Span , bool IsConst>
MATIOCPP_CONSTEXPR difference_type matioCpp::details::span_iterator< Span, IsConst >::operator- ( span_iterator< Span, IsConst >  rhs) const
inline

◆ operator--() [1/2]

template<class Span , bool IsConst>
MATIOCPP_CONSTEXPR span_iterator& matioCpp::details::span_iterator< Span, IsConst >::operator-- ( )
inline

Definition at line 228 of file Span.h.

References matioCpp::details::span_iterator< Span, IsConst >::index_.

◆ operator--() [2/2]

template<class Span , bool IsConst>
MATIOCPP_CONSTEXPR span_iterator matioCpp::details::span_iterator< Span, IsConst >::operator-- ( int  )
inline

Definition at line 235 of file Span.h.

◆ operator-=()

template<class Span , bool IsConst>
MATIOCPP_CONSTEXPR span_iterator& matioCpp::details::span_iterator< Span, IsConst >::operator-= ( difference_type  n)
inline

Definition at line 261 of file Span.h.

◆ operator->()

◆ operator[]()

template<class Span , bool IsConst>
MATIOCPP_CONSTEXPR reference matioCpp::details::span_iterator< Span, IsConst >::operator[] ( difference_type  n) const
inline

Definition at line 269 of file Span.h.

Friends And Related Function Documentation

◆ operator!=

template<class Span , bool IsConst>
MATIOCPP_CONSTEXPR friend bool operator!= ( span_iterator< Span, IsConst >  lhs,
span_iterator< Span, IsConst >  rhs 
)
friend

Definition at line 280 of file Span.h.

◆ operator<

template<class Span , bool IsConst>
MATIOCPP_CONSTEXPR friend bool operator< ( span_iterator< Span, IsConst >  lhs,
span_iterator< Span, IsConst >  rhs 
)
friend

Definition at line 286 of file Span.h.

◆ operator<=

template<class Span , bool IsConst>
MATIOCPP_CONSTEXPR friend bool operator<= ( span_iterator< Span, IsConst >  lhs,
span_iterator< Span, IsConst >  rhs 
)
friend

Definition at line 292 of file Span.h.

◆ operator==

template<class Span , bool IsConst>
MATIOCPP_CONSTEXPR friend bool operator== ( span_iterator< Span, IsConst >  lhs,
span_iterator< Span, IsConst >  rhs 
)
friend

Definition at line 274 of file Span.h.

◆ operator>

template<class Span , bool IsConst>
MATIOCPP_CONSTEXPR friend bool operator> ( span_iterator< Span, IsConst >  lhs,
span_iterator< Span, IsConst >  rhs 
)
friend

Definition at line 298 of file Span.h.

◆ operator>=

template<class Span , bool IsConst>
MATIOCPP_CONSTEXPR friend bool operator>= ( span_iterator< Span, IsConst >  lhs,
span_iterator< Span, IsConst >  rhs 
)
friend

Definition at line 304 of file Span.h.

Field Documentation

◆ index_

◆ span_

◆ span_iterator< Span, true >

template<class Span , bool IsConst>
friend matioCpp::details::span_iterator< Span, IsConst >::span_iterator< Span, true >

Definition at line 195 of file Span.h.


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