// Test %ignore and %rename for templated methods %module template_methods %warnfilter(SWIGWARN_LANG_TEMPLATE_METHOD_IGNORE) convolve1(); %warnfilter(SWIGWARN_LANG_TEMPLATE_METHOD_IGNORE) convolve3(); %include /////////////////// %ignore convolve1(float a); %inline %{ template int convolve1() { return 0; } template void convolve1(ImageT a) { ImageT t = a; (void)t; } %} %template() convolve1; %template(convolve1Bool) convolve1; /////////////////// %ignore convolve2(float a); %inline %{ template int convolve2() { return 0; } template void convolve2(ImageT a) { ImageT t = a; (void)t; } %} %template(convolve2Float) convolve2; /////////////////// %rename(convolve3FloatRenamed) convolve3(float a); %inline %{ template int convolve3() { return 0; } template void convolve3(ImageT a) { ImageT t = a; (void)t; } %} %template() convolve3; /////////////////// %rename(convolve4FloatRenamed) convolve4(float a); %inline %{ template int convolve4() { return 0; } template void convolve4(ImageT a) { ImageT t = a; (void)t; } %} %template(convolve4Float) convolve4; /////////////////// %rename(convolve5FloatRenamed) convolve5; %ignore convolve5; %inline %{ template int convolve5() { return 0; } template void convolve5(ImageT a) { ImageT t = a; (void)t; } %} %template() convolve5; %template() convolve5; //////////////////////////////////////////////////////////////////////////// %rename(KlassTMethodBoolRenamed) Klass::tmethod(bool); %rename(KlassStaticTMethodBoolRenamed) Klass::statictmethod(bool); %inline %{ struct Klass { template X tmethod(X x) { return x; } template void tmethod() {} template static X statictmethod(X x) { return x; } template static void statictmethod() {} }; %} %template(KlassTMethodBool) Klass::tmethod; %template(KlassStaticTMethodBool) Klass::statictmethod; //////////////////////////////////////////////////////////////////////////// %inline %{ class ComponentProperties{ public: ComponentProperties() {} ~ComponentProperties() {} template void adda(std::string key, T1 val) {} template void adda(std::string key1, T1 val1, std::string key2, T2 val2) {} template void adda(std::string key1, T1 val1, std::string key2, T2 val2, std::string key3, T3 val3) {} }; %} %extend ComponentProperties { %template(adda) adda; %template(adda) adda; // ERROR OCCURS HERE %template(adda) adda; }