add test case using 'super'
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6864 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
69076dd0da
commit
256dcda5f8
3 changed files with 64 additions and 0 deletions
37
Examples/test-suite/director_constructor.i
Normal file
37
Examples/test-suite/director_constructor.i
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
%module(directors="1") director_constructor
|
||||
|
||||
%feature("director") Foo;
|
||||
|
||||
%inline %{
|
||||
class Foo
|
||||
{
|
||||
public:
|
||||
int a;
|
||||
|
||||
Foo(int i)
|
||||
{
|
||||
a=i;
|
||||
}
|
||||
|
||||
virtual ~Foo() { }
|
||||
|
||||
int do_test() {
|
||||
return test();
|
||||
}
|
||||
|
||||
virtual int getit()
|
||||
{
|
||||
return a;
|
||||
}
|
||||
|
||||
virtual void doubleit()
|
||||
{
|
||||
a = a * 2;
|
||||
}
|
||||
|
||||
virtual int test() = 0;
|
||||
};
|
||||
%}
|
||||
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue