theplu::yat::utility::StrideIterator< Iter > Class Template Reference

Adaptor using a stride on underlying iterator. More...

#include <yat/utility/StrideIterator.h>

List of all members.

Public Types

typedef Iter iterator_type
 type of underlying iterator

Public Member Functions

 StrideIterator (size_t stride=1)
 default constructor
 StrideIterator (Iter p, size_t stride=1)
 Constructor.
 StrideIterator (const StrideIterator &other)
 Copy constructor.
template<typename I2>
 StrideIterator (StrideIterator< I2 > other, typename boost::enable_if_convertible< I2, Iter >::type *=0)
 Conversion constructor.
StrideIteratoroperator= (const StrideIterator &rhs)
 Assignment operator.
size_t stride (void) const

Friends

class boost::iterator_core_access


Detailed Description

template<typename Iter>
class theplu::yat::utility::StrideIterator< Iter >

Adaptor using a stride on underlying iterator.

Works as underlying iterator except that all arithmetic uses the stride, so e.g., ++StrideIterator returns underlying _iterator+stride


Constructor & Destructor Documentation

template<typename Iter>
theplu::yat::utility::StrideIterator< Iter >::StrideIterator ( size_t  stride = 1  )  [inline, explicit]

default constructor

Using default constructor of BASE iterator.

template<typename Iter>
template<typename I2>
theplu::yat::utility::StrideIterator< Iter >::StrideIterator ( StrideIterator< I2 >  other,
typename boost::enable_if_convertible< I2, Iter >::type *  = 0 
) [inline]

Conversion constructor.

Create a StrideIterator<Iter> from a StrideIterator<I2>. Possible if I2 is convertible to a Iter. Constructor allows implicit conversions such as iterator to const_iterator.


Member Function Documentation

template<typename Iter>
size_t theplu::yat::utility::StrideIterator< Iter >::stride ( void   )  const [inline]

Returns:
stride


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

Generated on Tue Jan 18 02:20:11 2011 for yat by  doxygen 1.5.5