PageRenderTime 20ms CodeModel.GetById 12ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/trunk/Examples/xml/example_inl.expected-xml

#
Unknown | 104 lines | 100 code | 4 blank | 0 comment | 0 complexity | 66b78f83f2ce67c874837f8a845e0c20 MD5 | raw file
  1<swigxml:swig name="namespaces" xmlns:swigxml="http://jniplusplus.sourceforge.net" xmlns:swig="http://swig.sourceforge.net" xmlns:c="http://www.ansi.org" >
  2  <swig:top >
  3    <swigxml:child >
  4      <swig:file name="../../Lib/swig.swg" >
  5        <swigxml:type string="include"  />
  6      </swig:file>
  7      <swig:file name="example_inl.i" >
  8        <swigxml:child >
  9          <swig:module name="example"  />
 10          <swig:insert >
 11            <swigxml:code >
 12
 13#include "example.h"
 14            </swigxml:code>
 15          </swig:insert>
 16          <c:function name="dot_product" >
 17            <swigxml:parms >
 18              <swigxml:parm name="a" >
 19                <swigxml:type string="Vector"  />
 20              </swigxml:parm>
 21              <swigxml:parm name="b" >
 22                <swigxml:type string="Vector"  />
 23              </swigxml:parm>
 24            </swigxml:parms>
 25            <swigxml:storage string="extern"  />
 26            <swigxml:type string="double"  />
 27          </c:function>
 28          <c:function name="vector_add" >
 29            <swigxml:parms >
 30              <swigxml:parm name="a" >
 31                <swigxml:type string="Vector"  />
 32              </swigxml:parm>
 33              <swigxml:parm name="b" >
 34                <swigxml:type string="Vector"  />
 35              </swigxml:parm>
 36            </swigxml:parms>
 37            <swigxml:storage string="extern"  />
 38            <swigxml:type string="Vector"  />
 39          </c:function>
 40          <c:function name="free" >
 41            <swigxml:parms >
 42              <swigxml:parm >
 43                <swigxml:type string="p.void"  />
 44              </swigxml:parm>
 45            </swigxml:parms>
 46            <swigxml:type string="void"  />
 47          </c:function>
 48          <swig:insert >
 49            <swigxml:code >
 50
 51
 52Vector *new_Vector(double x, double y, double z) {
 53   Vector *v = (Vector *) malloc(sizeof(Vector));
 54   v->x = x;
 55   v->y = y;
 56   v->z = z;
 57   return v;
 58}
 59
 60void vector_print(Vector *v) {
 61  printf("Vector %x = (%g, %g, %g)\n", v, v->x, v->y, v->z);
 62}
 63            </swigxml:code>
 64          </swig:insert>
 65          <c:function name="new_Vector" >
 66            <swigxml:parms >
 67              <swigxml:parm name="x" >
 68                <swigxml:type string="double"  />
 69              </swigxml:parm>
 70              <swigxml:parm name="y" >
 71                <swigxml:type string="double"  />
 72              </swigxml:parm>
 73              <swigxml:parm name="z" >
 74                <swigxml:type string="double"  />
 75              </swigxml:parm>
 76            </swigxml:parms>
 77            <swigxml:code >
 78{
 79   Vector *v = (Vector *) malloc(sizeof(Vector));
 80   v->x = x;
 81   v->y = y;
 82   v->z = z;
 83   return v;
 84}            </swigxml:code>
 85            <swigxml:type string="p.Vector"  />
 86          </c:function>
 87          <c:function name="vector_print" >
 88            <swigxml:parms >
 89              <swigxml:parm name="v" >
 90                <swigxml:type string="p.Vector"  />
 91              </swigxml:parm>
 92            </swigxml:parms>
 93            <swigxml:code >
 94{
 95  printf("Vector %x = (%g, %g, %g)\n", v, v->x, v->y, v->z);
 96}            </swigxml:code>
 97            <swigxml:type string="void"  />
 98          </c:function>
 99        </swigxml:child>
100        <swigxml:type string="include"  />
101      </swig:file>
102    </swigxml:child>
103  </swig:top>
104</swigxml:swig>