Re: gobject, dynamic loading of classes



Morten O. Hansen wrote:

Hi there,

I have created some small classes with gobject (as a test), and now i
want to do something abit more advanced.

What I want is to create an interface (Say IFruit), and then load the
subclasses as .so-files (apple.so, banana.so and so on)

Does anyone have any hints to how i can do this? or maybe some
applications that actually use this? After looking through the docs, i
looks like its possible, but i would prefer to have som code to look at.


I wonder if you caught this page:
http://developer.gnome.org/doc/API/2.0/gobject/GTypePlugin.html

which basicly lays out an api for that purpose, be carefull not to instantiate
some static GTypes from your module code... of from some other linked in
library for example ;-)

Cheers,
                           -Tristan




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