
Dan Bloomquist
Joaquin M Lopez Munoz wrote:
Dan Bloomquist
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