OPAL (Object Oriented Parallel Accelerator Library) 2022.1
OPAL
Public Types | Public Member Functions | Private Attributes | List of all members
ConstSliceIterator< T > Class Template Reference

Iterator for array slice. More...

#include <SliceIterator.h>

Public Types

typedef std::random_access_iterator_tag iterator_category
 The iterator tag, taken from the standard template library. More...
 
typedef const T value_type
 The value type. More...
 
typedef std::ptrdiff_t difference_type
 The pointer difference type. More...
 
typedef const T * pointer
 The pointer type. More...
 
typedef const T & reference
 The reference type. More...
 

Public Member Functions

 ConstSliceIterator (const T *array, std::ptrdiff_t stride)
 Constructor. More...
 
 ConstSliceIterator (const ConstSliceIterator< T > &rhs)
 
ConstSliceIterator< T > & operator= (const ConstSliceIterator< T > &)
 
bool operator== (const ConstSliceIterator< T > &rhs) const
 
bool operator!= (const ConstSliceIterator< T > &rhs) const
 
ConstSliceIterator< T > & operator++ ()
 Increment (iterate forward). More...
 
ConstSliceIterator< T > operator++ (int)
 Increment (iterate forward). More...
 
ConstSliceIterator< T > & operator-- ()
 Decrement (iterate backward). More...
 
ConstSliceIterator< T > operator-- (int)
 Decrement (iterate backward). More...
 
ConstSliceIterator< T > & operator+= (std::ptrdiff_t)
 Add multiple stride and assign. More...
 
ConstSliceIterator< T > & operator-= (std::ptrdiff_t)
 Subtract multiple stride and assign. More...
 
ConstSliceIterator< T > operator+ (std::ptrdiff_t) const
 Add multiple stride. More...
 
ConstSliceIterator< T > operator- (std::ptrdiff_t) const
 Subtract multiple stride. More...
 
difference_type operator- (const ConstSliceIterator< T > &) const
 Get pointer difference. More...
 
const T & operator* () const
 Dereference. More...
 
const T & operator[] (int) const
 Delegate. More...
 

Private Attributes

const T * cursor
 
std::ptrdiff_t stride
 

Detailed Description

template<class T>
class ConstSliceIterator< T >

Iterator for array slice.

Definition at line 107 of file SliceIterator.h.

Member Typedef Documentation

◆ difference_type

template<class T >
typedef std::ptrdiff_t ConstSliceIterator< T >::difference_type

The pointer difference type.

Definition at line 118 of file SliceIterator.h.

◆ iterator_category

template<class T >
typedef std::random_access_iterator_tag ConstSliceIterator< T >::iterator_category

The iterator tag, taken from the standard template library.

Definition at line 112 of file SliceIterator.h.

◆ pointer

template<class T >
typedef const T* ConstSliceIterator< T >::pointer

The pointer type.

Definition at line 121 of file SliceIterator.h.

◆ reference

template<class T >
typedef const T& ConstSliceIterator< T >::reference

The reference type.

Definition at line 124 of file SliceIterator.h.

◆ value_type

template<class T >
typedef const T ConstSliceIterator< T >::value_type

The value type.

Definition at line 115 of file SliceIterator.h.

Constructor & Destructor Documentation

◆ ConstSliceIterator() [1/2]

template<class T >
ConstSliceIterator< T >::ConstSliceIterator ( const T *  array,
std::ptrdiff_t  stride 
)
inline

Constructor.

Definition at line 303 of file SliceIterator.h.

◆ ConstSliceIterator() [2/2]

template<class T >
ConstSliceIterator< T >::ConstSliceIterator ( const ConstSliceIterator< T > &  rhs)
inline

Definition at line 309 of file SliceIterator.h.

Member Function Documentation

◆ operator!=()

template<class T >
bool ConstSliceIterator< T >::operator!= ( const ConstSliceIterator< T > &  rhs) const
inline

Definition at line 329 of file SliceIterator.h.

References ConstSliceIterator< T >::cursor.

◆ operator*()

template<class T >
const T & ConstSliceIterator< T >::operator*
inline

Dereference.

Definition at line 393 of file SliceIterator.h.

◆ operator+()

template<class T >
ConstSliceIterator< T > ConstSliceIterator< T >::operator+ ( std::ptrdiff_t  n) const
inline

Add multiple stride.

Definition at line 375 of file SliceIterator.h.

References Hypervolume::n.

◆ operator++() [1/2]

template<class T >
ConstSliceIterator< T > & ConstSliceIterator< T >::operator++
inline

Increment (iterate forward).

Definition at line 335 of file SliceIterator.h.

◆ operator++() [2/2]

template<class T >
ConstSliceIterator< T > ConstSliceIterator< T >::operator++ ( int  )
inline

Increment (iterate forward).

Definition at line 341 of file SliceIterator.h.

◆ operator+=()

template<class T >
ConstSliceIterator< T > & ConstSliceIterator< T >::operator+= ( std::ptrdiff_t  n)
inline

Add multiple stride and assign.

Definition at line 361 of file SliceIterator.h.

References Hypervolume::n.

◆ operator-() [1/2]

template<class T >
ConstSliceIterator< T >::difference_type ConstSliceIterator< T >::operator- ( const ConstSliceIterator< T > &  rhs) const
inline

Get pointer difference.

Definition at line 388 of file SliceIterator.h.

References ConstSliceIterator< T >::cursor.

◆ operator-() [2/2]

template<class T >
ConstSliceIterator< T > ConstSliceIterator< T >::operator- ( std::ptrdiff_t  n) const
inline

Subtract multiple stride.

Definition at line 381 of file SliceIterator.h.

References Hypervolume::n.

◆ operator--() [1/2]

template<class T >
ConstSliceIterator< T > & ConstSliceIterator< T >::operator--
inline

Decrement (iterate backward).

Definition at line 348 of file SliceIterator.h.

◆ operator--() [2/2]

template<class T >
ConstSliceIterator< T > ConstSliceIterator< T >::operator-- ( int  )
inline

Decrement (iterate backward).

Definition at line 354 of file SliceIterator.h.

◆ operator-=()

template<class T >
ConstSliceIterator< T > & ConstSliceIterator< T >::operator-= ( std::ptrdiff_t  n)
inline

Subtract multiple stride and assign.

Definition at line 368 of file SliceIterator.h.

References Hypervolume::n.

◆ operator=()

template<class T >
ConstSliceIterator< T > & ConstSliceIterator< T >::operator= ( const ConstSliceIterator< T > &  rhs)
inline

Definition at line 315 of file SliceIterator.h.

References ConstSliceIterator< T >::cursor.

◆ operator==()

template<class T >
bool ConstSliceIterator< T >::operator== ( const ConstSliceIterator< T > &  rhs) const
inline

Definition at line 323 of file SliceIterator.h.

References ConstSliceIterator< T >::cursor.

◆ operator[]()

template<class T >
const T & ConstSliceIterator< T >::operator[] ( int  n) const
inline

Delegate.

Definition at line 398 of file SliceIterator.h.

References Hypervolume::n.

Member Data Documentation

◆ cursor

template<class T >
const T* ConstSliceIterator< T >::cursor
mutableprivate

◆ stride

template<class T >
std::ptrdiff_t ConstSliceIterator< T >::stride
mutableprivate

Definition at line 171 of file SliceIterator.h.


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