protected virtual void Dispose(bool disposing) { lock (this) { if (swigCPtr.Handle != global::System.IntPtr.Zero) { if (swigCMemOwn) { swigCMemOwn = false; MathCppPINVOKE.delete_Result(swigCPtr); } swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } } }
public virtual void Print(string v) { if (SwigDerivedClassHasMethod("Print", swigMethodTypes3)) { MathCppPINVOKE.MyCalc_PrintSwigExplicitMyCalc(swigCPtr, v); } else { MathCppPINVOKE.MyCalc_Print(swigCPtr, v); } if (MathCppPINVOKE.SWIGPendingException.Pending) { throw MathCppPINVOKE.SWIGPendingException.Retrieve(); } }
public virtual void DoMath(int n1, int n2, Result r) { if (SwigDerivedClassHasMethod("DoMath", swigMethodTypes0)) { MathCppPINVOKE.MyCalc_DoMathSwigExplicitMyCalc(swigCPtr, n1, n2, Result.getCPtr(r)); } else { MathCppPINVOKE.MyCalc_DoMath(swigCPtr, n1, n2, Result.getCPtr(r)); } if (MathCppPINVOKE.SWIGPendingException.Pending) { throw MathCppPINVOKE.SWIGPendingException.Retrieve(); } }
private void SwigDirectorConnect() { if (SwigDerivedClassHasMethod("DoMath", swigMethodTypes0)) { swigDelegate0 = new SwigDelegateMyCalc_0(SwigDirectorMethodDoMath); } if (SwigDerivedClassHasMethod("add", swigMethodTypes1)) { swigDelegate1 = new SwigDelegateMyCalc_1(SwigDirectorMethodadd); } if (SwigDerivedClassHasMethod("Mul", swigMethodTypes2)) { swigDelegate2 = new SwigDelegateMyCalc_2(SwigDirectorMethodMul); } if (SwigDerivedClassHasMethod("Print", swigMethodTypes3)) { swigDelegate3 = new SwigDelegateMyCalc_3(SwigDirectorMethodPrint); } MathCppPINVOKE.MyCalc_director_connect(swigCPtr, swigDelegate0, swigDelegate1, swigDelegate2, swigDelegate3); }
public Result() : this(MathCppPINVOKE.new_Result(), true) { }
public virtual int Mul(int arg0, int arg1) { int ret = (SwigDerivedClassHasMethod("Mul", swigMethodTypes2) ? MathCppPINVOKE.MyCalc_MulSwigExplicitMyCalc(swigCPtr, arg0, arg1) : MathCppPINVOKE.MyCalc_Mul(swigCPtr, arg0, arg1)); return(ret); }
public virtual int add(int arg0, int arg1) { int ret = (SwigDerivedClassHasMethod("add", swigMethodTypes1) ? MathCppPINVOKE.MyCalc_addSwigExplicitMyCalc(swigCPtr, arg0, arg1) : MathCppPINVOKE.MyCalc_add(swigCPtr, arg0, arg1)); return(ret); }
public MyCalc() : this(MathCppPINVOKE.new_MyCalc(), true) { SwigDirectorConnect(); }