Class FMOD_TAG

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class FMOD_TAG extends Struct<FMOD_TAG> implements NativeResource

 struct FMOD_TAG {
     FMOD_TAGTYPE type;
     FMOD_TAGDATATYPE datatype;
     char * name;
     void * data;
     unsigned int datalen;
     FMOD_BOOL updated;
 }
  • 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.
    • DATATYPE

      public static final int DATATYPE
      The struct member offsets.
    • NAME

      public static final int NAME
      The struct member offsets.
    • DATA

      public static final int DATA
      The struct member offsets.
    • DATALEN

      public static final int DATALEN
      The struct member offsets.
    • UPDATED

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

    • FMOD_TAG

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

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

      public int datatype()
      Returns:
      the value of the datatype field.
    • name

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

      public String nameString()
      Returns:
      the null-terminated string pointed to by the name field.
    • data

      public ByteBuffer data()
      Returns:
      a ByteBuffer view of the data pointed to by the data field.
    • datalen

      public int datalen()
      Returns:
      the value of the datalen field.
    • updated

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

      public FMOD_TAG type(int value)
      Sets the specified value to the type field.
    • datatype

      public FMOD_TAG datatype(int value)
      Sets the specified value to the datatype field.
    • name

      public FMOD_TAG name(ByteBuffer value)
      Sets the address of the specified encoded string to the name field.
    • data

      public FMOD_TAG data(ByteBuffer value)
      Sets the address of the specified ByteBuffer to the data field.
    • updated

      public FMOD_TAG updated(int value)
      Sets the specified value to the updated field.
    • set

      public FMOD_TAG set(int type, int datatype, ByteBuffer name, ByteBuffer data, int updated)
      Initializes this struct with the specified values.
    • set

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static int ndatatype(long struct)
      Unsafe version of datatype().
    • nname

      public static ByteBuffer nname(long struct)
      Unsafe version of name().
    • nnameString

      public static String nnameString(long struct)
      Unsafe version of nameString().
    • ndata

      public static ByteBuffer ndata(long struct)
      Unsafe version of data.
    • ndatalen

      public static int ndatalen(long struct)
      Unsafe version of datalen().
    • nupdated

      public static int nupdated(long struct)
      Unsafe version of updated().
    • ntype

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

      public static void ndatatype(long struct, int value)
      Unsafe version of datatype.
    • nname

      public static void nname(long struct, ByteBuffer value)
      Unsafe version of name.
    • ndata

      public static void ndata(long struct, ByteBuffer value)
      Unsafe version of data.
    • ndatalen

      public static void ndatalen(long struct, int value)
      Sets the specified value to the datalen field of the specified struct.
    • nupdated

      public static void nupdated(long struct, int value)
      Unsafe version of updated.
    • validate

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