Class spng_plte

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class spng_plte extends Struct<spng_plte> implements NativeResource

 struct spng_plte {
     uint32_t n_entries;
     {@link spng_plte_entry struct spng_plte_entry} entries[256];
 }
  • Field Details

    • SIZEOF

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

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

      public static final int N_ENTRIES
      The struct member offsets.
    • ENTRIES

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

    • spng_plte

      public spng_plte(ByteBuffer container)
      Creates a spng_plte 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<spng_plte>
    • n_entries

      public int n_entries()
      Returns:
      the value of the n_entries field.
    • entries

      public spng_plte_entry.Buffer entries()
      Returns:
      a spng_plte_entry.Buffer view of the entries field.
    • entries

      public spng_plte_entry entries(int index)
      Returns:
      a spng_plte_entry view of the struct at the specified index of the entries field.
    • entries

      public spng_plte entries(spng_plte_entry.Buffer value)
      Copies the specified spng_plte_entry.Buffer to the entries field.
    • entries

      public spng_plte entries(int index, spng_plte_entry value)
      Copies the specified spng_plte_entry at the specified index of the entries field.
    • entries

      public spng_plte entries(Consumer<spng_plte_entry.Buffer> consumer)
      Passes the entries field to the specified Consumer.
    • entries

      public spng_plte entries(int index, Consumer<spng_plte_entry> consumer)
      Passes the element at index of the entries field to the specified Consumer.
    • set

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static int nn_entries(long struct)
      Unsafe version of n_entries().
    • nentries

      public static spng_plte_entry.Buffer nentries(long struct)
      Unsafe version of entries().
    • nentries

      public static spng_plte_entry nentries(long struct, int index)
      Unsafe version of entries.
    • nn_entries

      public static void nn_entries(long struct, int value)
      Sets the specified value to the n_entries field of the specified struct.
    • nentries

      public static void nentries(long struct, spng_plte_entry.Buffer value)
      Unsafe version of entries.
    • nentries

      public static void nentries(long struct, int index, spng_plte_entry value)
      Unsafe version of entries.