VTK  9.3.20240329
Public Types | Public Member Functions | List of all members
vtkTypedDataArrayIterator< Scalar > Class Template Reference

STL-style random access iterator for vtkTypedDataArrays. More...

#include <vtkTypedDataArrayIterator.h>

Public Types

typedef std::random_access_iterator_tag iterator_category
 
typedef Scalar value_type
 
typedef std::ptrdiff_t difference_type
 
typedef Scalar & reference
 
typedef Scalar * pointer
 

Public Member Functions

 vtkTypedDataArrayIterator ()
 
 vtkTypedDataArrayIterator (vtkTypedDataArray< Scalar > *arr, const vtkIdType index=0)
 
 vtkTypedDataArrayIterator (const vtkTypedDataArrayIterator &o)
 
vtkTypedDataArrayIteratoroperator= (vtkTypedDataArrayIterator< Scalar > o)
 
bool operator== (const vtkTypedDataArrayIterator< Scalar > &o) const
 
bool operator!= (const vtkTypedDataArrayIterator< Scalar > &o) const
 
bool operator> (const vtkTypedDataArrayIterator< Scalar > &o) const
 
bool operator>= (const vtkTypedDataArrayIterator< Scalar > &o) const
 
bool operator< (const vtkTypedDataArrayIterator< Scalar > &o) const
 
bool operator<= (const vtkTypedDataArrayIterator< Scalar > &o) const
 
Scalar & operator* ()
 
Scalar * operator-> () const
 
Scalar & operator[] (const difference_type &n)
 
vtkTypedDataArrayIteratoroperator++ ()
 
vtkTypedDataArrayIteratoroperator-- ()
 
vtkTypedDataArrayIterator operator++ (int)
 
vtkTypedDataArrayIterator operator-- (int)
 
vtkTypedDataArrayIterator operator+ (const difference_type &n) const
 
vtkTypedDataArrayIterator operator- (const difference_type &n) const
 
difference_type operator- (const vtkTypedDataArrayIterator &other) const
 
vtkTypedDataArrayIteratoroperator+= (const difference_type &n)
 
vtkTypedDataArrayIteratoroperator-= (const difference_type &n)
 

Detailed Description

template<class Scalar>
class vtkTypedDataArrayIterator< Scalar >

STL-style random access iterator for vtkTypedDataArrays.

vtkTypedDataArrayIterator provides an STL-style iterator that can be used to interact with instances of vtkTypedDataArray. It is intended to provide an alternative to using vtkDataArray::GetVoidPointer() that only uses vtkTypedDataArray API functions to retrieve values. It is especially helpful for safely iterating through subclasses of vtkMappedDataArray, which may not use the same memory layout as a typical vtkDataArray.

NOTE: This class has been superseded by the newer vtkGenericDataArray and vtkArrayDispatch mechanism.

Tests:
vtkTypedDataArrayIterator (Tests)

Definition at line 33 of file vtkTypedDataArrayIterator.h.

Member Typedef Documentation

◆ iterator_category

template<class Scalar >
typedef std::random_access_iterator_tag vtkTypedDataArrayIterator< Scalar >::iterator_category

Definition at line 36 of file vtkTypedDataArrayIterator.h.

◆ value_type

template<class Scalar >
typedef Scalar vtkTypedDataArrayIterator< Scalar >::value_type

Definition at line 37 of file vtkTypedDataArrayIterator.h.

◆ difference_type

template<class Scalar >
typedef std::ptrdiff_t vtkTypedDataArrayIterator< Scalar >::difference_type

Definition at line 38 of file vtkTypedDataArrayIterator.h.

◆ reference

template<class Scalar >
typedef Scalar& vtkTypedDataArrayIterator< Scalar >::reference

Definition at line 39 of file vtkTypedDataArrayIterator.h.

◆ pointer

template<class Scalar >
typedef Scalar* vtkTypedDataArrayIterator< Scalar >::pointer

Definition at line 40 of file vtkTypedDataArrayIterator.h.

Constructor & Destructor Documentation

◆ vtkTypedDataArrayIterator() [1/3]

template<class Scalar >
vtkTypedDataArrayIterator< Scalar >::vtkTypedDataArrayIterator ( )
inline

Definition at line 42 of file vtkTypedDataArrayIterator.h.

◆ vtkTypedDataArrayIterator() [2/3]

template<class Scalar >
vtkTypedDataArrayIterator< Scalar >::vtkTypedDataArrayIterator ( vtkTypedDataArray< Scalar > *  arr,
const vtkIdType  index = 0 
)
inlineexplicit

Definition at line 48 of file vtkTypedDataArrayIterator.h.

◆ vtkTypedDataArrayIterator() [3/3]

template<class Scalar >
vtkTypedDataArrayIterator< Scalar >::vtkTypedDataArrayIterator ( const vtkTypedDataArrayIterator< Scalar > &  o)
inline

Definition at line 54 of file vtkTypedDataArrayIterator.h.

Member Function Documentation

◆ operator=()

template<class Scalar >
vtkTypedDataArrayIterator& vtkTypedDataArrayIterator< Scalar >::operator= ( vtkTypedDataArrayIterator< Scalar >  o)
inline

Definition at line 60 of file vtkTypedDataArrayIterator.h.

◆ operator==()

template<class Scalar >
bool vtkTypedDataArrayIterator< Scalar >::operator== ( const vtkTypedDataArrayIterator< Scalar > &  o) const
inline

Definition at line 67 of file vtkTypedDataArrayIterator.h.

◆ operator!=()

template<class Scalar >
bool vtkTypedDataArrayIterator< Scalar >::operator!= ( const vtkTypedDataArrayIterator< Scalar > &  o) const
inline

Definition at line 72 of file vtkTypedDataArrayIterator.h.

◆ operator>()

template<class Scalar >
bool vtkTypedDataArrayIterator< Scalar >::operator> ( const vtkTypedDataArrayIterator< Scalar > &  o) const
inline

Definition at line 77 of file vtkTypedDataArrayIterator.h.

◆ operator>=()

template<class Scalar >
bool vtkTypedDataArrayIterator< Scalar >::operator>= ( const vtkTypedDataArrayIterator< Scalar > &  o) const
inline

Definition at line 82 of file vtkTypedDataArrayIterator.h.

◆ operator<()

template<class Scalar >
bool vtkTypedDataArrayIterator< Scalar >::operator< ( const vtkTypedDataArrayIterator< Scalar > &  o) const
inline

Definition at line 87 of file vtkTypedDataArrayIterator.h.

◆ operator<=()

template<class Scalar >
bool vtkTypedDataArrayIterator< Scalar >::operator<= ( const vtkTypedDataArrayIterator< Scalar > &  o) const
inline

Definition at line 92 of file vtkTypedDataArrayIterator.h.

◆ operator*()

template<class Scalar >
Scalar& vtkTypedDataArrayIterator< Scalar >::operator* ( )
inline

Definition at line 97 of file vtkTypedDataArrayIterator.h.

◆ operator->()

template<class Scalar >
Scalar* vtkTypedDataArrayIterator< Scalar >::operator-> ( ) const
inline

Definition at line 99 of file vtkTypedDataArrayIterator.h.

◆ operator[]()

template<class Scalar >
Scalar& vtkTypedDataArrayIterator< Scalar >::operator[] ( const difference_type n)
inline

Definition at line 101 of file vtkTypedDataArrayIterator.h.

◆ operator++() [1/2]

template<class Scalar >
vtkTypedDataArrayIterator& vtkTypedDataArrayIterator< Scalar >::operator++ ( )
inline

Definition at line 106 of file vtkTypedDataArrayIterator.h.

◆ operator--() [1/2]

template<class Scalar >
vtkTypedDataArrayIterator& vtkTypedDataArrayIterator< Scalar >::operator-- ( )
inline

Definition at line 112 of file vtkTypedDataArrayIterator.h.

◆ operator++() [2/2]

template<class Scalar >
vtkTypedDataArrayIterator vtkTypedDataArrayIterator< Scalar >::operator++ ( int  )
inline

Definition at line 118 of file vtkTypedDataArrayIterator.h.

◆ operator--() [2/2]

template<class Scalar >
vtkTypedDataArrayIterator vtkTypedDataArrayIterator< Scalar >::operator-- ( int  )
inline

Definition at line 123 of file vtkTypedDataArrayIterator.h.

◆ operator+()

template<class Scalar >
vtkTypedDataArrayIterator vtkTypedDataArrayIterator< Scalar >::operator+ ( const difference_type n) const
inline

Definition at line 128 of file vtkTypedDataArrayIterator.h.

◆ operator-() [1/2]

template<class Scalar >
vtkTypedDataArrayIterator vtkTypedDataArrayIterator< Scalar >::operator- ( const difference_type n) const
inline

Definition at line 133 of file vtkTypedDataArrayIterator.h.

◆ operator-() [2/2]

template<class Scalar >
difference_type vtkTypedDataArrayIterator< Scalar >::operator- ( const vtkTypedDataArrayIterator< Scalar > &  other) const
inline

Definition at line 138 of file vtkTypedDataArrayIterator.h.

◆ operator+=()

template<class Scalar >
vtkTypedDataArrayIterator& vtkTypedDataArrayIterator< Scalar >::operator+= ( const difference_type n)
inline

Definition at line 143 of file vtkTypedDataArrayIterator.h.

◆ operator-=()

template<class Scalar >
vtkTypedDataArrayIterator& vtkTypedDataArrayIterator< Scalar >::operator-= ( const difference_type n)
inline

Definition at line 149 of file vtkTypedDataArrayIterator.h.


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