// Test %rename directive within %extend %module rename3 namespace Space { // Note no namespace nor class qualification %extend XYZ { %rename(opIntPtrA) operator NotXYZ*() const; %rename(opIntPtrB) operator XYZ*() const; } %extend XYZ { // Note use of type T %rename(opAnother1) operator Another() const; %rename(tMethod1) templateT(T i); %rename(tMethodNotXYZ1) templateNotXYZ(NotXYZ); %rename(tMethodXYZ1) templateXYZ(XYZ); %rename(opT1) operator T(); %rename(opNotXYZ1) operator NotXYZ() const; %rename(opXYZ1) operator XYZ() const; } %extend XYZ { %rename(opAnother2) operator Another() const; %rename(tMethod2) templateT(int i); %rename(tMethodNotXYZ2) templateNotXYZ(NotXYZ); %rename(tMethodXYZ2) templateXYZ(XYZ); %rename(opT2) operator int(); %rename(opNotXYZ2) operator NotXYZ() const; %rename(opXYZ2) operator XYZ() const; } %extend XYZ { %rename(opAnother3) operator Another() const; %rename(tMethod3) templateT(Space::Klass i); %rename(tMethodNotXYZ3) templateNotXYZ(NotXYZ); %rename(tMethodXYZ3) templateXYZ(XYZ); %rename(opT3) operator Space::Klass(); %rename(opNotXYZ3) operator NotXYZ() const; %rename(opXYZ3) operator XYZ() const; } %extend XYZ { %rename(opAnother4 )operator Another() const; %rename(tMethod4) templateT(Space::Enu i); %rename(tMethodNotXYZ4) templateNotXYZ(NotXYZ); %rename(tMethodXYZ4) templateXYZ(XYZ); %rename(opT4) operator Space::Enu(); %rename(opNotXYZ4) operator NotXYZ() const; %rename(opXYZ4) operator XYZ() const; } %extend ABC { %rename(methodABC) method(ABC a) const; %rename(opABC) operator ABC*() const; %rename(methodKlass) method(Klass k) const; %rename(opKlass) operator Klass() const; } } %{ #include "rename.h" %} %include "rename.h" %template(XYZInt) Space::XYZ; %template(XYZDouble) Space::XYZ; %template(XYZKlass) Space::XYZ; %template(XYZEnu) Space::XYZ; %template(NotXYZInt) Space::NotXYZ; %template(NotXYZDouble) Space::NotXYZ; %template(NotXYZKlass) Space::NotXYZ; %template(NotXYZEnu) Space::NotXYZ;