Re: g_object_class_install_property, but no g_object_class_remove_property



Stefan Kost wrote:

Tristan Van Berkom wrote:

<snip>

Stefan, maybe I'm off track but is it saner OO coding to say that you should have a
GStreamerInstrumentClass with the properties: waveform, filter-type etc.
and then derive your GStreamerGuitarClass & GStreamerTrumpetClass to
add more specific properties ?

Cheers,
                                                               -Tristan


it is unfortunately not that easy. In one case I wrap plugins as gstreamer elements. Still my problem with multiple voices and therewith on-demand addition/removal of propertiy-sets remains.

It sounds like you want different sets of properties for each instance of the class, depending on the capabilities of the device it represents.

GObject property definitions are class wide, so if you add or remove a property after class creation, it is going to affect all instances which might not be what you want.

If you really want a different set of properties per instance, you'd need a new class per instance. In that case, you could just add the required properties when you create that class. Of course, this probably uses more memory than you'd prefer.

James.



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