%module(ruby_minherit="1") template_inherit_abstract %warnfilter(SWIGWARN_RUBY_WRONG_NAME) oss::test; /* Ruby, wrong class name */ %warnfilter(SWIGWARN_JAVA_MULTIPLE_INHERITANCE, SWIGWARN_CSHARP_MULTIPLE_INHERITANCE, SWIGWARN_PHP4_MULTIPLE_INHERITANCE) oss::Module; /* C#, Java, Php4 multiple inheritance */ %inline %{ namespace oss { template struct Wrap { }; struct ModuleBase { virtual ~ModuleBase() {} virtual int get() = 0; }; template struct Module : C, ModuleBase { virtual ~Module() {} protected: Module() {} }; template struct HModule : Module > { // virtual int get(); // declaration here works protected: HModule() {} }; } struct B { }; %} namespace oss { %template(Wrap_B) Wrap; %template(Module_B) Module >; %template(HModule_B) HModule; } %inline %{ namespace oss { #ifdef SWIGCSHARP %ignore HModule::get(); // Work around for lack of multiple inheritance support - base ModuleBase is ignored. #endif struct test : HModule { virtual int get() {return 0;} // declaration here breaks swig }; } %}