add basic overloading test + directors
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6348 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
c1ed709013
commit
a69026dc60
1 changed files with 20 additions and 0 deletions
|
|
@ -22,3 +22,23 @@ public:
|
||||||
virtual std::string pong() { return "Foo::pong();" + ping(); }
|
virtual std::string pong() { return "Foo::pong();" + ping(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
%{
|
||||||
|
#include <complex>
|
||||||
|
%}
|
||||||
|
%feature("director") A;
|
||||||
|
%inline %{
|
||||||
|
|
||||||
|
struct A{
|
||||||
|
A(std::complex<int> i, double d=0.0) {}
|
||||||
|
A(int i, bool j=false) {}
|
||||||
|
virtual ~A() {}
|
||||||
|
|
||||||
|
virtual int f(int i=0) {return i;}
|
||||||
|
};
|
||||||
|
|
||||||
|
struct A1 : public A{
|
||||||
|
A1(std::complex<int> i, double d=0.0) : A(i, d) {}
|
||||||
|
A1(int i, bool j=false) : A(i, j) {}
|
||||||
|
};
|
||||||
|
|
||||||
|
%}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue