[gtkmm] TreeIter: const_iterator and reverse iterator



A TreeModel::const_iterator would be like a TreeModel::iterator (a
TreeIter) which returns a const TreeRow* instead of a TreeRow* from
operator*().

So how could we implement this?
a) Derive the const_iterator from the iterator or vice-versa.
b) Make the iterator a template, which can use TreeRow or const TreeRow.

But I'd also like to implement a reverse_iterator. That would be like a
normal iterator, but operator++() would go backwards instead of
forwards. And there would probably be a const reverse_iterator too.
Advice is welcome.
  
-- 
Murray Cumming
www.murrayc.com
murrayc murrayc com




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]