Class FloatIEEE754
java.lang.Object
org.javagi.base.ProxyInstance
org.gnome.glib.FloatIEEE754
- All Implemented Interfaces:
Proxy
The
GFloatIEEE754 and GDoubleIEEE754 unions are used to access the sign,
mantissa and exponent of IEEE floats and doubles. These unions are defined
as appropriate for a given platform. IEEE floats and doubles are supported
(used for storage) by at least Intel, PPC and Sparc.-
Constructor Summary
ConstructorsConstructorDescriptionAllocate a new FloatIEEE754.FloatIEEE754(float vFloat) Allocate a new FloatIEEE754 with the fields set to the provided values.FloatIEEE754(float vFloat, Arena arena) Allocate a new FloatIEEE754 with the fields set to the provided values.FloatIEEE754(Arena arena) Allocate a new FloatIEEE754.FloatIEEE754(MemorySegment address) Create a FloatIEEE754 proxy instance for the provided memory address. -
Method Summary
Modifier and TypeMethodDescriptionstatic MemoryLayoutThe memory layout of the native struct.floatRead the value of the fieldv_float.voidwriteVFloat(float vFloat) Write a value in the fieldv_float.Methods inherited from class ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
FloatIEEE754
Create a FloatIEEE754 proxy instance for the provided memory address.- Parameters:
address- the memory address of the native object
-
FloatIEEE754
Allocate a new FloatIEEE754.- Parameters:
arena- to control the memory allocation scope
-
FloatIEEE754
public FloatIEEE754()Allocate a new FloatIEEE754. The memory is allocated withArena.ofAuto(). -
FloatIEEE754
Allocate a new FloatIEEE754 with the fields set to the provided values.- Parameters:
vFloat- value for the fieldvFloatarena- to control the memory allocation scope
-
FloatIEEE754
public FloatIEEE754(float vFloat) Allocate a new FloatIEEE754 with the fields set to the provided values. The memory is allocated withArena.ofAuto().- Parameters:
vFloat- value for the fieldvFloat
-
-
Method Details
-
getMemoryLayout
The memory layout of the native struct.- Returns:
- the memory layout
-
readVFloat
public float readVFloat()Read the value of the fieldv_float.- Returns:
- The value of the field
v_float
-
writeVFloat
public void writeVFloat(float vFloat) Write a value in the fieldv_float.- Parameters:
vFloat- The new value for the fieldv_float
-