stlab.adobe.com Adobe Systems Incorporated
step_iterator_adaptor< DERIVED, IT, S_FN > Class Template Reference

#include <iterator.hpp>

Public Types

typedef std::iterator_traits< IT >::difference_type base_difference_type
 
typedef S_FN::difference_type difference_type
 
typedef boost::iterator_adaptor< DERIVED, IT, boost::use_default, boost::use_default, boost::use_default, typename S_FN::difference_type > parent_type
 
typedef std::iterator_traits< IT >::reference reference
 

Public Member Functions

difference_type step () const
 
 step_iterator_adaptor ()
 
 step_iterator_adaptor (const IT &it, S_FN step_fn=S_FN())
 

Protected Attributes

S_FN _step_fn
 

Friends

class boost::iterator_core_access
 

Detailed Description

template<typename DERIVED, typename IT, typename S_FN>
class adobe::step_iterator_adaptor< DERIVED, IT, S_FN >

An adaptor over an existing iterator that changes the step unit (i.e. distance(it,it+1)) by a given predicate. Instead of calling base's operators ++, –, +=, -=, etc. the adaptor is using the passed policy object S_FN for advancing and for computing the distance between iterators.

Definition at line 336 of file iterator.hpp.

Member Typedef Documentation

§ base_difference_type

typedef std::iterator_traits<IT>::difference_type base_difference_type

Definition at line 339 of file iterator.hpp.

§ difference_type

typedef S_FN::difference_type difference_type

Definition at line 340 of file iterator.hpp.

§ parent_type

typedef boost::iterator_adaptor<DERIVED, IT, boost::use_default, boost::use_default, boost::use_default, typename S_FN::difference_type> parent_type

Definition at line 338 of file iterator.hpp.

§ reference

typedef std::iterator_traits<IT>::reference reference

Definition at line 341 of file iterator.hpp.

Constructor & Destructor Documentation

§ step_iterator_adaptor() [1/2]

Definition at line 343 of file iterator.hpp.

§ step_iterator_adaptor() [2/2]

step_iterator_adaptor ( const IT &  it,
S_FN  step_fn = S_FN() 
)

Definition at line 344 of file iterator.hpp.

Member Function Documentation

§ step()

difference_type step ( ) const

Definition at line 346 of file iterator.hpp.

Friends And Related Function Documentation

§ boost::iterator_core_access

friend class boost::iterator_core_access
friend

Definition at line 351 of file iterator.hpp.

Member Data Documentation

§ _step_fn

S_FN _step_fn
protected

Definition at line 349 of file iterator.hpp.

Copyright © 2006-2007 Adobe Systems Incorporated.

Use of this website signifies your agreement to the Terms of Use and Online Privacy Policy.

Search powered by Google