Class spng_splt

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class spng_splt extends Struct<spng_splt> implements NativeResource

 struct spng_splt {
     char name[80];
     uint8_t sample_depth;
     uint32_t n_entries;
     {@link spng_splt_entry struct spng_splt_entry} * entries;
 }
  • Field Details

    • SIZEOF

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

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

      public static final int NAME
      The struct member offsets.
    • SAMPLE_DEPTH

      public static final int SAMPLE_DEPTH
      The struct member offsets.
    • 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_splt

      public spng_splt(ByteBuffer container)
      Creates a spng_splt 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_splt>
    • name

      public ByteBuffer name()
      Returns:
      a ByteBuffer view of the name field.
    • nameString

      public String nameString()
      Returns:
      the null-terminated string stored in the name field.
    • sample_depth

      public byte sample_depth()
      Returns:
      the value of the sample_depth field.
    • n_entries

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

      public spng_splt_entry.Buffer entries()
      Returns:
      a spng_splt_entry.Buffer view of the struct array pointed to by the entries field.
    • name

      public spng_splt name(ByteBuffer value)
      Copies the specified encoded string to the name field.
    • sample_depth

      public spng_splt sample_depth(byte value)
      Sets the specified value to the sample_depth field.
    • entries

      public spng_splt entries(spng_splt_entry.Buffer value)
      Sets the address of the specified spng_splt_entry.Buffer to the entries field.
    • set

      public spng_splt set(ByteBuffer name, byte sample_depth, spng_splt_entry.Buffer entries)
      Initializes this struct with the specified values.
    • set

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static ByteBuffer nname(long struct)
      Unsafe version of name().
    • nnameString

      public static String nnameString(long struct)
      Unsafe version of nameString().
    • nsample_depth

      public static byte nsample_depth(long struct)
      Unsafe version of sample_depth().
    • nn_entries

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

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

      public static void nname(long struct, ByteBuffer value)
      Unsafe version of name.
    • nsample_depth

      public static void nsample_depth(long struct, byte value)
      Unsafe version of sample_depth.
    • 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_splt_entry.Buffer value)
      Unsafe version of entries.
    • validate

      public static void validate(long struct)
      Validates pointer members that should not be NULL.
      Parameters:
      struct - the struct to validate