Exemplo n.º 1
0
        public T this[int index]
        {
            //实现索引器的get方法
            get
            {
                if (!IsValidIndex(index))
                {
                    throw new IndexOutOfRangeException();
                }
                return(UObject.WrapObject <T>(Marshal.ReadIntPtr(FScriptArray.GetData(ref InterArray) + IntPtr.Size * index)));
            }

            //实现索引器的set方法
            set
            {
                if (!IsValidIndex(index))
                {
                    throw new IndexOutOfRangeException();
                }

                Marshal.WriteIntPtr(FScriptArray.GetData(ref InterArray) + IntPtr.Size * index, value != null? value._this.Get():IntPtr.Zero);
            }
        }
Exemplo n.º 2
0
        public T this[int index]
        {
            //实现索引器的get方法
            get
            {
                if (!IsValidIndex(index))
                {
                    throw new IndexOutOfRangeException();
                }
                return((T)Marshal.PtrToStructure(FScriptArray.GetData(ref InterArray) + Marshal.SizeOf(typeof(T)) * index, typeof(T)));
            }

            //实现索引器的set方法
            set
            {
                if (!IsValidIndex(index))
                {
                    throw new IndexOutOfRangeException();
                }

                Marshal.StructureToPtr(value, FScriptArray.GetData(ref InterArray) + Marshal.SizeOf(typeof(T)) * index, false);
            }
        }
Exemplo n.º 3
0
 public static extern void Empty(ref FScriptArray _this, int Slack, int NumBytesPerElement);
Exemplo n.º 4
0
 public static extern int AddZerod(ref FScriptArray _this, int Count, int NumBytesPerElement);
Exemplo n.º 5
0
 public static extern void Shrink(ref FScriptArray _this, int NumBytesPerElement);
Exemplo n.º 6
0
 public void Empty(int Slack)
 {
     FScriptArray.Empty(ref InterArray, Slack, IntPtr.Size);
 }
Exemplo n.º 7
0
 public void Remove(int Index, int Count)
 {
     FScriptArray.Remove(ref InterArray, Index, Count, IntPtr.Size);
 }
Exemplo n.º 8
0
 public int AddZerod(int Count)
 {
     return(FScriptArray.AddZerod(ref InterArray, Count, IntPtr.Size));
 }
Exemplo n.º 9
0
 public void Shrink()
 {
     FScriptArray.Shrink(ref InterArray, IntPtr.Size);
 }
Exemplo n.º 10
0
 public static extern void Remove(ref FScriptArray _this, int Index, int Count, int NumBytesPerElement);
Exemplo n.º 11
0
 public void Insert(int Index, int Count)
 {
     FScriptArray.Insert(ref InterArray, Index, Count, Marshal.SizeOf(typeof(T)));
 }
Exemplo n.º 12
0
 public static extern void InsertZeroed(ref FScriptArray _this, int Index, int Count, int NumBytesPerElement);
Exemplo n.º 13
0
 public TObjectArray(FScriptArray ScriptArray)
 {
     InterArray = ScriptArray;
 }
Exemplo n.º 14
0
 public void Remove(int Index, int Count)
 {
     FScriptArray.Remove(ref InterArray, Index, Count, Marshal.SizeOf(typeof(T)));
 }
Exemplo n.º 15
0
 public void Empty(int Slack)
 {
     FScriptArray.Empty(ref InterArray, Slack, Marshal.SizeOf(typeof(T)));
 }
Exemplo n.º 16
0
 public void Shrink()
 {
     FScriptArray.Shrink(ref InterArray, Marshal.SizeOf(typeof(T)));
 }
Exemplo n.º 17
0
 public int AddZerod(int Count)
 {
     return(FScriptArray.AddZerod(ref InterArray, Count, Marshal.SizeOf(typeof(T))));
 }
Exemplo n.º 18
0
 public static extern IntPtr GetData(ref FScriptArray _this);
Exemplo n.º 19
0
 public TStructArray(FScriptArray ScriptArray)
 {
     InterArray = ScriptArray;
 }
Exemplo n.º 20
0
 public void Insert(int Index, int Count)
 {
     FScriptArray.Insert(ref InterArray, Index, Count, IntPtr.Size);
 }