[Kst] Re: Plugin Interface

claude mercier claude.mercier at ias.u-psud.fr
Tue Feb 17 12:31:31 CET 2004

He Georges,

I did not really looked before answering you on this, please find below 
my thought.

Even if not urgent, I think an end user, not like me, would understand 
the thing you offer below than the arrays of pointors ...

George Staikos wrote:

>int myPlug(double *array1, int insize1, double *array2, int insize2, double 
>scalar1, double **output1, int *size1, double **output2, int *size2, void 
>The size arguments above make this format almost as much of a pain as the old 
it's an understandable pain to non good C programmer, we dont mind 
an-avoidable pain, it is just that if most
people are able to understand this, the arrays is more difficult to 
manage for the plugin programmer.

>Is there a better solution?  
may be ? did anyone looked ? I am planning on searching within 2 weeks, 
but it might be too late
I guess if we want to change this we have better to do it once , quickly 
and for good!

>Is this solution enough added value 
>to justify breaking all existing plugins?
The solution is good because, it matches the user defined interface 
(xml) to the plugin
interface and make things easier to manage for end user.
It has a drawback, one could think of a plugin which does nearly the 
same thing
with two different interfaces working for both (2 xml files and one C file)
do we need this ? (definitivly not for end user)

>   In addition, do you think it would be useful to have "constructors" and 
>"destructors" for plugins?  For instance, there could be two symbols in 
>each .so that are used for this, say "create()" and "destroy()".  This could 
>also be specified in the XML file if you want different names.
I missed the point here, dont understand the question.



Claude Mercier                     *  Email: Claude.Mercier at ias.fr  *
Institut d'Astrophysique Spatiale  *  Bat.121  Universite Paris XI  *
Phone 33 (0)1 69 85 86 92          *           91405 ORSAY Cedex    *
Fax   33 (0)1 69 85 86 75          *           FRANCE               *

More information about the Kst mailing list