public static doubleArray frompointer(SWIGTYPE_p_double t) { global::System.IntPtr cPtr = fanndoublePINVOKE.doubleArray_frompointer(SWIGTYPE_p_double.getCPtr(t)); doubleArray ret = (cPtr == global::System.IntPtr.Zero) ? null : new doubleArray(cPtr, false); return(ret); }
private void InternalCallback(uint number, uint inputCount, uint outputCount, global::System.IntPtr inputs, global::System.IntPtr outputs) { double[] callbackInput = new double[inputCount]; double[] callbackOutput = new double[outputCount]; Callback(number, inputCount, outputCount, callbackInput, callbackOutput); using (doubleArray inputArray = new doubleArray(inputs, false)) using (doubleArray outputArray = new doubleArray(outputs, false)) { for (int i = 0; i < inputCount; i++) { inputArray.setitem(i, callbackInput[i]); } for (int i = 0; i < outputCount; i++) { outputArray.setitem(i, callbackOutput[i]); } } }
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(doubleArray obj) { return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr); }
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(doubleArray obj) { return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; }