Class XrBaseInStructure

java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<XrBaseInStructure>
org.lwjgl.openxr.XrBaseInStructure
All Implemented Interfaces:
AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

public class XrBaseInStructure extends org.lwjgl.system.Struct<XrBaseInStructure> implements org.lwjgl.system.NativeResource
Convenience type for iterating (read only).
Description

XrBaseInStructure can be used to facilitate iterating through a read-only structure pointer chain.

See Also

XrBaseInStructure, XrBaseOutStructure

Layout


 struct XrBaseInStructure {
     XrStructureType type();
     XrBaseInStructure const * next();
 }
  • Field Details

    • SIZEOF

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

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

      public static final int TYPE
      The struct member offsets.
    • NEXT

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

    • XrBaseInStructure

      public XrBaseInStructure(ByteBuffer container)
      Creates a XrBaseInStructure 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()
      Specified by:
      sizeof in class org.lwjgl.system.Struct<XrBaseInStructure>
    • type

      public int type()
      the XrStructureType of this structure. This base structure itself has no associated XrStructureType value.
    • next

      public XrBaseInStructure next()
      NULL or a pointer to the next structure in a structure chain.
    • type

      public XrBaseInStructure type(int value)
      Sets the specified value to the type() field.
    • next

      public XrBaseInStructure next(XrBaseInStructure value)
      Sets the address of the specified XrBaseInStructure to the next() field.
    • set

      public XrBaseInStructure set(int type, XrBaseInStructure next)
      Initializes this struct with the specified values.
    • set

      Copies the specified struct data to this struct.
      Parameters:
      src - the source struct
      Returns:
      this struct
    • malloc

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static XrBaseInStructure.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new XrBaseInStructure.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
    • ntype

      public static int ntype(long struct)
      Unsafe version of type().
    • nnext

      public static XrBaseInStructure nnext(long struct)
      Unsafe version of next().
    • ntype

      public static void ntype(long struct, int value)
      Unsafe version of type.
    • nnext

      public static void nnext(long struct, XrBaseInStructure value)
      Unsafe version of next.
    • validate

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