示例#1
0
        public SignalBuffer GetPlot(double durationSeconds, PlotType type)
        {
            Check();
            IntPtr ___ret_abi;

            Native.Throw(_vt.GetPlot(IPtr, durationSeconds, type, out ___ret_abi));
            return(GluonObject.Of <SignalBuffer>(___ret_abi));
        }
示例#2
0
 public static global::GluonTest.ComplexStruct FromABI(ComplexStruct x)
 {
     return(new global::GluonTest.ComplexStruct
     {
         Name = MConv_.FromABI_string(x.Name),
         Sub = x.Sub,
         Obj = GluonObject.Of <global::GluonTest.DummyClass>(x.Obj),
         Del = ABI.GluonTest.D_827F05B3.Wrap(x.Del.Fn, x.Del.Ctx)
     });
 }
示例#3
0
文件: ABI.cs 项目: ETLang/Gluon
        public static T FromABI_Object <T>(IntPtr ptr) where T : GluonObject
        {
            var r = GluonObject.Of <T>(ptr);

            if (ptr != IntPtr.Zero)
            {
                Marshal.Release(ptr);
            }

            return(r);
        }
示例#4
0
        public DummyClass Objects(DummyClass inTest, out DummyClass outTest, ref DummyClass refTest)
        {
            Check();
            IntPtr outTest_abi;
            var    refTest_abi = MConv_.ToABI_Object(refTest == null ? IntPtr.Zero : ((DummyClass)refTest).IPtr);
            IntPtr ___ret_abi;

            Native.Throw(_vt.Objects(IPtr, (inTest == null ? IntPtr.Zero : ((DummyClass)inTest).IPtr), out outTest_abi, ref refTest_abi, out ___ret_abi));
            outTest = GluonObject.Of <DummyClass>(outTest_abi);
            refTest = MConv_.FromABI_Object <DummyClass>(refTest_abi);
            return(GluonObject.Of <DummyClass>(___ret_abi));
        }
示例#5
0
        public DummyClass[] ObjectArrays(DummyClass[] inTest, out DummyClass[] outTest, ref DummyClass[] refTest)
        {
            Check();
            var       inTest_abi = GluonObject.ArrayUnwrap(inTest);
            ArrayBlob outTest_abi;
            ArrayBlob refTest_abi = MConv.ToABI_CAD799A2(refTest);
            ArrayBlob ___ret_abi;

            Native.Throw(_vt.ObjectArrays(IPtr, inTest_abi, inTest_abi.Length, out outTest_abi.Ptr, out outTest_abi.Count, ref refTest_abi.Ptr, ref refTest_abi.Count, out ___ret_abi.Ptr, out ___ret_abi.Count));
            outTest = MConv.FromABI_CAD799A2(outTest_abi.Ptr, outTest_abi.Count);
            refTest = MConv.FromABI_CAD799A2(refTest_abi.Ptr, refTest_abi.Count);
            return(MConv.FromABI_CAD799A2(___ret_abi.Ptr, ___ret_abi.Count));
        }
示例#6
0
 public static global::GluonTest.StructMemberTest FromABI(StructMemberTest x)
 {
     return(new global::GluonTest.StructMemberTest
     {
         Boolean = x.Boolean,
         Primitive = x.Primitive,
         PrimitivePtr = x.PrimitivePtr,
         String = MConv_.FromABI_string(x.String),
         BlittableSt = x.BlittableSt,
         ComplexSt = ComplexStruct.FromABI(x.ComplexSt),
         Object = GluonObject.Of <global::GluonTest.DummyClass>(x.Object),
         NamedDelegate = ABI.GluonTest.D_BD6C0A4E.Wrap(x.NamedDelegate.Fn, x.NamedDelegate.Ctx),
         GenericDelegate = ABI.GluonTest.D_2945414F.Wrap(x.GenericDelegate.Fn, x.GenericDelegate.Ctx)
     });
 }
示例#7
0
 static Native()
 {
     GluonObject.RegisterType <global::GluonTest.DummyClass>(new Guid("68a756e3-dac4-3983-dd16-07353f3812e6"), native => new global::GluonTest.DummyClass(new AbiPtr(native)));
     GluonObject.RegisterType <global::GluonTest.ConversionUnitTest>(new Guid("75bb5efc-b491-4dea-8973-735b3c230ed7"), native => new global::GluonTest.ConversionUnitTest(new AbiPtr(native)));
     GluonObject.RegisterType <global::GluonTest.ITestClass>(new Guid("68a756e3-dac4-3983-dd16-0a1437261fe6"), native => new global::GluonTest.ITestClass(new AbiPtr(native)));
     GluonObject.RegisterType <global::GluonTest.SignalBuffer>(new Guid("7db242cd-a8a1-3983-dd16-1029353b0ac9"), native => new global::GluonTest.SignalBuffer(new AbiPtr(native)));
     GluonObject.RegisterType <global::GluonTest.Waveform>(new Guid("1bd45afd-dac4-3983-dd16-142124300dca"), native => new global::GluonTest.Waveform(new AbiPtr(native)));
     GluonObject.RegisterType <global::GluonTest.SinusoidalWaveform>(new Guid("77b553e6-bb93-5cf5-bb79-62443c2018ca"), native => new global::GluonTest.SinusoidalWaveform(new AbiPtr(native)));
     GluonObject.RegisterType <global::GluonTest.SquareWaveform>(new Guid("7ea256d8-b5a2-54f1-dd16-1031273419c0"), native => new global::GluonTest.SquareWaveform(new AbiPtr(native)));
     GluonObject.RegisterType <global::GluonTest.TriangleWaveform>(new Guid("7a8352e3-bfb2-56e5-af7b-17323b3405c2"), native => new global::GluonTest.TriangleWaveform(new AbiPtr(native)));
     GluonObject.RegisterType <global::GluonTest.SawtoothRightWaveform>(new Guid("72865ffb-b2a3-6ef7-bc60-75474a5369ca"), native => new global::GluonTest.SawtoothRightWaveform(new AbiPtr(native)));
     GluonObject.RegisterType <global::GluonTest.SawtoothLeftWaveform>(new Guid("7e985ffb-aea2-58d4-ab73-764e574c04ca"), native => new global::GluonTest.SawtoothLeftWaveform(new AbiPtr(native)));
     GluonObject.RegisterType <global::GluonTest.GTone>(new Guid("1bd4378f-dac4-3983-dd16-04143d3b0ea5"), native => new global::GluonTest.GTone(new AbiPtr(native)));
     GluonObject.RegisterType <global::GluonTest.GWhiteNoise>(new Guid("68bd58c1-daa1-3983-dd16-04173a3c1fc0"), native => new global::GluonTest.GWhiteNoise(new AbiPtr(native)));
     GluonObject.RegisterType <global::GluonTest.NoiseEngine>(new Guid("75bd50e1-daa1-3983-dd16-0d2f3b260ee0"), native => new global::GluonTest.NoiseEngine(new AbiPtr(native)));
 }