Class XrSpaceShareInfoFB

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class XrSpaceShareInfoFB extends Struct<XrSpaceShareInfoFB> implements NativeResource

 struct XrSpaceShareInfoFB {
     XrStructureType type;
     void const * next;
     uint32_t spaceCount;
     XrSpace * spaces;
     uint32_t userCount;
     XrSpaceUserFB * users;
 }
  • 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.
    • SPACECOUNT

      public static final int SPACECOUNT
      The struct member offsets.
    • SPACES

      public static final int SPACES
      The struct member offsets.
    • USERCOUNT

      public static final int USERCOUNT
      The struct member offsets.
    • USERS

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

    • XrSpaceShareInfoFB

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

      public int type()
      Returns:
      the value of the type field.
    • next

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

      public int spaceCount()
      Returns:
      the value of the spaceCount field.
    • spaces

      public PointerBuffer spaces()
      Returns:
      a PointerBuffer view of the data pointed to by the spaces field.
    • userCount

      public int userCount()
      Returns:
      the value of the userCount field.
    • users

      public PointerBuffer users()
      Returns:
      a PointerBuffer view of the data pointed to by the users field.
    • type

      public XrSpaceShareInfoFB type(int value)
      Sets the specified value to the type field.
    • type$Default

      public XrSpaceShareInfoFB type$Default()
      Sets the TYPE_SPACE_SHARE_INFO_FB value to the type field.
    • next

      public XrSpaceShareInfoFB next(long value)
      Sets the specified value to the next field.
    • spaces

      public XrSpaceShareInfoFB spaces(PointerBuffer value)
      Sets the address of the specified PointerBuffer to the spaces field.
    • users

      public XrSpaceShareInfoFB users(PointerBuffer value)
      Sets the address of the specified PointerBuffer to the users field.
    • set

      public XrSpaceShareInfoFB set(int type, long next, PointerBuffer spaces, PointerBuffer users)
      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 XrSpaceShareInfoFB malloc()
      Returns a new XrSpaceShareInfoFB instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

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

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

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

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

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

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

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

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

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

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

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

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

      public static XrSpaceShareInfoFB.Buffer calloc(int capacity, MemoryStack stack)
      Returns a new XrSpaceShareInfoFB.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 long nnext(long struct)
      Unsafe version of next().
    • nspaceCount

      public static int nspaceCount(long struct)
      Unsafe version of spaceCount().
    • nspaces

      public static PointerBuffer nspaces(long struct)
      Unsafe version of spaces.
    • nuserCount

      public static int nuserCount(long struct)
      Unsafe version of userCount().
    • nusers

      public static PointerBuffer nusers(long struct)
      Unsafe version of users.
    • ntype

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

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

      public static void nspaceCount(long struct, int value)
      Sets the specified value to the spaceCount field of the specified struct.
    • nspaces

      public static void nspaces(long struct, PointerBuffer value)
      Unsafe version of spaces.
    • nuserCount

      public static void nuserCount(long struct, int value)
      Sets the specified value to the userCount field of the specified struct.
    • nusers

      public static void nusers(long struct, PointerBuffer value)
      Unsafe version of users.
    • validate

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