35 #ifndef VIGRA_ITERATORADAPTER_HXX 36 #define VIGRA_ITERATORADAPTER_HXX 146 template <
class Policy>
151 typedef typename Policy::BaseType BaseType;
152 typedef typename Policy::value_type value_type;
153 typedef typename Policy::difference_type difference_type;
154 typedef typename Policy::reference reference;
155 typedef typename Policy::index_reference index_reference;
156 typedef typename Policy::pointer pointer;
157 typedef typename Policy::iterator_category iterator_category;
171 Policy::initialize(adaptee_);
175 : adaptee_(o.adaptee_)
183 Policy::initialize(adaptee_);
191 adaptee_ = o.adaptee_;
197 Policy::advance(adaptee_, d);
208 Policy::advance(adaptee_, -d);
219 Policy::increment(adaptee_);
226 Policy::increment(adaptee_);
232 Policy::decrement(adaptee_);
239 Policy::decrement(adaptee_);
245 return Policy::equal(adaptee_, o.adaptee_);
250 return !Policy::equal(adaptee_, o.adaptee_);
255 return Policy::less(adaptee_, o.adaptee_);
260 return !Policy::less(o.adaptee_, adaptee_);
265 return Policy::less(o.adaptee_, adaptee_);
270 return !Policy::less(adaptee_, o.adaptee_);
275 return Policy::difference(adaptee_, o.adaptee_);
278 reference operator*()
const 280 return Policy::dereference(adaptee_);
283 index_reference operator[](difference_type d)
const 285 return Policy::dereference(adaptee_, d);
288 pointer operator->()
const 290 return &Policy::dereference(adaptee_);
305 namespace detail_iterator_facade{
Definition: accessor.hxx:43
IteratorAdaptor(BaseType const &o)
Definition: iteratoradapter.hxx:168
Quickly create 1-dimensional iterator adapters.
Definition: iteratoradapter.hxx:147