예제 #1
0
        public void Dispose()
        {
            Debug.WriteLine("Calling DataSeq_Free...");

            if (IsValid)
            {
                DataSeq.Free(dataSeqHandle);
            }
        }
예제 #2
0
        public double this[UInt32 i]
        {
            get
            {
                double v = 0.0;
                Validate(DataSeq.GetAt(dataSeqHandle, i, ref v));
                return(v);
            }

            set
            {
                Validate(DataSeq.SetAt(dataSeqHandle, i, value));
            }
        }
예제 #3
0
        public double[] GetData()
        {
            UInt32 size = Size;

            if (size == 0)
            {
                return(null);
            }

            IntPtr unmanagedDataPtr = IntPtr.Zero;

            Validate(DataSeq.GetData(dataSeqHandle, ref unmanagedDataPtr));

            double[] managedDataBuf = new double[Size];
            Marshal.Copy(unmanagedDataPtr, managedDataBuf, 0, managedDataBuf.Length);
            return(managedDataBuf);
        }
예제 #4
0
        public void PopBack()
        {
            double v = 0.0;

            Validate(DataSeq.PopBack(dataSeqHandle, ref v));
        }
예제 #5
0
 public void PushBack(double v)
 {
     Validate(DataSeq.PushBack(dataSeqHandle, v));
 }
예제 #6
0
 public DataSequence(UInt32 size = 0)
 {
     Validate(DataSeq.Create(ref dataSeqHandle, size), false);
 }