Re: Converting a Glib::ValueBase to a derived type
- From: José Alburquerque <jaalburquerque cox net>
- To: Murray Cumming <murrayc murrayc com>
- Cc: gtkmm-list <gtkmm-list gnome org>
- Subject: Re: Converting a Glib::ValueBase to a derived type
- Date: Wed, 30 Jan 2008 16:51:56 -0500
Murray Cumming wrote:
On Wed, 2008-01-30 at 15:33 -0500, José Alburquerque wrote:
I'm looking at the todo comments in lines 65 and 71 of the structure.hg
file (in gstreamermm). I'm attempting to define the getter methods of
the Gst::Structure along with the id_get_value() method
This one should be quite easy.
(commented
definition) correctly.
More specifically, I modified the StructureValueProxy
This seems to be a way to return two pieces of information (the value
and its name) in the return value. I don't think it will be possible to
do that. It's not that important to have an operator[].
class defined in
structure.hg to use Glib::ValueBase (just checked in to svn). I'm still
a bit unclear about working with Glib::ValueBase so I wrote the attached
test (also checked in). I'm stuck in the last if block where I'm trying
to determine if the value obtained is of the right type.
You can try
G_VALUE_TYPE(value.gobj()):
http://library.gnome.org/devel/gobject/unstable/gobject-Generic-values.html#G-VALUE-TYPE:CAPS
Last question: Once the type is determined, is it practical to attempt
to read the value stored? If so, how would that be done?
-Jose
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]