1 <swigxml:swig name="namespaces" xmlns:swigxml="http://jniplusplus.sourceforge.net" xmlns:swig="http://swig.sourceforge.net" xmlns:c="http://www.ansi.org" >
4 <swig:file name="../../Lib/swig.swg" >
5 <swigxml:type string="include" />
7 <swig:file name="example_inl.i" >
9 <swig:module name="example" />
16 <c:function name="dot_product" >
18 <swigxml:parm name="a" >
19 <swigxml:type string="Vector" />
21 <swigxml:parm name="b" >
22 <swigxml:type string="Vector" />
25 <swigxml:storage string="extern" />
26 <swigxml:type string="double" />
28 <c:function name="vector_add" >
30 <swigxml:parm name="a" >
31 <swigxml:type string="Vector" />
33 <swigxml:parm name="b" >
34 <swigxml:type string="Vector" />
37 <swigxml:storage string="extern" />
38 <swigxml:type string="Vector" />
40 <c:function name="free" >
43 <swigxml:type string="p.void" />
46 <swigxml:type string="void" />
52 Vector *new_Vector(double x, double y, double z) {
53 Vector *v = (Vector *) malloc(sizeof(Vector));
60 void vector_print(Vector *v) {
61 printf("Vector %x = (%g, %g, %g)\n", v, v->x, v->y, v->z);
65 <c:function name="new_Vector" >
67 <swigxml:parm name="x" >
68 <swigxml:type string="double" />
70 <swigxml:parm name="y" >
71 <swigxml:type string="double" />
73 <swigxml:parm name="z" >
74 <swigxml:type string="double" />
79 Vector *v = (Vector *) malloc(sizeof(Vector));
85 <swigxml:type string="p.Vector" />
87 <c:function name="vector_print" >
89 <swigxml:parm name="v" >
90 <swigxml:type string="p.Vector" />
95 printf("Vector %x = (%g, %g, %g)\n", v, v->x, v->y, v->z);
97 <swigxml:type string="void" />
100 <swigxml:type string="include" />