Class FMOD_STUDIO_USER_PROPERTY

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class FMOD_STUDIO_USER_PROPERTY extends Struct<FMOD_STUDIO_USER_PROPERTY> implements NativeResource

 struct FMOD_STUDIO_USER_PROPERTY {
     char const * name;
     FMOD_STUDIO_USER_PROPERTY_TYPE type;
     union {
         int intvalue;
         FMOD_BOOL boolvalue;
         float floatvalue;
         char const * stringvalue;
     };
 }
  • Field Details

    • SIZEOF

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

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

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

      public static final int TYPE
      The struct member offsets.
    • INTVALUE

      public static final int INTVALUE
      The struct member offsets.
    • BOOLVALUE

      public static final int BOOLVALUE
      The struct member offsets.
    • FLOATVALUE

      public static final int FLOATVALUE
      The struct member offsets.
    • STRINGVALUE

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

    • FMOD_STUDIO_USER_PROPERTY

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

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

      public int intvalue()
      Returns:
      the value of the intvalue field.
    • boolvalue

      public int boolvalue()
      Returns:
      the value of the boolvalue field.
    • floatvalue

      public float floatvalue()
      Returns:
      the value of the floatvalue field.
    • stringvalue

      public @Nullable ByteBuffer stringvalue()
      Returns:
      a ByteBuffer view of the null-terminated string pointed to by the stringvalue field.
    • stringvalueString

      public @Nullable String stringvalueString()
      Returns:
      the null-terminated string pointed to by the stringvalue field.
    • name

      Sets the address of the specified encoded string to the name field.
    • type

      public FMOD_STUDIO_USER_PROPERTY type(int value)
      Sets the specified value to the type field.
    • intvalue

      public FMOD_STUDIO_USER_PROPERTY intvalue(int value)
      Sets the specified value to the intvalue field.
    • boolvalue

      public FMOD_STUDIO_USER_PROPERTY boolvalue(int value)
      Sets the specified value to the boolvalue field.
    • floatvalue

      public FMOD_STUDIO_USER_PROPERTY floatvalue(float value)
      Sets the specified value to the floatvalue field.
    • stringvalue

      public FMOD_STUDIO_USER_PROPERTY stringvalue(@Nullable ByteBuffer value)
      Sets the address of the specified encoded string to the stringvalue field.
    • set

      Copies the specified struct data to this struct.
      Parameters:
      src - the source struct
      Returns:
      this struct
    • malloc

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

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

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

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

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

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

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

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

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

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

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

      public static FMOD_STUDIO_USER_PROPERTY calloc(MemoryStack stack)
      Returns a new FMOD_STUDIO_USER_PROPERTY 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_STUDIO_USER_PROPERTY.Buffer malloc(int capacity, MemoryStack stack)
      Returns a new FMOD_STUDIO_USER_PROPERTY.Buffer instance allocated on the specified MemoryStack.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • calloc

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

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

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

      public static int ntype(long struct)
      Unsafe version of type().
    • nintvalue

      public static int nintvalue(long struct)
      Unsafe version of intvalue().
    • nboolvalue

      public static int nboolvalue(long struct)
      Unsafe version of boolvalue().
    • nfloatvalue

      public static float nfloatvalue(long struct)
      Unsafe version of floatvalue().
    • nstringvalue

      public static @Nullable ByteBuffer nstringvalue(long struct)
      Unsafe version of stringvalue().
    • nstringvalueString

      public static @Nullable String nstringvalueString(long struct)
      Unsafe version of stringvalueString().
    • nname

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

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

      public static void nintvalue(long struct, int value)
      Unsafe version of intvalue.
    • nboolvalue

      public static void nboolvalue(long struct, int value)
      Unsafe version of boolvalue.
    • nfloatvalue

      public static void nfloatvalue(long struct, float value)
      Unsafe version of floatvalue.
    • nstringvalue

      public static void nstringvalue(long struct, @Nullable ByteBuffer value)
      Unsafe version of stringvalue.
    • validate

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