From: Josh C. <jc...@nc...> - 2006-11-30 03:29:17
|
On Wed, 29 Nov 2006, Bill Spotz wrote: > ----------------- > %extend ClassA { > PyObject * set(const string & name, PyObject * value) { ... } > } > %ignore ClassA::set; > %include "ClassA.h" > > %include "ClassB.h" > ----------------- > > where ClassB inherits from ClassA, but implements its own set() > method, which I *DO* want to wrap. However, swig seems to now ignore > ClassB::set, which I find surprising. I can't move '%include > "ClassB.h"' up, because it has to come after '%include "ClassA.h"' > because of the inheritance. I see a few possible solutions. Apparently you can undo the effect of the %ignore with "%rename(set) ClassA::set;" (%ignore is actually an alias for a %rename to a special value). You could insert this between your two %include's. Actually, I think you could have used this as an alternative to rearrangeing things in the first place. Josh |