Re: Function completion for GVariant maybe types?



On Wed, Feb 20, 2013 at 1:44 PM, Markus Elfring <Markus Elfring web de> wrote:
I do not think that I can refer to such preallocated objects if I would like to
reuse a template class like "Gtk::TreeModelColumn".

I disagree to your conclusion here. - I would like to copy the data type
information from the contained value into a new "Nothing GVariant" in an
efficient way. I do not really want to know the concrete copied data type if I
would like that this operation will be supported in a generic way so that it can
be reused by other class libraries like "glibmm".

I can't say I really understand what you want, but in glibmm you can:
Glib::VariantBase v = Glib::VariantBase();
Which will create C++ VariantBase object that does not actually have an allocated
GVariant backing it, e.g. v.gobj() == NULL

In glibmm 2.36 it will be possible to test whether the GVariant is null or not by just
doing if (v), see bugĀ 690121.



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