Fixes to support protected members with director, proper virtual member recognition and support of the nodirector feature
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5485 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
94fa335b14
commit
0f19564193
13 changed files with 380 additions and 37 deletions
36
Examples/test-suite/python/director_nested_runme.py
Normal file
36
Examples/test-suite/python/director_nested_runme.py
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
from director_nested import *
|
||||
|
||||
|
||||
class A(FooBar_int):
|
||||
def do_step(self):
|
||||
return "A::do_step;"
|
||||
|
||||
def get_value(self):
|
||||
return "A::get_value"
|
||||
|
||||
pass
|
||||
|
||||
|
||||
a = A()
|
||||
if a.step() != "Bar::step;Foo::advance;Bar::do_advance;A::do_step;":
|
||||
raise RuntimeError,"Bad A virtual resolution"
|
||||
|
||||
|
||||
class B(FooBar_int):
|
||||
def do_advance(self):
|
||||
return "B::do_advance;" + self.do_step()
|
||||
|
||||
def do_step(self):
|
||||
return "B::do_step;"
|
||||
|
||||
def get_value(self):
|
||||
return "B::get_value"
|
||||
|
||||
pass
|
||||
|
||||
|
||||
b = B()
|
||||
|
||||
if b.step() != "Bar::step;Foo::advance;B::do_advance;B::do_step;":
|
||||
raise RuntimeError,"Bad B virtual resolution"
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue