12 #ifndef __stir_NestedIterator__H__ 13 #define __stir_NestedIterator__H__ 28 #include "boost/iterator/iterator_traits.hpp" 92 template <
typename topleveliterT,
class GetRestRangeFunctionT = BeginEndFunction<topleveliterT>>
96 typedef typename GetRestRangeFunctionT::rest_iter_type rest_iter_type;
99 typedef std::forward_iterator_tag iterator_category;
100 typedef typename boost::iterator_difference<rest_iter_type>::type difference_type;
101 typedef typename boost::iterator_value<rest_iter_type>::type value_type;
102 typedef typename boost::iterator_reference<rest_iter_type>::type reference;
103 typedef typename boost::iterator_pointer<rest_iter_type>::type pointer;
110 inline NestedIterator(
const topleveliterT& top_level_iter,
const topleveliterT& end_top_level_iter);
116 template <
typename othertopleveliterT,
typename otherGetRestRangeFunctionT>
119 typename boost::enable_if_convertible<othertopleveliterT, topleveliterT>::type* = 0,
120 typename boost::enable_if_convertible<typename otherGetRestRangeFunctionT::rest_iter_type, rest_iter_type>::type* = 0)
121 : _current_top_level_iter(other._current_top_level_iter),
122 _end_top_level_iter(other._end_top_level_iter),
123 _current_rest_iter(other._current_rest_iter),
124 _end_rest_iter(other._end_rest_iter)
141 inline reference operator*()
const;
144 inline pointer operator->()
const;
146 #ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS 151 template <
class,
class>
156 topleveliterT _current_top_level_iter;
159 topleveliterT _end_top_level_iter;
162 rest_iter_type _current_rest_iter;
165 rest_iter_type _end_rest_iter;
169 void _set_rest_iters_for_current_top_level_iter();
NestedIterator(NestedIterator< othertopleveliterT, otherGetRestRangeFunctionT > other, typename boost::enable_if_convertible< othertopleveliterT, topleveliterT >::type *=0, typename boost::enable_if_convertible< typename otherGetRestRangeFunctionT::rest_iter_type, rest_iter_type >::type *=0)
constructor to convert between nested iterators using convertible top and next level iterators ...
Definition: NestedIterator.h:117
This file defines supporting function objects for stir::NestedIterator.
Class NestedIterator implements a (forward) iterator using a pair of 'nested' iterators.
Definition: NestedIterator.h:93
inline implementations for stir::NestedIterator.