Class AIImporterDesc

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class AIImporterDesc extends Struct<AIImporterDesc> implements NativeResource

 struct aiImporterDesc {
     char const * mName;
     char const * mAuthor;
     char const * mMaintainer;
     char const * mComments;
     unsigned int mFlags;
     unsigned int mMinMajor;
     unsigned int mMinMinor;
     unsigned int mMaxMajor;
     unsigned int mMaxMinor;
     char const * mFileExtensions;
 }
  • Field Details

    • SIZEOF

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

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

      public static final int MNAME
      The struct member offsets.
    • MAUTHOR

      public static final int MAUTHOR
      The struct member offsets.
    • MMAINTAINER

      public static final int MMAINTAINER
      The struct member offsets.
    • MCOMMENTS

      public static final int MCOMMENTS
      The struct member offsets.
    • MFLAGS

      public static final int MFLAGS
      The struct member offsets.
    • MMINMAJOR

      public static final int MMINMAJOR
      The struct member offsets.
    • MMINMINOR

      public static final int MMINMINOR
      The struct member offsets.
    • MMAXMAJOR

      public static final int MMAXMAJOR
      The struct member offsets.
    • MMAXMINOR

      public static final int MMAXMINOR
      The struct member offsets.
    • MFILEEXTENSIONS

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

    • AIImporterDesc

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

      public ByteBuffer mName()
      Returns:
      a ByteBuffer view of the null-terminated string pointed to by the mName field.
    • mNameString

      public String mNameString()
      Returns:
      the null-terminated string pointed to by the mName field.
    • mAuthor

      public ByteBuffer mAuthor()
      Returns:
      a ByteBuffer view of the null-terminated string pointed to by the mAuthor field.
    • mAuthorString

      public String mAuthorString()
      Returns:
      the null-terminated string pointed to by the mAuthor field.
    • mMaintainer

      public ByteBuffer mMaintainer()
      Returns:
      a ByteBuffer view of the null-terminated string pointed to by the mMaintainer field.
    • mMaintainerString

      public String mMaintainerString()
      Returns:
      the null-terminated string pointed to by the mMaintainer field.
    • mComments

      public ByteBuffer mComments()
      Returns:
      a ByteBuffer view of the null-terminated string pointed to by the mComments field.
    • mCommentsString

      public String mCommentsString()
      Returns:
      the null-terminated string pointed to by the mComments field.
    • mFlags

      public int mFlags()
      Returns:
      the value of the mFlags field.
    • mMinMajor

      public int mMinMajor()
      Returns:
      the value of the mMinMajor field.
    • mMinMinor

      public int mMinMinor()
      Returns:
      the value of the mMinMinor field.
    • mMaxMajor

      public int mMaxMajor()
      Returns:
      the value of the mMaxMajor field.
    • mMaxMinor

      public int mMaxMinor()
      Returns:
      the value of the mMaxMinor field.
    • mFileExtensions

      public ByteBuffer mFileExtensions()
      Returns:
      a ByteBuffer view of the null-terminated string pointed to by the mFileExtensions field.
    • mFileExtensionsString

      public String mFileExtensionsString()
      Returns:
      the null-terminated string pointed to by the mFileExtensions field.
    • mName

      public AIImporterDesc mName(ByteBuffer value)
      Sets the address of the specified encoded string to the mName field.
    • mAuthor

      public AIImporterDesc mAuthor(ByteBuffer value)
      Sets the address of the specified encoded string to the mAuthor field.
    • mMaintainer

      public AIImporterDesc mMaintainer(ByteBuffer value)
      Sets the address of the specified encoded string to the mMaintainer field.
    • mComments

      public AIImporterDesc mComments(ByteBuffer value)
      Sets the address of the specified encoded string to the mComments field.
    • mFlags

      public AIImporterDesc mFlags(int value)
      Sets the specified value to the mFlags field.
    • mMinMajor

      public AIImporterDesc mMinMajor(int value)
      Sets the specified value to the mMinMajor field.
    • mMinMinor

      public AIImporterDesc mMinMinor(int value)
      Sets the specified value to the mMinMinor field.
    • mMaxMajor

      public AIImporterDesc mMaxMajor(int value)
      Sets the specified value to the mMaxMajor field.
    • mMaxMinor

      public AIImporterDesc mMaxMinor(int value)
      Sets the specified value to the mMaxMinor field.
    • mFileExtensions

      public AIImporterDesc mFileExtensions(ByteBuffer value)
      Sets the address of the specified encoded string to the mFileExtensions field.
    • set

      public AIImporterDesc set(ByteBuffer mName, ByteBuffer mAuthor, ByteBuffer mMaintainer, ByteBuffer mComments, int mFlags, int mMinMajor, int mMinMinor, int mMaxMajor, int mMaxMinor, ByteBuffer mFileExtensions)
      Initializes this struct with the specified values.
    • set

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

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

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

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

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

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

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

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

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

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

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

      @Deprecated public static AIImporterDesc mallocStack()
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
    • callocStack

      @Deprecated public static AIImporterDesc callocStack()
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
    • mallocStack

      @Deprecated public static AIImporterDesc mallocStack(MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
    • callocStack

      @Deprecated public static AIImporterDesc callocStack(MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
    • mallocStack

      @Deprecated public static AIImporterDesc.Buffer mallocStack(int capacity)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.
    • callocStack

      @Deprecated public static AIImporterDesc.Buffer callocStack(int capacity)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(int, MemoryStack) instead.
    • mallocStack

      @Deprecated public static AIImporterDesc.Buffer mallocStack(int capacity, MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.
    • callocStack

      @Deprecated public static AIImporterDesc.Buffer callocStack(int capacity, MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(int, MemoryStack) instead.
    • malloc

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

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

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

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

      public static ByteBuffer nmName(long struct)
      Unsafe version of mName().
    • nmNameString

      public static String nmNameString(long struct)
      Unsafe version of mNameString().
    • nmAuthor

      public static ByteBuffer nmAuthor(long struct)
      Unsafe version of mAuthor().
    • nmAuthorString

      public static String nmAuthorString(long struct)
      Unsafe version of mAuthorString().
    • nmMaintainer

      public static ByteBuffer nmMaintainer(long struct)
      Unsafe version of mMaintainer().
    • nmMaintainerString

      public static String nmMaintainerString(long struct)
      Unsafe version of mMaintainerString().
    • nmComments

      public static ByteBuffer nmComments(long struct)
      Unsafe version of mComments().
    • nmCommentsString

      public static String nmCommentsString(long struct)
      Unsafe version of mCommentsString().
    • nmFlags

      public static int nmFlags(long struct)
      Unsafe version of mFlags().
    • nmMinMajor

      public static int nmMinMajor(long struct)
      Unsafe version of mMinMajor().
    • nmMinMinor

      public static int nmMinMinor(long struct)
      Unsafe version of mMinMinor().
    • nmMaxMajor

      public static int nmMaxMajor(long struct)
      Unsafe version of mMaxMajor().
    • nmMaxMinor

      public static int nmMaxMinor(long struct)
      Unsafe version of mMaxMinor().
    • nmFileExtensions

      public static ByteBuffer nmFileExtensions(long struct)
      Unsafe version of mFileExtensions().
    • nmFileExtensionsString

      public static String nmFileExtensionsString(long struct)
      Unsafe version of mFileExtensionsString().
    • nmName

      public static void nmName(long struct, ByteBuffer value)
      Unsafe version of mName.
    • nmAuthor

      public static void nmAuthor(long struct, ByteBuffer value)
      Unsafe version of mAuthor.
    • nmMaintainer

      public static void nmMaintainer(long struct, ByteBuffer value)
      Unsafe version of mMaintainer.
    • nmComments

      public static void nmComments(long struct, ByteBuffer value)
      Unsafe version of mComments.
    • nmFlags

      public static void nmFlags(long struct, int value)
      Unsafe version of mFlags.
    • nmMinMajor

      public static void nmMinMajor(long struct, int value)
      Unsafe version of mMinMajor.
    • nmMinMinor

      public static void nmMinMinor(long struct, int value)
      Unsafe version of mMinMinor.
    • nmMaxMajor

      public static void nmMaxMajor(long struct, int value)
      Unsafe version of mMaxMajor.
    • nmMaxMinor

      public static void nmMaxMinor(long struct, int value)
      Unsafe version of mMaxMinor.
    • nmFileExtensions

      public static void nmFileExtensions(long struct, ByteBuffer value)
      Unsafe version of mFileExtensions.
    • validate

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