Mutable forward iterator to access the data of a StorageView. More...
#include <StorageViewIterator.h>
Public Types | |
| using | Base = StorageViewIteratorBase< Byte > |
Public Types inherited from serialbox::StorageViewIteratorBase< Byte > | |
| using | value_type = Byte |
| using | diffrence_type = std::ptrdiff_t |
| using | pointer = value_type * |
| using | refrence = value_type & |
| using | iterator = StorageViewIteratorBase< Byte > |
| using | iterator_category = std::forward_iterator_tag |
Public Member Functions | |
| StorageViewIterator (const StorageViewIterator &)=default | |
| Copy constructor. | |
| StorageViewIterator (StorageViewIterator &&)=default | |
| Move constructor. | |
| StorageViewIterator (Base::value_type *originPtr, int bytesPerElement, const std::vector< int > &dims, const std::vector< int > &strides, const Slice &slice, bool beginning) | |
| Construct iterator at specific location in the data. More... | |
Public Member Functions inherited from serialbox::StorageViewIteratorBase< Byte > | |
| int | bytesPerElement () noexcept |
| Get bytes per element. | |
| value_type * | ptr () noexcept |
| Get current data pointer. | |
| match_cv_qualifier< value_type, T >::type & | as () noexcept |
| Interpret current data pointer as type ´T´ | |
| match_cv_qualifier< value_type, T >::type & | as () const noexcept |
| const std::vector< int > & | index () const noexcept |
| Get current index position in the data. | |
| StorageViewIteratorBase (const iterator &)=default | |
| Copy constructor. | |
| StorageViewIteratorBase (iterator &&)=default | |
| Move constructor. | |
| StorageViewIteratorBase (value_type *originPtr, int bytesPerElement, const std::vector< int > &dims, const std::vector< int > &strides, const Slice &slice, bool beginning) | |
| Construct iterator at specific location in the data. More... | |
| iterator & | operator= (const iterator &)=default |
| Copy assignment. | |
| iterator & | operator= (iterator &&)=default |
| Move assignment. | |
| bool | operator== (const iterator &right) const noexcept |
| Test for equality. | |
| bool | operator!= (const iterator &right) const noexcept |
| Test for inequality. | |
| iterator & | operator++ () noexcept |
| Pre-increment. | |
| refrence | operator* () noexcept |
| Derefrence. | |
| void | swap (iterator &other) noexcept |
| Swap with other. | |
Additional Inherited Members | |
Protected Member Functions inherited from serialbox::StorageViewIteratorBase< Byte > | |
| int | computeCurrentIndex () const noexcept |
| Compute the current linear index in the data according to the index vector. | |
Protected Attributes inherited from serialbox::StorageViewIteratorBase< Byte > | |
| value_type * | curPtr_ |
| std::vector< int > | index_ |
| bool | end_ |
| value_type * | originPtr_ |
| std::vector< int > | dims_ |
| std::vector< int > | strides_ |
| int | bytesPerElement_ |
| Slice | slice_ |
Mutable forward iterator to access the data of a StorageView.
The data is accessed in column-major order using operator++ (pre-increment).
Definition at line 229 of file StorageViewIterator.h.
|
inline |
Construct iterator at specific location in the data.
| originPtr | Origin pointer of the associated StorageView |
| bytesPerElement | Number of bytes of the underlying data-type |
| dims | Vector of dimensions |
| strides | Vector of strides |
| slice | Slice of the data |
| beginning | Indicate whether the iterator has reached the end |
Definition at line 247 of file StorageViewIterator.h.