Change the name of the interface in %feature to be more portable
Use SwigInterface as a suffix to the class name when naming the interface class instead of using a simple I as a prefix. %feature_custom can be used to use I as a prefix if so desired.
This commit is contained in:
parent
5117c77d4a
commit
e1dfad1a3b
4 changed files with 26 additions and 26 deletions
|
|
@ -14,13 +14,13 @@ public class multiple_inheritance_nspace_runme {
|
|||
}
|
||||
|
||||
//Test base class as a parameter in java
|
||||
int jcbase1b(ICBase1 cb1){
|
||||
int jcbase1b(CBase1SwigInterface cb1){
|
||||
return cb1.cbase1y();
|
||||
}
|
||||
int jabase1(IABase1 ab1){
|
||||
int jabase1(ABase1SwigInterface ab1){
|
||||
return ab1.abase1();
|
||||
}
|
||||
int jcbase2(ICBase2 cb2){
|
||||
int jcbase2(CBase2SwigInterface cb2){
|
||||
return cb2.cbase2();
|
||||
}
|
||||
|
||||
|
|
@ -63,26 +63,26 @@ public class multiple_inheritance_nspace_runme {
|
|||
check(b3.abase1()!=309, "Bottom3::abase1() failed");
|
||||
|
||||
//Test interfaces from c++ classes
|
||||
ICBase1 cb1=new CBase1();
|
||||
ICBase2 cb2=new CBase2();
|
||||
CBase1SwigInterface cb1=new CBase1();
|
||||
CBase2SwigInterface cb2=new CBase2();
|
||||
check(cb1.cbase1y()!=1, "CBase1::cbase1y() failed");
|
||||
check(cb2.cbase2()!=2, "CBase2::cbase2() failed");
|
||||
|
||||
//Test nspace class as return value
|
||||
IABase1 ab1=d3.cloneit();
|
||||
ABase1SwigInterface ab1=d3.cloneit();
|
||||
check(ab1.abase1()!=9, "Derived3::abase1() through ABase1 failed");
|
||||
|
||||
//Test concrete base class as return value
|
||||
ICBase1 cb6=d2.cloneit();
|
||||
ICBase2 cb7=d1.cloneit();
|
||||
CBase1SwigInterface cb6=d2.cloneit();
|
||||
CBase2SwigInterface cb7=d1.cloneit();
|
||||
check(cb6.cbase1y()!=6, "Derived2::cbase1y() through CBase1 failed");
|
||||
check(cb7.cbase2()!=4, "Derived1:cbase2() through ABase1 failed");
|
||||
|
||||
//Test multi inheritance
|
||||
ICBase1 cb3=new Derived1();
|
||||
ICBase1 cb4=new Derived3();
|
||||
ICBase2 cb5=new Derived3();
|
||||
IABase1 ab6=new Derived2();
|
||||
CBase1SwigInterface cb3=new Derived1();
|
||||
CBase1SwigInterface cb4=new Derived3();
|
||||
CBase2SwigInterface cb5=new Derived3();
|
||||
ABase1SwigInterface ab6=new Derived2();
|
||||
check(cb3.cbase1y()!=3, "Derived1::cbase1y() through CBase1 failed");
|
||||
check(cb4.cbase1y()!=7, "Derived3::cbase1y() through CBase1 failed");
|
||||
check(cb5.cbase2()!=8, "Derived3::cbase2() through CBase2 failed");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue