Class FT_Parameter

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class FT_Parameter extends Struct<FT_Parameter> implements NativeResource

 struct FT_Parameter {
     FT_ULong tag;
     FT_Pointer data;
 }
  • Field Details

    • SIZEOF

      public static final int SIZEOF
      The struct size in bytes.
    • ALIGNOF

      public static final int ALIGNOF
      The struct alignment in bytes.
    • TAG

      public static final int TAG
      The struct member offsets.
    • DATA

      public static final int DATA
      The struct member offsets.
  • Constructor Details

    • FT_Parameter

      public FT_Parameter(ByteBuffer container)
      Creates a FT_Parameter instance at the current position of the specified ByteBuffer container. Changes to the buffer's content will be visible to the struct instance and vice versa.

      The created instance holds a strong reference to the container object.

  • Method Details

    • sizeof

      public int sizeof()
      Description copied from class: Struct
      Returns sizeof(struct).
      Specified by:
      sizeof in class Struct<FT_Parameter>
    • tag

      public long tag()
      Returns:
      the value of the tag field.
    • data

      public @Nullable ByteBuffer data(int capacity)
      Returns:
      a ByteBuffer view of the data pointed to by the data field.
    • tag

      public FT_Parameter tag(long value)
      Sets the specified value to the tag field.
    • data

      public FT_Parameter data(@Nullable ByteBuffer value)
      Sets the address of the specified ByteBuffer to the data field.
    • set

      public FT_Parameter set(long tag, @Nullable ByteBuffer data)
      Initializes this struct with the specified values.
    • set

      public FT_Parameter set(FT_Parameter src)
      Copies the specified struct data to this struct.
      Parameters:
      src - the source struct
      Returns:
      this struct
    • malloc

      public static FT_Parameter malloc()
      Returns a new FT_Parameter instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

      public static FT_Parameter calloc()
      Returns a new FT_Parameter instance allocated with memCalloc. The instance must be explicitly freed.
    • create

      public static FT_Parameter create()
      Returns a new FT_Parameter instance allocated with BufferUtils.
    • create

      public static FT_Parameter create(long address)
      Returns a new FT_Parameter instance for the specified memory address.
    • createSafe

      public static @Nullable FT_Parameter createSafe(long address)
      Like create, but returns null if address is NULL.
    • malloc

      public static FT_Parameter.Buffer malloc(int capacity)
      Returns a new FT_Parameter.Buffer instance allocated with memAlloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • calloc

      public static FT_Parameter.Buffer calloc(int capacity)
      Returns a new FT_Parameter.Buffer instance allocated with memCalloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • create

      public static FT_Parameter.Buffer create(int capacity)
      Returns a new FT_Parameter.Buffer instance allocated with BufferUtils.
      Parameters:
      capacity - the buffer capacity
    • create

      public static FT_Parameter.Buffer create(long address, int capacity)
      Create a FT_Parameter.Buffer instance at the specified memory.
      Parameters:
      address - the memory address
      capacity - the buffer capacity
    • createSafe

      public static @Nullable FT_Parameter.Buffer createSafe(long address, int capacity)
      Like create, but returns null if address is NULL.
    • malloc

      public static FT_Parameter malloc(MemoryStack stack)
      Returns a new FT_Parameter instance allocated on the specified MemoryStack.
      Parameters:
      stack - the stack from which to allocate
    • calloc

      public static FT_Parameter calloc(MemoryStack stack)
      Returns a new FT_Parameter instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      stack - the stack from which to allocate
    • malloc

      public static FT_Parameter.Buffer malloc(int capacity, MemoryStack stack)
      Returns a new FT_Parameter.Buffer instance allocated on the specified MemoryStack.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • calloc

      public static FT_Parameter.Buffer calloc(int capacity, MemoryStack stack)
      Returns a new FT_Parameter.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • ntag

      public static long ntag(long struct)
      Unsafe version of tag().
    • ndata

      public static @Nullable ByteBuffer ndata(long struct, int capacity)
      Unsafe version of data.
    • ntag

      public static void ntag(long struct, long value)
      Unsafe version of tag.
    • ndata

      public static void ndata(long struct, @Nullable ByteBuffer value)
      Unsafe version of data.