Class AIMetaDataEntry

  • All Implemented Interfaces:
    java.lang.AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer


    public class AIMetaDataEntry
    extends org.lwjgl.system.Struct
    implements org.lwjgl.system.NativeResource

    Layout

     struct aiMetadataEntry {
         aiMetadataType mType;
         void * mData;
     }
    • Field Detail

      • SIZEOF

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

      • AIMetaDataEntry

        public AIMetaDataEntry(java.nio.ByteBuffer container)
        Creates a AIMetaDataEntry 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 Detail

      • sizeof

        public int sizeof()
        Specified by:
        sizeof in class org.lwjgl.system.Struct
      • mType

        public int mType()
        Returns the value of the mType field.
      • mData

        public java.nio.ByteBuffer mData(int capacity)
        Returns a ByteBuffer view of the data pointed to by the mData field.
        Parameters:
        capacity - the number of elements in the returned buffer
      • mType

        public AIMetaDataEntry mType(int value)
        Sets the specified value to the mType field.
      • mData

        public AIMetaDataEntry mData(java.nio.ByteBuffer value)
        Sets the address of the specified ByteBuffer to the mData field.
      • set

        public AIMetaDataEntry set(int mType,
                                   java.nio.ByteBuffer mData)
        Initializes this struct with the specified values.
      • set

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

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

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

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

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

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

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

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

        public static AIMetaDataEntry callocStack()
        Returns a new AIMetaDataEntry instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
      • mallocStack

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

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

        public static AIMetaDataEntry.Buffer callocStack(int capacity)
        Returns a new AIMetaDataEntry.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
        Parameters:
        capacity - the buffer capacity
      • mallocStack

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

        public static AIMetaDataEntry.Buffer callocStack(int capacity,
                                                         org.lwjgl.system.MemoryStack stack)
        Returns a new AIMetaDataEntry.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
        Parameters:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • validate

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

        public static void validate(long array,
                                    int count)
        Calls AIMetaDataEntry.validate(long) for each struct contained in the specified struct array.
        Parameters:
        array - the struct array to validate
        count - the number of structs in array