Class ParSLSpineList

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class ParSLSpineList extends Struct<ParSLSpineList> implements NativeResource

 struct parsl_spine_list {
     uint32_t num_vertices;
     uint16_t num_spines;
     parsl_position * vertices;
     uint16_t * spine_lengths;
     bool closed;
 }
  • Field Details

    • SIZEOF

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

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

      public static final int NUM_VERTICES
      The struct member offsets.
    • NUM_SPINES

      public static final int NUM_SPINES
      The struct member offsets.
    • VERTICES

      public static final int VERTICES
      The struct member offsets.
    • SPINE_LENGTHS

      public static final int SPINE_LENGTHS
      The struct member offsets.
    • CLOSED

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

    • ParSLSpineList

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

      public int num_vertices()
      Returns:
      the value of the num_vertices field.
    • num_spines

      public short num_spines()
      Returns:
      the value of the num_spines field.
    • vertices

      public ParSLPosition.Buffer vertices()
      Returns:
      a ParSLPosition.Buffer view of the struct array pointed to by the vertices field.
    • spine_lengths

      public ShortBuffer spine_lengths()
      Returns:
      a ShortBuffer view of the data pointed to by the spine_lengths field.
    • closed

      public boolean closed()
      Returns:
      the value of the closed field.
    • vertices

      public ParSLSpineList vertices(ParSLPosition.Buffer value)
      Sets the address of the specified ParSLPosition.Buffer to the vertices field.
    • spine_lengths

      public ParSLSpineList spine_lengths(ShortBuffer value)
      Sets the address of the specified ShortBuffer to the spine_lengths field.
    • closed

      public ParSLSpineList closed(boolean value)
      Sets the specified value to the closed field.
    • set

      public ParSLSpineList set(ParSLPosition.Buffer vertices, ShortBuffer spine_lengths, boolean closed)
      Initializes this struct with the specified values.
    • set

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static int nnum_vertices(long struct)
      Unsafe version of num_vertices().
    • nnum_spines

      public static short nnum_spines(long struct)
      Unsafe version of num_spines().
    • nvertices

      public static ParSLPosition.Buffer nvertices(long struct)
      Unsafe version of vertices().
    • nspine_lengths

      public static ShortBuffer nspine_lengths(long struct)
      Unsafe version of spine_lengths.
    • nclosed

      public static boolean nclosed(long struct)
      Unsafe version of closed().
    • nnum_vertices

      public static void nnum_vertices(long struct, int value)
      Sets the specified value to the num_vertices field of the specified struct.
    • nnum_spines

      public static void nnum_spines(long struct, short value)
      Sets the specified value to the num_spines field of the specified struct.
    • nvertices

      public static void nvertices(long struct, ParSLPosition.Buffer value)
      Unsafe version of vertices.
    • nspine_lengths

      public static void nspine_lengths(long struct, ShortBuffer value)
      Unsafe version of spine_lengths.
    • nclosed

      public static void nclosed(long struct, boolean value)
      Unsafe version of closed.
    • validate

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