// 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)); }
// 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)); }
public static IntPtr lheapRemove(this L_Heap lh) { if (null == lh) { throw new ArgumentNullException("lh cannot be null"); } return(Native.DllImports.lheapRemove((HandleRef)lh)); }
// 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)); }
// 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)); }
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); }