new example
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@841 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
19f72587d9
commit
91340b52d0
6 changed files with 134 additions and 13 deletions
|
|
@ -9,11 +9,9 @@ public:
|
|||
nshapes--;
|
||||
};
|
||||
double x, y;
|
||||
char foo[256];
|
||||
void move(double dx, double dy);
|
||||
virtual double area() = 0;
|
||||
virtual double perimeter() = 0;
|
||||
char *name() { return "Shape"; }
|
||||
static int nshapes;
|
||||
};
|
||||
|
||||
|
|
@ -25,13 +23,6 @@ public:
|
|||
virtual double area();
|
||||
virtual double perimeter();
|
||||
};
|
||||
|
||||
class XCircle : public Circle {
|
||||
public:
|
||||
XCircle(double r) : Circle(r) { };
|
||||
virtual double area();
|
||||
char *name() { return "XCircle"; }
|
||||
};
|
||||
|
||||
class Square : public Shape {
|
||||
private:
|
||||
|
|
|
|||
|
|
@ -6,9 +6,5 @@
|
|||
%}
|
||||
|
||||
/* Let's just grab the original header file here */
|
||||
%typemap(memberin) char [ANY] {
|
||||
strncpy($target,$source,$dim0);
|
||||
}
|
||||
|
||||
%include "example.h"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue