[C++-sig] Re: SWIG: overriding virtual functions in Python.

David Abrahams dave at boost-consulting.com
Mon Apr 28 20:52:17 CEST 2003


Jacek Generowicz <jacek.generowicz at cern.ch> writes:

>> In Boost this is achieved by doing providing a wrapper class around
>> the original C++ implementation, and giving it a default
>> implementation of the virtual function, which calls back into Python.
>> 
>> Is there a way of doing it in SWIG?

SWIG has to do the same thing; the only way to override a C++ virtual
function is, well, to override it.  Pyste can hide that fact just as
well as SWIG can, though ;-)

-Dave

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com





More information about the Cplusplus-sig mailing list