Class TokenValue
java.lang.Object
org.javagi.base.ProxyInstance
org.gnome.glib.TokenValue
- All Implemented Interfaces:
Proxy
A union holding the value of the token.
-
Constructor Summary
ConstructorsConstructorDescriptionAllocate a new TokenValue.TokenValue(Arena arena) Allocate a new TokenValue.TokenValue(MemorySegment address) Create a TokenValue proxy instance for the provided memory address.TokenValue(MemorySegment vSymbol, String vIdentifier, int vBinary, int vOctal, int vInt, long vInt64, double vFloat, int vHex, String vString, String vComment, byte vChar, int vError) Allocate a new TokenValue with the fields set to the provided values.TokenValue(MemorySegment vSymbol, String vIdentifier, int vBinary, int vOctal, int vInt, long vInt64, double vFloat, int vHex, String vString, String vComment, byte vChar, int vError, Arena arena) Allocate a new TokenValue with the fields set to the provided values. -
Method Summary
Modifier and TypeMethodDescriptionstatic MemoryLayoutThe memory layout of the native struct.intRead the value of the fieldv_binary.byteRead the value of the fieldv_char.Read the value of the fieldv_comment.intRead the value of the fieldv_error.doubleRead the value of the fieldv_float.intreadVHex()Read the value of the fieldv_hex.Read the value of the fieldv_identifier.intreadVInt()Read the value of the fieldv_int.longRead the value of the fieldv_int64.intRead the value of the fieldv_octal.Read the value of the fieldv_string.Read the value of the fieldv_symbol.voidwriteVBinary(int vBinary) Write a value in the fieldv_binary.voidwriteVChar(byte vChar) Write a value in the fieldv_char.voidwriteVComment(String vComment, Arena _arena) Write a value in the fieldv_comment.voidwriteVError(int vError) Write a value in the fieldv_error.voidwriteVFloat(double vFloat) Write a value in the fieldv_float.voidwriteVHex(int vHex) Write a value in the fieldv_hex.voidwriteVIdentifier(String vIdentifier, Arena _arena) Write a value in the fieldv_identifier.voidwriteVInt(int vInt) Write a value in the fieldv_int.voidwriteVInt64(long vInt64) Write a value in the fieldv_int64.voidwriteVOctal(int vOctal) Write a value in the fieldv_octal.voidwriteVString(String vString, Arena _arena) Write a value in the fieldv_string.voidwriteVSymbol(MemorySegment vSymbol) Write a value in the fieldv_symbol.Methods inherited from class ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
TokenValue
Create a TokenValue proxy instance for the provided memory address.- Parameters:
address- the memory address of the native object
-
TokenValue
Allocate a new TokenValue.- Parameters:
arena- to control the memory allocation scope
-
TokenValue
public TokenValue()Allocate a new TokenValue. The memory is allocated withArena.ofAuto(). -
TokenValue
public TokenValue(MemorySegment vSymbol, String vIdentifier, int vBinary, int vOctal, int vInt, long vInt64, double vFloat, int vHex, String vString, String vComment, byte vChar, int vError, Arena arena) Allocate a new TokenValue with the fields set to the provided values.- Parameters:
vSymbol- value for the fieldvSymbolvIdentifier- value for the fieldvIdentifiervBinary- value for the fieldvBinaryvOctal- value for the fieldvOctalvInt- value for the fieldvIntvInt64- value for the fieldvInt64vFloat- value for the fieldvFloatvHex- value for the fieldvHexvString- value for the fieldvStringvComment- value for the fieldvCommentvChar- value for the fieldvCharvError- value for the fieldvErrorarena- to control the memory allocation scope
-
TokenValue
public TokenValue(MemorySegment vSymbol, String vIdentifier, int vBinary, int vOctal, int vInt, long vInt64, double vFloat, int vHex, String vString, String vComment, byte vChar, int vError) Allocate a new TokenValue with the fields set to the provided values. The memory is allocated withArena.ofAuto().- Parameters:
vSymbol- value for the fieldvSymbolvIdentifier- value for the fieldvIdentifiervBinary- value for the fieldvBinaryvOctal- value for the fieldvOctalvInt- value for the fieldvIntvInt64- value for the fieldvInt64vFloat- value for the fieldvFloatvHex- value for the fieldvHexvString- value for the fieldvStringvComment- value for the fieldvCommentvChar- value for the fieldvCharvError- value for the fieldvError
-
-
Method Details
-
getMemoryLayout
The memory layout of the native struct.- Returns:
- the memory layout
-
readVSymbol
Read the value of the fieldv_symbol.- Returns:
- The value of the field
v_symbol
-
writeVSymbol
Write a value in the fieldv_symbol.- Parameters:
vSymbol- The new value for the fieldv_symbol
-
readVIdentifier
Read the value of the fieldv_identifier.- Returns:
- The value of the field
v_identifier
-
writeVIdentifier
-
readVBinary
public int readVBinary()Read the value of the fieldv_binary.- Returns:
- The value of the field
v_binary
-
writeVBinary
public void writeVBinary(int vBinary) Write a value in the fieldv_binary.- Parameters:
vBinary- The new value for the fieldv_binary
-
readVOctal
public int readVOctal()Read the value of the fieldv_octal.- Returns:
- The value of the field
v_octal
-
writeVOctal
public void writeVOctal(int vOctal) Write a value in the fieldv_octal.- Parameters:
vOctal- The new value for the fieldv_octal
-
readVInt
public int readVInt()Read the value of the fieldv_int.- Returns:
- The value of the field
v_int
-
writeVInt
public void writeVInt(int vInt) Write a value in the fieldv_int.- Parameters:
vInt- The new value for the fieldv_int
-
readVInt64
public long readVInt64()Read the value of the fieldv_int64.- Returns:
- The value of the field
v_int64
-
writeVInt64
public void writeVInt64(long vInt64) Write a value in the fieldv_int64.- Parameters:
vInt64- The new value for the fieldv_int64
-
readVFloat
public double readVFloat()Read the value of the fieldv_float.- Returns:
- The value of the field
v_float
-
writeVFloat
public void writeVFloat(double vFloat) Write a value in the fieldv_float.- Parameters:
vFloat- The new value for the fieldv_float
-
readVHex
public int readVHex()Read the value of the fieldv_hex.- Returns:
- The value of the field
v_hex
-
writeVHex
public void writeVHex(int vHex) Write a value in the fieldv_hex.- Parameters:
vHex- The new value for the fieldv_hex
-
readVString
Read the value of the fieldv_string.- Returns:
- The value of the field
v_string
-
writeVString
-
readVComment
Read the value of the fieldv_comment.- Returns:
- The value of the field
v_comment
-
writeVComment
-
readVChar
public byte readVChar()Read the value of the fieldv_char.- Returns:
- The value of the field
v_char
-
writeVChar
public void writeVChar(byte vChar) Write a value in the fieldv_char.- Parameters:
vChar- The new value for the fieldv_char
-
readVError
public int readVError()Read the value of the fieldv_error.- Returns:
- The value of the field
v_error
-
writeVError
public void writeVError(int vError) Write a value in the fieldv_error.- Parameters:
vError- The new value for the fieldv_error
-