
Dan Bloomquist
I have a muti_index for a database. First I'll say, this will be so much better than my old way of running an SQL every time I wanted to change the order. Thanks. I never see a database bigger than some 1200 records, usually <200, so I'm not worried about memory bloat.
So I've wrapped the multi_index in a class that will hide the boost includes from the rest of my app. I'll include the work below. I'd like to treat some kind of interface, like a generic iterator, depending on what order I have set. I would only use one iterator at a time. But the iterators are templated and have no base so that I can easily keep a set of iterators handy, say in a container, and then supply the appropriate iterator through an interface.
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. Joaquín M López Muñoz Telefónica, Investigación y Desarrollo