missing functionality in Gtk::TreeIter ?
- From: "Joost Ellerbroek" <j ellerbroek gmail com>
- To: gtkmm-list gnome org
- Subject: missing functionality in Gtk::TreeIter ?
- Date: Fri, 25 Aug 2006 11:53:17 +0200
Hi,
Since I'm really just now getting the hang of the concept of iterators I might be wrong here, but it seems to me that implementing operators like +, -, +=, etc makes sense.
For instance, in a program I'm writing at the moment I have to check whether an iterator points to the last element in the list. After the check I want to be able to use the original iterator, so what I do now is this:
if ((++iter)--)
{
... // use the original iter here
}
This to me seems a bit ackward. I also tried comparing the iter to list->children().rbegin(), but apparently forward and backward iterators can't be (directly) compared. Maybe this comparison would work if you dereferenced both iterators, but this also seems ackward to me.
So my question is if it does make sense to add these operators, or if I'm overlooking something?
cheers, Joost
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]