![]() | It looks that the C++ class hierarchy is mirrored in Python |
![]() | Actually, SWIG wraps a function interface to any class:
import _hw # use _hw.so directly _hw.HelloWorld_set(r1, r2) |
![]() | SWIG also makes a proxy class in hw.py, mirroring the
original C++ class:
import hw # use hw.py interface to _hw.so c = hw.HelloWorld() c.set(r1, r2) # calls _hw.HelloWorld_set(r1, r2) |
![]() | The proxy class introduces overhead |