Class FT_StreamDesc

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class FT_StreamDesc extends Struct<FT_StreamDesc> implements NativeResource

 union FT_StreamDesc {
     long value;
     void * pointer;
 }
  • Field Details

    • SIZEOF

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

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

      public static final int VALUE
      The struct member offsets.
    • POINTER

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

    • FT_StreamDesc

      public FT_StreamDesc(ByteBuffer container)
      Creates a FT_StreamDesc 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_StreamDesc>
    • value

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

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

      public FT_StreamDesc value(long value)
      Sets the specified value to the value field.
    • pointer

      public FT_StreamDesc pointer(long value)
      Sets the specified value to the pointer field.
    • set

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

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

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

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

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

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

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

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

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

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

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

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

      public static FT_StreamDesc calloc(MemoryStack stack)
      Returns a new FT_StreamDesc 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_StreamDesc.Buffer malloc(int capacity, MemoryStack stack)
      Returns a new FT_StreamDesc.Buffer instance allocated on the specified MemoryStack.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • calloc

      public static FT_StreamDesc.Buffer calloc(int capacity, MemoryStack stack)
      Returns a new FT_StreamDesc.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
    • nvalue

      public static long nvalue(long struct)
      Unsafe version of value().
    • npointer

      public static long npointer(long struct)
      Unsafe version of pointer().
    • nvalue

      public static void nvalue(long struct, long value)
      Unsafe version of value.
    • npointer

      public static void npointer(long struct, long value)
      Unsafe version of pointer.