|
Boost Users : |
Subject: Re: [Boost-users] [MultiIndex] As if one iterator
From: Joaquin M Lopez Munoz (joaquin_at_[hidden])
Date: 2010-06-07 16:29:43
Dan Bloomquist <danb <at> lakeweb.net> writes:
>
> Joaquin M Lopez Munoz wrote:
> > Dan Bloomquist<danb<at> lakeweb.net> writes:
> >
> > Not sure whether this is what you'r after, but have you considered
> > using adobe::any_iterator?
> >
> > http://stlab.adobe.com/classadobe_1_1any__iterator.html
> >
> > adobe::any_iterator is a polymorphic iterator wrapper so that
> > you can use it to handle at run-time any iterator with the specified
> > category (bidirectional, foward, etc.) Kind of like boost::any for
> > general objects, but already specialized for the iterator interface.
> >
> >
> Hi Joaquin,
> Thank you for the link. I'm on tangents right now but have/will look
> over these adobe headers. I have attempted to write my own based on
> itereator_facade. I've gotten all the members to work except for
> dereferance [...]
I suggest you take a deep look at adobe::any_iterator for
inspiration or, better yet, use it directly (it's an all header
library, and the licensing terms are very convenient.) I suspect
using boost::iterator_facade is not the way to go here: for one,
all your iterator wrapper operations (increment, dereference, etc.)
have to be built in terms of a virtual interface , which iterator_facade
does not lends itself to.
JoaquÃn M López Muñoz
Telefónica, Investigación y Desarrollo
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net