Re: [gtkmm] TreeView: Row and iterator overrides?



> In ListStore and TreeStore, I added some overrides so that you can do
> stuff with a Row as well as an iterator, in case you've already
> dereferenced the iterator. For instance:
>
> void ListStore::erase(const iterator& iter);
> void ListStore::erase(const Row& row);
>
> BUT, this isn't really necessary because Row happens to inherit from
> iterator. That's just by chance, not because that makes any sense to
> people.
>
> SO, are these overrides useful just to make the API clearer. Could they
> introduce ambiguity for the compiler? I'm thinking of removing them.

I think it is not a very good idea to introduce these overrides. Iterator
is an iterator, it's usage is obvious. Row is a representation of data
source or something, and it is not obvious to use it in this way. And it
doesn't really improve the API, It is just my opinion of course.

Jarek




-----------------------------------------------------------------------
Cher, Morcheeba, Titiyo i wiele innych.
Single gratis. Tylko teraz promocja w Salonie Muzycznym.
http://salon.interia.pl






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