Initial commit

This commit is contained in:
Bassem Girgis
2018-12-20 17:34:07 -06:00
parent 7a2d899662
commit 81b4b9e273
34743 changed files with 5940233 additions and 0 deletions

View File

@@ -0,0 +1,57 @@
# Examples/xml/Makefile
srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = @top_builddir@
SWIGEXE = $(top_builddir)/swig
SWIG_LIB_DIR = $(top_srcdir)/Lib
SWIG_LIB_SET = @SWIG_LIB_SET@
SWIGINVOKE = $(SWIG_LIB_SET) $(SWIGTOOL) $(SWIGEXE)
cleanup = tail +2 \
| sed -e 's/ident="ID[0-9A-F]*"//g' \
-e 's,name="/[^"]*/\([^/]*\.swg\)",name="\1",g'
all-dot-i-files = \
error.i \
example.i \
example_apply.i \
example_const.i \
example_gif.i \
example_inl.i \
example_p5.i \
example_ro.i \
example_title_add.i \
example_xml.i \
gnarly.i
check:
for f in $(all-dot-i-files) ; do \
base=`basename $$f .i` ; \
xml=$$base.xml ; \
$(SWIGINVOKE) -xml $$xml ${srcdir}/$$f ; \
cat $$xml | $(cleanup) | diff -c ${srcdir}/$$base.expected-xml - ; \
done
clean:
rm -f *.xml
distclean: clean
rm -f Makefile
# from here on, non-developers beware!
%.expected-xml : %.i
$(SWIGINVOKE) -xml tmp-file $^
cat tmp-file | $(cleanup) > $@
rm -f tmp-file
all-expected-xml:
for f in $(all-dot-i-files) ; do \
make `basename $$f .i`.expected-xml ; done
all-expected-xml-clean:
rm -f *.expected-xml
# Examples/xml/Makefile ends here

View File

@@ -0,0 +1,24 @@
<swigxml:swig name="namespaces" xmlns:swigxml="http://jniplusplus.sourceforge.net" xmlns:swig="http://swig.sourceforge.net" xmlns:c="http://www.ansi.org" >
<swig:top >
<swigxml:child >
<swig:file name="../../Lib/swig.swg" >
<swigxml:type string="include" />
</swig:file>
<swig:file name="error.i" >
<swigxml:child >
<swig:module name="error" />
<c:enum >
<swigxml:child >
<c:enumvalue name="RED" >
<swigxml:value string="RED" />
</c:enumvalue>
<c:enumvalue name="GREEN" />
<c:enumvalue name="BLUE" />
</swigxml:child>
</c:enum>
</swigxml:child>
<swigxml:type string="include" />
</swig:file>
</swigxml:child>
</swig:top>
</swigxml:swig>

View File

@@ -0,0 +1,2 @@
%module error
enum { RED=10, GREEN, BLUE };

View File

@@ -0,0 +1,23 @@
<swigxml:swig name="namespaces" xmlns:swigxml="http://jniplusplus.sourceforge.net" xmlns:swig="http://swig.sourceforge.net" xmlns:c="http://www.ansi.org" >
<swig:top >
<swigxml:child >
<swig:file name="../../Lib/swig.swg" >
<swigxml:type string="include" />
</swig:file>
<swig:file name="example.i" >
<swigxml:child >
<swig:module name="example" />
<swig:apply name="OUTPUT" >
<swigxml:parms >
<swigxml:none name="r" >
<swigxml:type string="p.int" />
</swigxml:none>
</swigxml:parms>
<swigxml:type string="p.int" />
</swig:apply>
</swigxml:child>
<swigxml:type string="include" />
</swig:file>
</swigxml:child>
</swig:top>
</swigxml:swig>

View File

@@ -0,0 +1,3 @@
// i add this file because it's referenced by other files.
// someone should replace these comments w/ proper content.
// --ttn, 2001/01/16 17:44:19

View File

@@ -0,0 +1,8 @@
/* File : example.i */
%module example
%apply int *OUTPUT { int *r };

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,23 @@
/* File : example.i */
%module example
/* This example illustrates a couple of different techniques
for manipulating C pointers */
/* First we'll use the pointer library */
extern void add(int *x, int *y, int *result);
%include pointer.i
/* Next we'll use some typemaps */
%include typemaps.i
extern void sub(int *INPUT, int *INPUT, int *OUTPUT);
/* Next we'll use typemaps and the %apply directive */
%apply int *OUTPUT { int *r };
extern int divide(int n, int d, int *r);

View File

@@ -0,0 +1,51 @@
<swigxml:swig name="namespaces" xmlns:swigxml="http://jniplusplus.sourceforge.net" xmlns:swig="http://swig.sourceforge.net" xmlns:c="http://www.ansi.org" >
<swig:top >
<swigxml:child >
<swig:file name="../../Lib/swig.swg" >
<swigxml:type string="include" />
</swig:file>
<swig:file name="example_const.i" >
<swigxml:child >
<swig:module name="example" />
<swig:constant name="ICONST" >
<swigxml:value string="42" />
<swigxml:type string="int" />
</swig:constant>
<swig:constant name="FCONST" >
<swigxml:value string="2.1828" />
<swigxml:type string="double" />
</swig:constant>
<swig:constant name="CCONST" >
<swigxml:value string="x" />
<swigxml:type string="char" />
</swig:constant>
<swig:constant name="CCONST2" >
<swigxml:value string="\n" />
<swigxml:type string="char" />
</swig:constant>
<swig:constant name="SCONST" >
<swigxml:value string="Hello World" />
<swigxml:type string="p.char" />
</swig:constant>
<swig:constant name="SCONST2" >
<swigxml:value string="\&quot;Hello World\&quot;" />
<swigxml:type string="p.char" />
</swig:constant>
<swig:constant name="EXPR" >
<swigxml:value string="42+3*(2.1828)" />
<swigxml:type string="double" />
</swig:constant>
<c:variable name="iconst" >
<swigxml:value string="37" />
<swigxml:type string="q(const).int" />
</c:variable>
<c:variable name="fconst" >
<swigxml:value string="3.14" />
<swigxml:type string="q(const).double" />
</c:variable>
</swigxml:child>
<swigxml:type string="include" />
</swig:file>
</swigxml:child>
</swig:top>
</swigxml:swig>

View File

@@ -0,0 +1,26 @@
/* File : example.i */
%module example
/* A few preprocessor macros */
#define ICONST 42
#define FCONST 2.1828
#define CCONST 'x'
#define CCONST2 '\n'
#define SCONST "Hello World"
#define SCONST2 "\"Hello World\""
/* This should work just fine */
#define EXPR ICONST + 3*(FCONST)
/* This shouldn't do anything */
#define EXTERN extern
/* Neither should this (BAR isn't defined) */
#define FOO (ICONST + BAR)
/* The following statements also produce constants */
const int iconst = 37;
const double fconst = 3.14;

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,104 @@
<swigxml:swig name="namespaces" xmlns:swigxml="http://jniplusplus.sourceforge.net" xmlns:swig="http://swig.sourceforge.net" xmlns:c="http://www.ansi.org" >
<swig:top >
<swigxml:child >
<swig:file name="../../Lib/swig.swg" >
<swigxml:type string="include" />
</swig:file>
<swig:file name="example_inl.i" >
<swigxml:child >
<swig:module name="example" />
<swig:insert >
<swigxml:code >
#include "example.h"
</swigxml:code>
</swig:insert>
<c:function name="dot_product" >
<swigxml:parms >
<swigxml:parm name="a" >
<swigxml:type string="Vector" />
</swigxml:parm>
<swigxml:parm name="b" >
<swigxml:type string="Vector" />
</swigxml:parm>
</swigxml:parms>
<swigxml:storage string="extern" />
<swigxml:type string="double" />
</c:function>
<c:function name="vector_add" >
<swigxml:parms >
<swigxml:parm name="a" >
<swigxml:type string="Vector" />
</swigxml:parm>
<swigxml:parm name="b" >
<swigxml:type string="Vector" />
</swigxml:parm>
</swigxml:parms>
<swigxml:storage string="extern" />
<swigxml:type string="Vector" />
</c:function>
<c:function name="free" >
<swigxml:parms >
<swigxml:parm >
<swigxml:type string="p.void" />
</swigxml:parm>
</swigxml:parms>
<swigxml:type string="void" />
</c:function>
<swig:insert >
<swigxml:code >
Vector *new_Vector(double x, double y, double z) {
Vector *v = (Vector *) malloc(sizeof(Vector));
v->x = x;
v->y = y;
v->z = z;
return v;
}
void vector_print(Vector *v) {
printf("Vector %x = (%g, %g, %g)\n", v, v->x, v->y, v->z);
}
</swigxml:code>
</swig:insert>
<c:function name="new_Vector" >
<swigxml:parms >
<swigxml:parm name="x" >
<swigxml:type string="double" />
</swigxml:parm>
<swigxml:parm name="y" >
<swigxml:type string="double" />
</swigxml:parm>
<swigxml:parm name="z" >
<swigxml:type string="double" />
</swigxml:parm>
</swigxml:parms>
<swigxml:code >
{
Vector *v = (Vector *) malloc(sizeof(Vector));
v->x = x;
v->y = y;
v->z = z;
return v;
} </swigxml:code>
<swigxml:type string="p.Vector" />
</c:function>
<c:function name="vector_print" >
<swigxml:parms >
<swigxml:parm name="v" >
<swigxml:type string="p.Vector" />
</swigxml:parm>
</swigxml:parms>
<swigxml:code >
{
printf("Vector %x = (%g, %g, %g)\n", v, v->x, v->y, v->z);
} </swigxml:code>
<swigxml:type string="void" />
</c:function>
</swigxml:child>
<swigxml:type string="include" />
</swig:file>
</swigxml:child>
</swig:top>
</swigxml:swig>

View File

@@ -0,0 +1,5 @@
/* File : example.h */
typedef struct {
double x, y, z;
} Vector;

View File

@@ -0,0 +1,30 @@
// Tests SWIG's handling of pass-by-value for complex datatypes
%module example
%{
#include "example.h"
%}
/* Some functions that manipulate Vectors by value */
extern double dot_product(Vector a, Vector b);
extern Vector vector_add(Vector a, Vector b);
/* Include this because the vector_add() function will leak memory */
void free(void *);
/* Some helper functions for our interface */
%inline %{
Vector *new_Vector(double x, double y, double z) {
Vector *v = (Vector *) malloc(sizeof(Vector));
v->x = x;
v->y = y;
v->z = z;
return v;
}
void vector_print(Vector *v) {
printf("Vector %p = (%g, %g, %g)\n", v, v->x, v->y, v->z);
}
%}

View File

@@ -0,0 +1,24 @@
<swigxml:swig name="namespaces" xmlns:swigxml="http://jniplusplus.sourceforge.net" xmlns:swig="http://swig.sourceforge.net" xmlns:c="http://www.ansi.org" >
<swig:top >
<swigxml:child >
<swig:file name="../../Lib/swig.swg" >
<swigxml:type string="include" />
</swig:file>
<swig:file name="example_p5.i" >
<swigxml:child >
<swig:module name="example" />
<swig:insert >
<swigxml:code >
#include "example.h"
</swigxml:code>
</swig:insert>
<swig:file name="example.h" >
<swigxml:type string="include" />
</swig:file>
</swigxml:child>
<swigxml:type string="include" />
</swig:file>
</swigxml:child>
</swig:top>
</swigxml:swig>

View File

@@ -0,0 +1,11 @@
/* File : example.i */
%module example
%{
#include "example.h"
%}
/* Let's just grab the original header file here */
%include "example.h"

View File

@@ -0,0 +1,23 @@
<swigxml:swig name="namespaces" xmlns:swigxml="http://jniplusplus.sourceforge.net" xmlns:swig="http://swig.sourceforge.net" xmlns:c="http://www.ansi.org" >
<swig:top >
<swigxml:child >
<swig:file name="../../Lib/swig.swg" >
<swigxml:type string="include" />
</swig:file>
<swig:file name="example_ro.i" >
<swigxml:child >
<swig:pragma name="readonly" />
<c:variable name="status" >
<swigxml:storage string="extern" />
<swigxml:type string="int" />
</c:variable>
<c:variable name="path" >
<swigxml:storage string="extern" />
<swigxml:type string="a(256).char" />
</c:variable>
</swigxml:child>
<swigxml:type string="include" />
</swig:file>
</swigxml:child>
</swig:top>
</swigxml:swig>

View File

@@ -0,0 +1,6 @@
/* File : example.i */
%readonly
extern int status;
extern char path[256];

View File

@@ -0,0 +1,119 @@
<swigxml:swig name="namespaces" xmlns:swigxml="http://jniplusplus.sourceforge.net" xmlns:swig="http://swig.sourceforge.net" xmlns:c="http://www.ansi.org" >
<swig:top >
<swigxml:child >
<swig:file name="../../Lib/swig.swg" >
<swigxml:type string="include" />
</swig:file>
<swig:file name="example_title_add.i" >
<swigxml:child >
<swig:module name="example" />
<swig:insert >
<swigxml:code >
#include "example.h"
</swigxml:code>
</swig:insert>
<c:class name="Vector" >
<swigxml:child >
<c:access name="public" />
<c:function name="Vector" >
<swigxml:parms >
<swigxml:parm name="x" >
<swigxml:type string="double" />
</swigxml:parm>
<swigxml:parm name="y" >
<swigxml:type string="double" />
</swigxml:parm>
<swigxml:parm name="z" >
<swigxml:type string="double" />
</swigxml:parm>
</swigxml:parms>
<swigxml:type string="int" />
</c:function>
<c:destructor name="Vector" />
<c:function name="print" >
<swigxml:type string="p.char" />
</c:function>
</swigxml:child>
<swigxml:classtype string="class" />
<swigxml:namespace string="Vector" />
</c:class>
<swig:insert >
<swigxml:code >
Vector addv(Vector &amp;a, Vector &amp;b) {
return a+b;
}
</swigxml:code>
</swig:insert>
<c:function name="addv" >
<swigxml:parms >
<swigxml:parm name="a" >
<swigxml:type string="r.Vector" />
</swigxml:parm>
<swigxml:parm name="b" >
<swigxml:type string="r.Vector" />
</swigxml:parm>
</swigxml:parms>
<swigxml:code >
{
return a+b;
} </swigxml:code>
<swigxml:type string="Vector" />
</c:function>
<c:class name="VectorArray" >
<swigxml:child >
<c:access name="public" />
<c:function name="VectorArray" >
<swigxml:parms >
<swigxml:parm name="maxsize" >
<swigxml:type string="int" />
</swigxml:parm>
</swigxml:parms>
<swigxml:type string="int" />
</c:function>
<c:destructor name="VectorArray" />
<c:function name="size" >
<swigxml:type string="int" />
</c:function>
<swig:addmethods >
<swigxml:child >
<c:function name="get" >
<swigxml:parms >
<swigxml:parm name="index" >
<swigxml:type string="int" />
</swigxml:parm>
</swigxml:parms>
<swigxml:code >
{
return (*self)[index];
} </swigxml:code>
<swigxml:type string="r.Vector" />
</c:function>
<c:function name="set" >
<swigxml:parms >
<swigxml:parm name="index" >
<swigxml:type string="int" />
</swigxml:parm>
<swigxml:parm name="a" >
<swigxml:type string="r.Vector" />
</swigxml:parm>
</swigxml:parms>
<swigxml:code >
{
(*self)[index] = a;
} </swigxml:code>
<swigxml:type string="void" />
</c:function>
</swigxml:child>
</swig:addmethods>
</swigxml:child>
<swigxml:classtype string="class" />
<swigxml:namespace string="VectorArray" />
</c:class>
</swigxml:child>
<swigxml:type string="include" />
</swig:file>
</swigxml:child>
</swig:top>
</swigxml:swig>

View File

@@ -0,0 +1,47 @@
/* File : example.i */
%title "Matrix and vector package"
/* This file has a few "typical" uses of C++ references. */
%module example
%{
#include "example.h"
%}
class Vector {
public:
Vector(double x, double y, double z);
~Vector();
char *print();
};
/* This helper function calls an overloaded operator */
%inline %{
Vector addv(Vector &a, Vector &b) {
return a+b;
}
%}
/* Wrapper around an array of vectors class */
class VectorArray {
public:
VectorArray(int maxsize);
~VectorArray();
int size();
/* This wrapper provides an alternative to the [] operator */
%addmethods {
Vector &get(int index) {
return (*self)[index];
}
void set(int index, Vector &a) {
(*self)[index] = a;
}
}
};

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,39 @@
/* File : example.h */
class Shape {
public:
Shape() {
nshapes++;
}
virtual ~Shape() {
nshapes--;
};
double x, y;
void move(double dx, double dy);
virtual double area() = 0;
virtual double perimeter() = 0;
static int nshapes;
};
class Circle : public Shape {
private:
double radius;
public:
Circle(double r) : radius(r) { };
virtual double area();
virtual double perimeter();
};
class Square : public Shape {
private:
double width;
public:
Square(double w) : width(w) { };
virtual double area();
virtual double perimeter();
};

View File

@@ -0,0 +1,69 @@
/* File : example.i */
%module my_example
enum color { RED=10, BLUE, GREEN };
class Foo {
public:
Foo() { }
enum speed { IMPULSE, WARP, LUDICROUS };
void enum_test(speed s);
};
void enum_test(color c, Foo::speed s);
%include pointer.i
/* Next we'll use some typemaps */
%include typemaps.i
%typemap(out) int * {
WHATEVER MAKES YOU HAPPY AS RESULT
}
%typemap(in) int * {
WHATEVER MAKES YOU HAPPY AS PARAMETER
}
%pragma(xml) DEBUG="false";
extern int * my_gcd(const char * x, int * y[], int * r, int (*op)(int,int)) const;
extern double my_foo;
void my_void();
my_empty();
const double my_dutch = 1.0;
union my_union
{
int my_iii;
char my_ccc;
};
struct my_struct
{
public:
virtual ~my_struct();
int my_foo();
protected:
int my_bar;
double x, y;
virtual double area() = 0;
static int nshapes;
};
class my_class : public my_struct, public my_union
{
public:
my_class( char c );
private:
~my_class();
virtual const int * my_func( my_class , char * * x, int y[], const int & r) const;
double my_foo[128];
const my_int i;
};
typedef int my_int;

View File

@@ -0,0 +1,206 @@
<swigxml:swig name="namespaces" xmlns:swigxml="http://jniplusplus.sourceforge.net" xmlns:swig="http://swig.sourceforge.net" xmlns:c="http://www.ansi.org" >
<swig:top >
<swigxml:child >
<swig:file name="../../Lib/swig.swg" >
<swigxml:type string="include" />
</swig:file>
<swig:file name="gnarly.i" >
<swigxml:child >
<swig:module name="my_check" />
<c:enum name="color" >
<swigxml:child >
<c:enumvalue name="RED" >
<swigxml:value string="RED" />
</c:enumvalue>
<c:enumvalue name="BLUE" />
<c:enumvalue name="GREEN" />
</swigxml:child>
</c:enum>
<c:class name="Foo" >
<swigxml:child >
<c:access name="public" />
<c:function name="Foo" >
<swigxml:code >
{ } </swigxml:code>
<swigxml:type string="int" />
</c:function>
<c:enum name="speed" >
<swigxml:child >
<c:enumvalue name="IMPULSE" />
<c:enumvalue name="WARP" />
<c:enumvalue name="LUDICROUS" />
</swigxml:child>
</c:enum>
<c:function name="enum_test" >
<swigxml:parms >
<swigxml:parm name="s" >
<swigxml:type string="speed" />
</swigxml:parm>
</swigxml:parms>
<swigxml:type string="void" />
</c:function>
</swigxml:child>
<swigxml:classtype string="class" />
<swigxml:namespace string="Foo" />
</c:class>
<c:function name="enum_test" >
<swigxml:parms >
<swigxml:parm name="c" >
<swigxml:type string="color" />
</swigxml:parm>
<swigxml:parm name="s" >
<swigxml:type string="Foo::speed" />
</swigxml:parm>
</swigxml:parms>
<swigxml:type string="void" />
</c:function>
<swig:typemap >
<swigxml:code >
{
WHATEVER MAKES YOU HAPPY AS RESULT
} </swigxml:code>
<swigxml:method string="out" />
<swigxml:type string="p.int" />
</swig:typemap>
<swig:typemap >
<swigxml:code >
{
WHATEVER MAKES YOU HAPPY AS PARAMETER
} </swigxml:code>
<swigxml:method string="in" />
<swigxml:type string="p.int" />
</swig:typemap>
<swig:pragma name="DEBUG" >
<swigxml:value string="false" />
<swigxml:lang string="xml" />
</swig:pragma>
<c:function name="my_gcd" >
<swigxml:parms >
<swigxml:parm name="x" >
<swigxml:type string="p.q(const).char" />
</swigxml:parm>
<swigxml:parm name="y" >
<swigxml:type string="a().p.int" />
</swigxml:parm>
<swigxml:parm name="r" >
<swigxml:type string="p.int" />
</swigxml:parm>
<swigxml:parm name="op" >
<swigxml:type string="p.f(int,int).int" />
</swigxml:parm>
</swigxml:parms>
<swigxml:storage string="extern" />
<swigxml:type string="p.int" />
</c:function>
<c:variable name="my_foo" >
<swigxml:storage string="extern" />
<swigxml:type string="double" />
</c:variable>
<c:function name="my_void" >
<swigxml:type string="void" />
</c:function>
<c:function name="my_empty" >
<swigxml:type string="int" />
</c:function>
<c:variable name="my_dutch" >
<swigxml:value string="1.0" />
<swigxml:type string="q(const).double" />
</c:variable>
<c:class name="my_union" >
<swigxml:child >
<c:variable name="my_iii" >
<swigxml:type string="int" />
</c:variable>
<c:variable name="my_ccc" >
<swigxml:type string="char" />
</c:variable>
</swigxml:child>
<swigxml:classtype string="union" />
<swigxml:namespace string="my_union" />
</c:class>
<c:class name="my_struct" >
<swigxml:child >
<c:access name="public" />
<c:destructor name="my_struct" >
<swigxml:storage string="virtual" />
</c:destructor>
<c:function name="my_foo" >
<swigxml:type string="int" />
</c:function>
<c:access name="protected" />
<c:variable name="my_bar" >
<swigxml:type string="int" />
</c:variable>
<c:variable name="x" >
<swigxml:type string="double" />
</c:variable>
<c:variable name="y" >
<swigxml:type string="double" />
</c:variable>
<c:function name="area" >
<swigxml:abstract string="1" />
<swigxml:storage string="virtual" />
<swigxml:type string="double" />
</c:function>
<c:variable name="nshapes" >
<swigxml:storage string="static" />
<swigxml:type string="int" />
</c:variable>
</swigxml:child>
<swigxml:classtype string="struct" />
<swigxml:namespace string="my_struct" />
</c:class>
<c:class name="my_class" >
<swigxml:child >
<c:access name="public" />
<c:function name="my_class" >
<swigxml:parms >
<swigxml:parm name="c" >
<swigxml:type string="char" />
</swigxml:parm>
</swigxml:parms>
<swigxml:type string="int" />
</c:function>
<c:access name="private" />
<c:destructor name="my_class" />
<c:function name="my_func" >
<swigxml:parms >
<swigxml:parm >
<swigxml:type string="my_class" />
</swigxml:parm>
<swigxml:parm name="x" >
<swigxml:type string="p.p.char" />
</swigxml:parm>
<swigxml:parm name="y" >
<swigxml:type string="a().int" />
</swigxml:parm>
<swigxml:parm name="r" >
<swigxml:type string="r.q(const).int" />
</swigxml:parm>
</swigxml:parms>
<swigxml:storage string="virtual" />
<swigxml:type string="p.q(const).int" />
</c:function>
<c:variable name="my_foo" >
<swigxml:type string="a(128).double" />
</c:variable>
<c:variable name="i" >
<swigxml:type string="q(const).my_int" />
</c:variable>
</swigxml:child>
<swigxml:classtype string="class" />
<swigxml:bases >
<swigxml:item name="my_struct" />
<swigxml:item name="my_union" />
</swigxml:bases>
<swigxml:namespace string="my_class" />
</c:class>
<c:typedef name="my_int" >
<swigxml:type string="int" />
</c:typedef>
</swigxml:child>
<swigxml:type string="include" />
</swig:file>
</swigxml:child>
</swig:top>
</swigxml:swig>

View File

@@ -0,0 +1,63 @@
/* File : check.i */
%module my_check
enum color { RED=10, BLUE, GREEN };
class Foo {
public:
Foo() { }
enum speed { IMPULSE, WARP, LUDICROUS };
void enum_test(speed s);
};
void enum_test(color c, Foo::speed s);
%typemap(out) int * {
WHATEVER MAKES YOU HAPPY AS RESULT
}
%typemap(in) int * {
WHATEVER MAKES YOU HAPPY AS PARAMETER
}
%pragma(xml) DEBUG="false";
extern int * my_gcd(const char * x, int * y[], int * r, int (*op)(int,int)) const;
extern double my_foo;
void my_void();
my_empty();
const double my_dutch = 1.0;
union my_union
{
int my_iii;
char my_ccc;
};
struct my_struct
{
public:
virtual ~my_struct();
int my_foo();
protected:
int my_bar;
double x, y;
virtual double area() = 0;
static int nshapes;
};
class my_class : public my_struct, public my_union
{
public:
my_class( char c );
private:
~my_class();
virtual const int * my_func( my_class , char * * x, int y[], const int & r) const;
double my_foo[128];
const my_int i;
};
typedef int my_int;