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

Re: gEDA-user: [RFC 2/6] Plugin system



On Saturday 17 January 2009, Mark Rages wrote:
> Can someone define "plug-in" for me?

An executable code module that can be added by the user at run 
time, without recompiling or reconfiguring the whole thing.


> What is the advantage, given that the whole project is
> open-source?

"radical flexibility"!!'

Speaking for gnucap, ......

Most users don't bother with any fancy compile options.  I think 
most use a binary package.

Many users are on a network where the program is installed in a 
public space and managed by someone else.

Given that, plugins provide a way to extend functionality 
without recompiling or reinstalling.  You can use plugins from 
a library, or build them in your own space.

Often someone will make enhancements that they want to share, 
but for some reason it is not desired to put it in with the 
main program for everyone.  Perhaps it is very specialized.  
Perhaps it is an alpha version that is not ready for the 
mainstream.  Perhaps it is a new version that just came out and 
you want it now.  Perhaps it changes something in a way that 
someone else doesn't like.  Plugins make this possible.

A good interface for plugins allows someone adding something new 
to have a documented interface, and to do it without digging 
into the core too deep.

One use of plugins in gEDA now, that we have had forever, is the 
output formats in gnetlist.  When you say "gnetlist -g 
something" .. you are using a plugin.

The plugin interface in gnucap (C++) almost always involves 
making a new class, derived from some base class.  What base 
class it is derived from determines how it is used, or 
the "type" of the plugin.

Gnucap has 6 distinct plugin types..
-- device models
-- commands
-- behavioral modeling functions
-- measures and parameter functions
-- netlist and command languages
-- "other"

In most cases, you can static link a module designed as a 
plugin. and it works the same.  You cannot detach a plugin that 
is static linked, but you can override it, which is almost the 
same.  A set of plugins static linked provides a basic set of 
commands and models, essentially Spice-like functionality.



_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user