Package org.robovm.rt.bro.ptr
Class DoublePtr
public final class DoublePtr extends Struct<DoublePtr>
Points to a
double value (double * in C).-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDoublePtr.DoublePtrPtrPointer toDoublePtr(double **in C)Nested classes/interfaces inherited from class org.robovm.rt.bro.Struct
Struct.Marshaler -
Constructor Summary
-
Method Summary
Modifier and Type Method Description DoubleBufferasDoubleBuffer(int n)Returns aDoubleBufferwhich reads and writes to the same memory location pointed to by thisDoublePtr.doubleget()Returns the current value.voidget(double[] dst)voidget(double[] dst, int offset, int count)voidset(double value)Sets the value.voidset(double[] src)voidset(double[] src, int offset, int count)double[]toDoubleArray(int n)Methods inherited from class org.robovm.rt.bro.Struct
_sizeOf, allocate, allocate, as, clear, clear, copy, copy, copyWithMalloc, copyWithMalloc, free, iterator, iterator, malloc, malloc, next, next, offsetOf, previous, previous, sizeOf, sizeOf, toArray, toList, toStruct, update, update, update, wrapMethods inherited from class org.robovm.rt.bro.NativeObject
equals, getHandle, hashCode, setHandle
-
Constructor Details
-
Method Details
-
get
public double get()Returns the current value.- Returns:
- the value.
-
set
public void set(double value)Sets the value.- Parameters:
value- the new value.
-
asDoubleBuffer
Returns aDoubleBufferwhich reads and writes to the same memory location pointed to by thisDoublePtr.- Parameters:
n- the maximum number of doubles theDoubleBuffercan read/write. This will be theDoubleBuffer'scapacity.- Returns:
- the
DoubleBuffer.
-
toDoubleArray
public double[] toDoubleArray(int n)- Parameters:
n- the number of doubles to copy.- Returns:
- the
double[].
-
get
public void get(double[] dst)- Parameters:
dst- the destination.
-
get
public void get(double[] dst, int offset, int count)- Parameters:
dst- the destination.offset- the offset within the destination array to start copying to.count- the number of elements to copy.
-
set
public void set(double[] src)- Parameters:
src- the source.
-
set
public void set(double[] src, int offset, int count)- Parameters:
src- the source.offset- the offset within the source array to start copying from.count- the number of elements to copy.
-