Пример #1
0
        public static Parent InstantiateConcreteObject(IntPtr cPtr, bool owner)
        {
            Parent ret = null;

            if (cPtr == IntPtr.Zero)
            {
                return(ret);
            }
            int type = CppApiPINVOKE.Parent_WhatAmI(new HandleRef(null, cPtr));

            switch (type)
            {
            case 0:
                ret = new Parent(cPtr, owner);
                break;

            case 1:
                ret = new Child(cPtr, owner);
                break;

            // Repeat for every other concrete type.
            default:
                System.Diagnostics.Debug.Assert(false,
                                                String.Format("Encountered type '{0}' that is not any known concrete class",
                                                              type.ToString()));
                break;
            }
            return(ret);
        }
Пример #2
0
        public static Parent GimmeAChildAsAParent()
        {
            IntPtr cPtr = CppApiPINVOKE.Factory_GimmeAChildAsAParent();
            Parent ret  = (Parent)CppApiPINVOKE.InstantiateConcreteObject(cPtr, false);

            return(ret);
        }
Пример #3
0
        public static Child GimmeAChild()
        {
            IntPtr cPtr = CppApiPINVOKE.Factory_GimmeAChild();
            Child  ret  = (cPtr == IntPtr.Zero) ? null : new Child(cPtr, false);

            return(ret);
        }
Пример #4
0
 private void SwigDirectorConnect()
 {
     if (SwigDerivedClassHasMethod("VectorTakerPtr3", swigMethodTypes0))
     {
         swigDelegate0 = new SwigDelegateVectorConsumer_0(SwigDirectorVectorTakerPtr3);
     }
     if (SwigDerivedClassHasMethod("VectorTakerRef3", swigMethodTypes1))
     {
         swigDelegate1 = new SwigDelegateVectorConsumer_1(SwigDirectorVectorTakerRef3);
     }
     if (SwigDerivedClassHasMethod("VectorTakerVal3", swigMethodTypes2))
     {
         swigDelegate2 = new SwigDelegateVectorConsumer_2(SwigDirectorVectorTakerVal3);
     }
     if (SwigDerivedClassHasMethod("GimmeSomeVector", swigMethodTypes3))
     {
         swigDelegate3 = new SwigDelegateVectorConsumer_3(SwigDirectorGimmeSomeVector);
     }
     if (SwigDerivedClassHasMethod("VectorTakerPtr4", swigMethodTypes4))
     {
         swigDelegate4 = new SwigDelegateVectorConsumer_4(SwigDirectorVectorTakerPtr4);
     }
     if (SwigDerivedClassHasMethod("VectorTakerRef4", swigMethodTypes5))
     {
         swigDelegate5 = new SwigDelegateVectorConsumer_5(SwigDirectorVectorTakerRef4);
     }
     if (SwigDerivedClassHasMethod("VectorTakerVal4", swigMethodTypes6))
     {
         swigDelegate6 = new SwigDelegateVectorConsumer_6(SwigDirectorVectorTakerVal4);
     }
     CppApiPINVOKE.VectorConsumer_director_connect(swigCPtr, swigDelegate0, swigDelegate1, swigDelegate2, swigDelegate3, swigDelegate4, swigDelegate5, swigDelegate6);
 }
Пример #5
0
 private void SwigDirectorConnect()
 {
     if (SwigDerivedClassHasMethod("WhatAmI", swigMethodTypes0))
     {
         swigDelegate0 = new SwigDelegateParent_0(SwigDirectorWhatAmI);
     }
     if (SwigDerivedClassHasMethod("DoSomethingElse", swigMethodTypes1))
     {
         swigDelegate1 = new SwigDelegateParent_1(SwigDirectorDoSomethingElse);
     }
     CppApiPINVOKE.Parent_director_connect(swigCPtr, swigDelegate0, swigDelegate1);
 }
Пример #6
0
 public virtual void Dispose()
 {
     lock (this) {
         if (swigCPtr.Handle != IntPtr.Zero)
         {
             if (swigCMemOwn)
             {
                 swigCMemOwn = false;
                 CppApiPINVOKE.delete_AParamType(swigCPtr);
             }
             swigCPtr = new HandleRef(null, IntPtr.Zero);
         }
         GC.SuppressFinalize(this);
     }
 }
Пример #7
0
 public override void Dispose()
 {
     lock (this) {
         if (swigCPtr.Handle != IntPtr.Zero)
         {
             if (swigCMemOwn)
             {
                 swigCMemOwn = false;
                 CppApiPINVOKE.delete_Child(swigCPtr);
             }
             swigCPtr = new HandleRef(null, IntPtr.Zero);
         }
         GC.SuppressFinalize(this);
         base.Dispose();
     }
 }
Пример #8
0
        public static bool ParameterTaker(ref AParamType /* cstype */ param)
        {
            IntPtr p_param;

            unsafe { void *pp_param = &p_param; /* csin_pre */
                     try {
                         bool ret = CppApiPINVOKE.RefRefTest_ParameterTaker((IntPtr)pp_param /* csin */);
                         if (CppApiPINVOKE.SWIGPendingException.Pending)
                         {
                             throw CppApiPINVOKE.SWIGPendingException.Retrieve();
                         }
                         return(ret);
                     } finally {
                         param = new AParamType(p_param, false);
                         /* csin_post */
                     } } /* csin_terminator */
        }
Пример #9
0
 public virtual Fusee.Math.Core.Vector3D /* CVector3_cstype_out */ GimmeSomeVector() /* <CVector3_csout> */
 {
     Fusee.Math.Core.Vector3D ret = (SwigDerivedClassHasMethod("GimmeSomeVector", swigMethodTypes3) ? CppApiPINVOKE.VectorConsumer_GimmeSomeVectorSwigExplicitVectorConsumer(swigCPtr) : CppApiPINVOKE.VectorConsumer_GimmeSomeVector(swigCPtr));
     return(ret);
 } /* <CVector3_csout> */
Пример #10
0
 public Factory() : this(CppApiPINVOKE.new_Factory(), true)
 {
 }
Пример #11
0
 internal Child(IntPtr cPtr, bool cMemoryOwn) : base(CppApiPINVOKE.Child_SWIGUpcast(cPtr), cMemoryOwn)
 {
     swigCPtr = new HandleRef(this, cPtr);
 }
Пример #12
0
        public int DoSomething(int a, int b)
        {
            int ret = CppApiPINVOKE.Parent_DoSomething(swigCPtr, a, b);

            return(ret);
        }
Пример #13
0
        public virtual int DoSomethingElse(int a, int b)
        {
            int ret = (SwigDerivedClassHasMethod("DoSomethingElse", swigMethodTypes1) ? CppApiPINVOKE.Parent_DoSomethingElseSwigExplicitParent(swigCPtr, a, b) : CppApiPINVOKE.Parent_DoSomethingElse(swigCPtr, a, b));

            return(ret);
        }
Пример #14
0
 public Parent() : this(CppApiPINVOKE.new_Parent(), true)
 {
     SwigDirectorConnect();
 }
Пример #15
0
        public virtual int WhatAmI()
        {
            int ret = (SwigDerivedClassHasMethod("WhatAmI", swigMethodTypes0) ? CppApiPINVOKE.Parent_WhatAmISwigExplicitParent(swigCPtr) : CppApiPINVOKE.Parent_WhatAmI(swigCPtr));

            return(ret);
        }
Пример #16
0
        public virtual int VectorTakerVal4(Fusee.Math.Core.Vector4D /* cstype */ vec)
        {
            int ret = (SwigDerivedClassHasMethod("VectorTakerVal4", swigMethodTypes6) ? CppApiPINVOKE.VectorConsumer_VectorTakerVal4SwigExplicitVectorConsumer(swigCPtr, ref vec /* csin */) : CppApiPINVOKE.VectorConsumer_VectorTakerVal4(swigCPtr, ref vec /* csin */));

            if (CppApiPINVOKE.SWIGPendingException.Pending)
            {
                throw CppApiPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Пример #17
0
 public RefRefTest() : this(CppApiPINVOKE.new_RefRefTest(), true)
 {
 }
Пример #18
0
        public int DoEvenMore()
        {
            int ret = CppApiPINVOKE.Child_DoEvenMore(swigCPtr);

            return(ret);
        }
Пример #19
0
 public Child() : this(CppApiPINVOKE.new_Child(), true)
 {
 }
Пример #20
0
        public virtual int VectorTakerVal3(Fusee.Math.Core.Vector3D /* CVector3cstype */ vec)
        {
            int ret = (SwigDerivedClassHasMethod("VectorTakerVal3", swigMethodTypes2) ? CppApiPINVOKE.VectorConsumer_VectorTakerVal3SwigExplicitVectorConsumer(swigCPtr, vec /* CVector3_csin */) : CppApiPINVOKE.VectorConsumer_VectorTakerVal3(swigCPtr, vec /* CVector3_csin */));

            return(ret);
        }
Пример #21
0
        public virtual int VectorTakerRef3(ref Fusee.Math.Core.Vector3D /* cstype */ rVec)
        {
            int ret = (SwigDerivedClassHasMethod("VectorTakerRef3", swigMethodTypes1) ? CppApiPINVOKE.VectorConsumer_VectorTakerRef3SwigExplicitVectorConsumer(swigCPtr, ref rVec /* csin */) : CppApiPINVOKE.VectorConsumer_VectorTakerRef3(swigCPtr, ref rVec /* csin */));

            return(ret);
        }
Пример #22
0
 public VectorConsumer() : this(CppApiPINVOKE.new_VectorConsumer(), true)
 {
     SwigDirectorConnect();
 }
Пример #23
0
        public override int WhatAmI()
        {
            int ret = CppApiPINVOKE.Child_WhatAmI(swigCPtr);

            return(ret);
        }
Пример #24
0
        public virtual int VectorTakerPtr4(ref Fusee.Math.Core.Vector4D /* cstype */ pVec)
        {
            int ret = (SwigDerivedClassHasMethod("VectorTakerPtr4", swigMethodTypes4) ? CppApiPINVOKE.VectorConsumer_VectorTakerPtr4SwigExplicitVectorConsumer(swigCPtr, ref pVec /* csin */) : CppApiPINVOKE.VectorConsumer_VectorTakerPtr4(swigCPtr, ref pVec /* csin */));

            return(ret);
        }
Пример #25
0
        public override int DoSomethingElse(int a, int b)
        {
            int ret = CppApiPINVOKE.Child_DoSomethingElse(swigCPtr, a, b);

            return(ret);
        }
Пример #26
0
 public static void CallVectorConsumer(VectorConsumer pConsumer)
 {
     CppApiPINVOKE.VectorConsumerCaller_CallVectorConsumer(VectorConsumer.getCPtr(pConsumer));
 }
Пример #27
0
 public AParamType() : this(CppApiPINVOKE.new_AParamType(), true)
 {
 }
Пример #28
0
 public VectorConsumerCaller() : this(CppApiPINVOKE.new_VectorConsumerCaller(), true)
 {
 }