コード例 #1
0
        // Accessors
        public static int lheapGetCount(this L_Heap lh)
        {
            if (null == lh)
            {
                throw new ArgumentNullException("lh cannot be null");
            }

            return(Native.DllImports.lheapGetCount((HandleRef)lh));
        }
コード例 #2
0
        // Heap operations
        public static int lheapSwapUp(this L_Heap lh, int index)
        {
            if (null == lh)
            {
                throw new ArgumentNullException("lh cannot be null");
            }

            return(Native.DllImports.lheapSwapUp((HandleRef)lh, index));
        }
コード例 #3
0
        public static IntPtr lheapRemove(this L_Heap lh)
        {
            if (null == lh)
            {
                throw new ArgumentNullException("lh cannot be null");
            }

            return(Native.DllImports.lheapRemove((HandleRef)lh));
        }
コード例 #4
0
        // Operations to add/remove to/from the heap
        public static int lheapAdd(this L_Heap lh, IntPtr item)
        {
            if (null == lh ||
                IntPtr.Zero == item)
            {
                throw new ArgumentNullException("lh, item cannot be null");
            }

            return(Native.DllImports.lheapAdd((HandleRef)lh, item));
        }
コード例 #5
0
        // Debug output
        public static int lheapPrint(IntPtr fp, L_Heap lh)
        {
            if (null == lh ||
                IntPtr.Zero == fp)
            {
                throw new ArgumentNullException("lh, fp cannot be null");
            }

            return(Native.DllImports.lheapPrint(fp, (HandleRef)lh));
        }
コード例 #6
0
        public static void lheapDestroy(this L_Heap plh, int freeflag)
        {
            if (null == plh)
            {
                throw new ArgumentNullException("plh cannot be null");
            }

            var pointer = (IntPtr)plh;

            Native.DllImports.lheapDestroy(ref pointer, freeflag);
        }