Class TestLogMsg

All Implemented Interfaces:
Proxy

@Generated("org.javagi.JavaGI") public class TestLogMsg extends ProxyInstance
  • Constructor Details

    • TestLogMsg

      public TestLogMsg(MemorySegment address)
      Create a TestLogMsg proxy instance for the provided memory address.
      Parameters:
      address - the memory address of the native object
    • TestLogMsg

      public TestLogMsg(Arena arena)
      Allocate a new TestLogMsg.
      Parameters:
      arena - to control the memory allocation scope
    • TestLogMsg

      public TestLogMsg()
      Allocate a new TestLogMsg. The memory is allocated with Arena.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 field logType
      nStrings - value for the field nStrings
      strings - value for the field strings
      nNums - value for the field nNums
      nums - value for the field nums
      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 with Arena.ofAuto().
      Parameters:
      logType - value for the field logType
      nStrings - value for the field nStrings
      strings - value for the field strings
      nNums - value for the field nNums
      nums - value for the field nums
  • Method Details

    • getMemoryLayout

      public static MemoryLayout getMemoryLayout()
      The memory layout of the native struct.
      Returns:
      the memory layout
    • readLogType

      public TestLogType readLogType()
      Read the value of the field log_type.
      Returns:
      The value of the field log_type
    • writeLogType

      public void writeLogType(TestLogType logType)
      Write a value in the field log_type.
      Parameters:
      logType - The new value for the field log_type
    • readNStrings

      public int readNStrings()
      Read the value of the field n_strings.
      Returns:
      The value of the field n_strings
    • writeNStrings

      public void writeNStrings(int nStrings)
      Write a value in the field n_strings.
      Parameters:
      nStrings - The new value for the field n_strings
    • readStrings

      public String[] readStrings(int length)
      Read the value of the field strings.
      Parameters:
      length - the number of strings to read
      Returns:
      The value of the field strings
    • writeStrings

      public void writeStrings(String[] strings, Arena _arena)
      Write a value in the field strings.
      Parameters:
      strings - The new value for the field strings
      _arena - to control the memory allocation scope
    • readNNums

      public int readNNums()
      Read the value of the field n_nums.
      Returns:
      The value of the field n_nums
    • writeNNums

      public void writeNNums(int nNums)
      Write a value in the field n_nums.
      Parameters:
      nNums - The new value for the field n_nums
    • readNums

      public MemorySegment readNums()
      Read the value of the field nums.
      Returns:
      The value of the field nums
    • writeNums

      public void writeNums(MemorySegment nums)
      Write a value in the field nums.
      Parameters:
      nums - The new value for the field nums
    • free

      public void free()
      Internal function for gtester to free test log messages, no ABI guarantees provided.