Class ExrAttribute

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class ExrAttribute extends Struct<ExrAttribute> implements NativeResource
struct ExrAttribute {
    char const * name;
    char const * type_name;
    ExrAttributeType type;
    void const * value;
    uint32_t size;
}
  • 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_NAME

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

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

      public static final int VALUE
      The struct member offsets.
    • SIZE

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

    • ExrAttribute

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

      @NativeType("char const *") public ByteBuffer name()
      Returns:
      a ByteBuffer view of the null-terminated string pointed to by the name field.
    • nameString

      @NativeType("char const *") public String nameString()
      Returns:
      the null-terminated string pointed to by the name field.
    • type_name

      @NativeType("char const *") public ByteBuffer type_name()
      Returns:
      a ByteBuffer view of the null-terminated string pointed to by the type_name field.
    • type_nameString

      @NativeType("char const *") public String type_nameString()
      Returns:
      the null-terminated string pointed to by the type_name field.
    • type

      @NativeType("ExrAttributeType") public int type()
      Returns:
      the value of the type field.
    • value

      @NativeType("void const *") public ByteBuffer value()
      Returns:
      a ByteBuffer view of the data pointed to by the value field.
    • size

      @NativeType("uint32_t") public int size()
      Returns:
      the value of the size field.
    • name

      public ExrAttribute name(@NativeType("char const *") ByteBuffer value)
      Sets the address of the specified encoded string to the name field.
    • type_name

      public ExrAttribute type_name(@NativeType("char const *") ByteBuffer value)
      Sets the address of the specified encoded string to the type_name field.
    • type

      public ExrAttribute type(@NativeType("ExrAttributeType") int value)
      Sets the specified value to the type field.
    • value

      public ExrAttribute value(@NativeType("void const *") ByteBuffer value)
      Sets the address of the specified ByteBuffer to the value field.
    • set

      public ExrAttribute set(ByteBuffer name, ByteBuffer type_name, int type, ByteBuffer value)
      Initializes this struct with the specified values.
    • set

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static ByteBuffer ntype_name(long struct)
      Unsafe version of type_name().
    • ntype_nameString

      public static String ntype_nameString(long struct)
      Unsafe version of type_nameString().
    • ntype

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

      public static ByteBuffer nvalue(long struct)
      Unsafe version of value.
    • nsize

      public static int nsize(long struct)
      Unsafe version of size().
    • nname

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

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

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

      public static void nvalue(long struct, ByteBuffer value)
      Unsafe version of value.
    • nsize

      public static void nsize(long struct, int value)
      Sets the specified value to the size field of the specified struct.
    • validate

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