Re: Gtk::VariantIter replacement



В Пнд, 04/04/2011 в 10:18 +0200, Murray Cumming пишет:
> On Fri, 2011-04-01 at 23:54 +0300, Povietkin Konstantin wrote:
> > В Птн, 01/04/2011 в 22:26 +0200, Murray Cumming пишет:
> > > On Fri, 2011-04-01 at 21:15 +0300, Povietkin Konstantin wrote:
> > > > Gtk::VariantIter is useful only for classes, which are derived from
> > > > Gtk::VariantContainerBase class. Has not it more sense to make
> > > > Gtk::VariantIter more STL-styled?
> > > > 
> > > > For example:
> > > > Gtk::VariantContainerBase::iterator iter;
> > > > Gtk::VariantContainerBase::const_iterator const_iter;
> > > > 
> > > > In my opinion current usage of Gtk::VariantIter is useful only for
> > > > non-OOP languages.
> > > > Am I wrong?
> > > 
> > > A patch would be welcome, but we must freeze the API very soon. For now,
> > > it's probably just a simple wrapper around the C API.
> > > 
> > I can try to write a patch, but I have not enough experience to do this.
> > So I think it'll be better if it do somebody more experienced.
> 
> The variantiter.hg file has this comment, maybe from me:
> "
> //This can't be like a real iterator (like Gtk::TextIter),
> //because g_iter_value_get_next_value() both gets a value and changes
> the iterator.
> //GtkTextIter allows us to go forward and then separately get the
> current value.
> "
> See
> http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#g-variant-iter-next-value
> 
> I guess it's possible, but it would probably be inefficient, involving
> extra copies of the VariantIter. But there's no time for that now, and
> it would probably be best to improve the underlying GVariantIter,
> hopefully by just making API additions. Feel free to open a bug about
> it.
> 
I do not think it's a bug. It's necessary to do some tests. 


-- 
"No Civilization = Freedom"
------------------------------------------------------------------------
Yes, I am a criminal. My crime is that of curiosity.

My crime is that of judging people by what they say and think, not what
they look like.

 



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