[Ktechlab-devel] Thinking like a Real Programmer (tm).
Julian Bäume
julian at svg4all.de
Fri Jan 8 23:24:30 UTC 2010
On Thursday 07 January 2010 20:53:58 Alan Grimes wrote:
> P Zoltan wrote:
> > Except the plugin system, what other changes you don't like? The rework
> > of the way the simulator interacts with the circuit?
>
> Okay, how do plugins work? How do I write a plugin? I know how to write
> a linkable library, but not a plugin... How do you think plugins should
> work in ktechlab? etc...
A plugin is basically the same. It consists of a shared library (.so file or
.dll, depending on the platform, you are using) and some meta-data. This is
stored in a .desktop file. This file contains information about the interfaces
that are implemented by this plugin (therefor we need to agree on the
interfaces) and other stuff. There is a global plugin-loader class. You tell it
about the interface, you want a plugin for and the plugin-loader will try to
get you an instance of the plugin implementing this interface. This system
works quite good and really helps to keep things simple and provide loose
coupling between independent parts of every software. If your interface is
good, it makes it easy to just switch to another implementation.
bye then
julian
More information about the Ktechlab-devel
mailing list