Package jnr.ffi.byref
Class DoubleByReference
- All Implemented Interfaces:
Serializable
,ByReference<Double>
- See Also:
-
Field Summary
FieldsFields inherited from class jnr.ffi.byref.AbstractNumberReference
value
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new reference to a double value initialized to zero.DoubleByReference
(double value) Creates a new reference to a double valueDoubleByReference
(Double value) Creates a new reference to a double value -
Method Summary
Modifier and TypeMethodDescriptionvoid
fromNative
(Runtime runtime, Pointer buffer, long offset) Copies the double value from native memoryfinal int
nativeSize
(Runtime runtime) Gets the native size of type of reference in bytes.void
Copies the double value to native memoryMethods inherited from class jnr.ffi.byref.AbstractNumberReference
byteValue, checkNull, doubleValue, floatValue, getValue, intValue, longValue, shortValue
-
Field Details
-
DEFAULT
-
-
Constructor Details
-
DoubleByReference
public DoubleByReference()Creates a new reference to a double value initialized to zero. -
DoubleByReference
Creates a new reference to a double value- Parameters:
value
- the initial native value
-
DoubleByReference
public DoubleByReference(double value) Creates a new reference to a double value- Parameters:
value
- the initial native value
-
-
Method Details
-
toNative
Copies the double value to native memory- Parameters:
runtime
- the current runtime.buffer
- the native memory buffer.offset
- the memory offset.
-
fromNative
Copies the double value from native memory- Parameters:
runtime
- the current runtime.buffer
- the native memory buffer.offset
- the memory offset.
-
nativeSize
Gets the native size of type of reference in bytes.- Parameters:
runtime
- the current runtime.- Returns:
- the size of a byte in bytes.
-