Class AIExportFormatDesc

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class AIExportFormatDesc extends Struct<AIExportFormatDesc> implements NativeResource

 struct aiExportFormatDesc {
     char const * id;
     char const * description;
     char const * fileExtension;
 }
  • Field Details

    • SIZEOF

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

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

      public static final int ID
      The struct member offsets.
    • DESCRIPTION

      public static final int DESCRIPTION
      The struct member offsets.
    • FILEEXTENSION

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

    • AIExportFormatDesc

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

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

      public String idString()
      Returns:
      the null-terminated string pointed to by the id field.
    • description

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

      public String descriptionString()
      Returns:
      the null-terminated string pointed to by the description field.
    • fileExtension

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

      public String fileExtensionString()
      Returns:
      the null-terminated string pointed to by the fileExtension field.
    • id

      public AIExportFormatDesc id(ByteBuffer value)
      Sets the address of the specified encoded string to the id field.
    • description

      public AIExportFormatDesc description(ByteBuffer value)
      Sets the address of the specified encoded string to the description field.
    • fileExtension

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

      public AIExportFormatDesc set(ByteBuffer id, ByteBuffer description, ByteBuffer fileExtension)
      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 AIExportFormatDesc malloc()
      Returns a new AIExportFormatDesc instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static ByteBuffer nid(long struct)
      Unsafe version of id().
    • nidString

      public static String nidString(long struct)
      Unsafe version of idString().
    • ndescription

      public static ByteBuffer ndescription(long struct)
      Unsafe version of description().
    • ndescriptionString

      public static String ndescriptionString(long struct)
      Unsafe version of descriptionString().
    • nfileExtension

      public static ByteBuffer nfileExtension(long struct)
      Unsafe version of fileExtension().
    • nfileExtensionString

      public static String nfileExtensionString(long struct)
      Unsafe version of fileExtensionString().
    • nid

      public static void nid(long struct, ByteBuffer value)
      Unsafe version of id.
    • ndescription

      public static void ndescription(long struct, ByteBuffer value)
      Unsafe version of description.
    • nfileExtension

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

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