Top Fields Constructors Methods
jnr.ffi.byref

public final Class FloatByReference

extends AbstractNumberReference<Float>
Class Inheritance
Imports
jnr.ffi.Pointer, .Runtime

Field Summary

Modifier and TypeField and Description
private static final Float
Inherited from jnr.ffi.byref.AbstractNumberReference:
value

Constructor Summary

AccessConstructor and Description
public
FloatByReference()

Creates a new reference to a short value initialized to zero.

public
FloatByReference(Float
the initial native value
value
)

Creates a new reference to a float value

public
FloatByReference(float
the initial native value
value
)

Creates a new reference to a float value

Method Summary

Modifier and TypeMethod and Description
public void
fromNative(Runtime
the current runtime.
runtime
,
Pointer
the native memory buffer.
buffer
,
long
the memory offset.
offset
)

Implements jnr.ffi.byref.ByReference.fromNative.

Copies the float value from native memory
public final int

Returns:

the size of a byte in bytes
nativeSize
(Runtime
the current runtime.
runtime
)

Implements jnr.ffi.byref.ByReference.nativeSize.

Gets the native size of type of reference in bytes.
public void
toNative(Runtime
the current runtime.
runtime
,
Pointer
the native memory buffer.
buffer
,
long
the memory offset.
offset
)

Implements jnr.ffi.byref.ByReference.toNative.

Copies the float value to native memory
Inherited from jnr.ffi.byref.AbstractNumberReference:
byteValuecheckNulldoubleValuefloatValuegetValueintValuelongValueshortValue

Field Detail

DEFAULTback to summary
private static final Float DEFAULT

Constructor Detail

FloatByReferenceback to summary
public FloatByReference()

Creates a new reference to a short value initialized to zero.

FloatByReferenceback to summary
public FloatByReference(Float value)

Creates a new reference to a float value

Parameters
value:Float

the initial native value

FloatByReferenceback to summary
public FloatByReference(float value)

Creates a new reference to a float value

Parameters
value:float

the initial native value

Method Detail

fromNativeback to summary
public void fromNative(Runtime runtime, Pointer buffer, long offset)

Implements jnr.ffi.byref.ByReference.fromNative.

Copies the float value from native memory

Parameters
runtime:Runtime

the current runtime.

buffer:Pointer

the native memory buffer.

offset:long

the memory offset.

nativeSizeback to summary
public final int nativeSize(Runtime runtime)

Implements jnr.ffi.byref.ByReference.nativeSize.

Gets the native size of type of reference in bytes.

Parameters
runtime:Runtime

the current runtime.

Returns:int

the size of a byte in bytes

toNativeback to summary
public void toNative(Runtime runtime, Pointer buffer, long offset)

Implements jnr.ffi.byref.ByReference.toNative.

Copies the float value to native memory

Parameters
runtime:Runtime

the current runtime.

buffer:Pointer

the native memory buffer.

offset:long

the memory offset.