Package org.gnome.glib
Class TestLogMsg
java.lang.Object
io.github.jwharm.javagi.base.ProxyInstance
org.gnome.glib.TestLogMsg
- All Implemented Interfaces:
Proxy
-
Constructor Summary
ConstructorDescriptionAllocate a new TestLogMsg.TestLogMsg
(Arena arena) Allocate a new TestLogMsg.TestLogMsg
(MemorySegment address) Create a TestLogMsg proxy instance for the provided memory address.TestLogMsg
(TestLogType logType, int nStrings, String[] strings, int nNums, MemorySegment nums) Allocate a new TestLogMsg with the fields set to the provided values.TestLogMsg
(TestLogType logType, int nStrings, String[] strings, int nNums, MemorySegment nums, Arena arena) Allocate a new TestLogMsg with the fields set to the provided values. -
Method Summary
Modifier and TypeMethodDescriptionvoid
free()
Internal function for gtester to free test log messages, no ABI guarantees provided.static MemoryLayout
The memory layout of the native struct.Read the value of the fieldlog_type
.int
Read the value of the fieldn_nums
.int
Read the value of the fieldn_strings
.readNums()
Read the value of the fieldnums
.String[]
readStrings
(int length) Read the value of the fieldstrings
.void
writeLogType
(TestLogType logType) Write a value in the fieldlog_type
.void
writeNNums
(int nNums) Write a value in the fieldn_nums
.void
writeNStrings
(int nStrings) Write a value in the fieldn_strings
.void
writeNums
(MemorySegment nums) Write a value in the fieldnums
.void
writeStrings
(String[] strings, Arena _arena) Write a value in the fieldstrings
.Methods inherited from class io.github.jwharm.javagi.base.ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
TestLogMsg
Create a TestLogMsg proxy instance for the provided memory address.- Parameters:
address
- the memory address of the native object
-
TestLogMsg
Allocate a new TestLogMsg.- Parameters:
arena
- to control the memory allocation scope
-
TestLogMsg
public TestLogMsg()Allocate a new TestLogMsg. The memory is allocated withArena.ofAuto()
. -
TestLogMsg
public TestLogMsg(TestLogType logType, int nStrings, String[] strings, int nNums, MemorySegment nums, Arena arena) Allocate a new TestLogMsg with the fields set to the provided values.- Parameters:
logType
- value for the fieldlogType
nStrings
- value for the fieldnStrings
strings
- value for the fieldstrings
nNums
- value for the fieldnNums
nums
- value for the fieldnums
arena
- to control the memory allocation scope
-
TestLogMsg
public TestLogMsg(TestLogType logType, int nStrings, String[] strings, int nNums, MemorySegment nums) Allocate a new TestLogMsg with the fields set to the provided values. The memory is allocated withArena.ofAuto()
.- Parameters:
logType
- value for the fieldlogType
nStrings
- value for the fieldnStrings
strings
- value for the fieldstrings
nNums
- value for the fieldnNums
nums
- value for the fieldnums
-
-
Method Details
-
getMemoryLayout
The memory layout of the native struct.- Returns:
- the memory layout
-
readLogType
Read the value of the fieldlog_type
.- Returns:
- The value of the field
log_type
-
writeLogType
Write a value in the fieldlog_type
.- Parameters:
logType
- The new value for the fieldlog_type
-
readNStrings
public int readNStrings()Read the value of the fieldn_strings
.- Returns:
- The value of the field
n_strings
-
writeNStrings
public void writeNStrings(int nStrings) Write a value in the fieldn_strings
.- Parameters:
nStrings
- The new value for the fieldn_strings
-
readStrings
Read the value of the fieldstrings
.- Parameters:
length
- the number ofstrings
to read@return The value of the fieldstrings
-
writeStrings
-
readNNums
public int readNNums()Read the value of the fieldn_nums
.- Returns:
- The value of the field
n_nums
-
writeNNums
public void writeNNums(int nNums) Write a value in the fieldn_nums
.- Parameters:
nNums
- The new value for the fieldn_nums
-
readNums
Read the value of the fieldnums
.- Returns:
- The value of the field
nums
-
writeNums
Write a value in the fieldnums
.- Parameters:
nums
- The new value for the fieldnums
-
free
public void free()Internal function for gtester to free test log messages, no ABI guarantees provided.
-