Ejemplo n.º 1
0
 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);
         }
     }
 }
Ejemplo n.º 2
0
 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();
     }
 }
Ejemplo n.º 3
0
 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();
     }
 }
Ejemplo n.º 4
0
 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);
 }
Ejemplo n.º 5
0
 public Result() : this(MathCppPINVOKE.new_Result(), true)
 {
 }
Ejemplo n.º 6
0
    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);
    }
Ejemplo n.º 7
0
    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);
    }
Ejemplo n.º 8
0
 public MyCalc() : this(MathCppPINVOKE.new_MyCalc(), true)
 {
     SwigDirectorConnect();
 }