jnr.ffi.byref
Class FloatByReference

java.lang.Object
  extended by java.lang.Number
      extended by jnr.ffi.byref.AbstractNumberReference<Float>
          extended by jnr.ffi.byref.FloatByReference
All Implemented Interfaces:
Serializable, ByReference<Float>

public final class FloatByReference
extends AbstractNumberReference<Float>

See Also:
Serialized Form

Constructor Summary
FloatByReference()
          Creates a new reference to a short value initialized to zero.
FloatByReference(float value)
          Creates a new reference to a float value
FloatByReference(Float value)
          Creates a new reference to a float value
 
Method Summary
 void marshal(Pointer buffer, long offset)
          Copies the float value to native memory
 int nativeSize(Runtime runtime)
          Gets the native size of type of reference in bytes.
 void unmarshal(Pointer buffer, long offset)
          Copies the float value from native memory
 
Methods inherited from class jnr.ffi.byref.AbstractNumberReference
byteValue, checkNull, doubleValue, floatValue, getValue, intValue, longValue, shortValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FloatByReference

public FloatByReference()
Creates a new reference to a short value initialized to zero.


FloatByReference

public FloatByReference(Float value)
Creates a new reference to a float value

Parameters:
value - the initial native value

FloatByReference

public FloatByReference(float value)
Creates a new reference to a float value

Parameters:
value - the initial native value
Method Detail

marshal

public void marshal(Pointer buffer,
                    long offset)
Copies the float value to native memory

Parameters:
buffer - the native memory buffer

unmarshal

public void unmarshal(Pointer buffer,
                      long offset)
Copies the float value from native memory

Parameters:
buffer - the native memory buffer.

nativeSize

public final int nativeSize(Runtime runtime)
Gets the native size of type of reference in bytes.

Returns:
the size of a byte in bytes


Copyright © 2012. All Rights Reserved.