Final tidy up for improved C# SwigDerviedClassHasMethod implementation

This commit is contained in:
William S Fulton 2022-05-26 08:44:51 +01:00
commit 34a27359ae
3 changed files with 8 additions and 3 deletions

View file

@ -50,7 +50,7 @@ public class runme
myNewBar.x = 10;
// Low level implementation check
// my.testSwigDerivedClassHasMethod();
my.testSwigDerivedClassHasMethod();
// These should not call the C# implementations as they are not overridden
int v;

View file

@ -71,11 +71,12 @@
%}
%typemap(cscode) MyClass %{
// low level implementation check for checking MyOverriddenClass
public void testSwigDerivedClassHasMethod() {
if (SwigDerivedClassHasMethod("nonVirtual", swigMethodTypes3))
throw new global::System.Exception("non-overriding non-virtual method would be when connecting director");
throw new global::System.Exception("SwigDerivedClassHasMethod failed checking a non-overriding non-virtual method (nonVirtual)");
if (SwigDerivedClassHasMethod("nonOverride", swigMethodTypes4))
throw new global::System.Exception("non-overriding virtual method would be when connecting director");
throw new global::System.Exception("SwigDerivedClassHasMethod failed checking a non-overriding method (nonOverride)");
}
%}