Class ExrErrorInfo

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class ExrErrorInfo extends Struct<ExrErrorInfo> implements NativeResource
struct ExrErrorInfo {
    ExrResult code;
    char const * message;
    char const * context;
    uint64_t byte_position;
    int32_t line_number;
    char const * source_file;
}
  • Field Details

    • SIZEOF

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

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

      public static final int CODE
      The struct member offsets.
    • MESSAGE

      public static final int MESSAGE
      The struct member offsets.
    • CONTEXT

      public static final int CONTEXT
      The struct member offsets.
    • BYTE_POSITION

      public static final int BYTE_POSITION
      The struct member offsets.
    • LINE_NUMBER

      public static final int LINE_NUMBER
      The struct member offsets.
    • SOURCE_FILE

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

    • ExrErrorInfo

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

      @NativeType("ExrResult") public int code()
      Returns:
      the value of the code field.
    • message

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

      @NativeType("char const *") public String messageString()
      Returns:
      the null-terminated string pointed to by the message field.
    • context

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

      @NativeType("char const *") public @Nullable String contextString()
      Returns:
      the null-terminated string pointed to by the context field.
    • byte_position

      @NativeType("uint64_t") public long byte_position()
      Returns:
      the value of the byte_position field.
    • line_number

      @NativeType("int32_t") public int line_number()
      Returns:
      the value of the line_number field.
    • source_file

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

      @NativeType("char const *") public String source_fileString()
      Returns:
      the null-terminated string pointed to by the source_file field.
    • code

      public ExrErrorInfo code(@NativeType("ExrResult") int value)
      Sets the specified value to the code field.
    • message

      public ExrErrorInfo message(@NativeType("char const *") ByteBuffer value)
      Sets the address of the specified encoded string to the message field.
    • context

      public ExrErrorInfo context(@NativeType("char const *") @Nullable ByteBuffer value)
      Sets the address of the specified encoded string to the context field.
    • byte_position

      public ExrErrorInfo byte_position(@NativeType("uint64_t") long value)
      Sets the specified value to the byte_position field.
    • line_number

      public ExrErrorInfo line_number(@NativeType("int32_t") int value)
      Sets the specified value to the line_number field.
    • source_file

      public ExrErrorInfo source_file(@NativeType("char const *") ByteBuffer value)
      Sets the address of the specified encoded string to the source_file field.
    • set

      public ExrErrorInfo set(int code, ByteBuffer message, @Nullable ByteBuffer context, long byte_position, int line_number, ByteBuffer source_file)
      Initializes this struct with the specified values.
    • set

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static int ncode(long struct)
      Unsafe version of code().
    • nmessage

      public static ByteBuffer nmessage(long struct)
      Unsafe version of message().
    • nmessageString

      public static String nmessageString(long struct)
      Unsafe version of messageString().
    • ncontext

      public static @Nullable ByteBuffer ncontext(long struct)
      Unsafe version of context().
    • ncontextString

      public static @Nullable String ncontextString(long struct)
      Unsafe version of contextString().
    • nbyte_position

      public static long nbyte_position(long struct)
      Unsafe version of byte_position().
    • nline_number

      public static int nline_number(long struct)
      Unsafe version of line_number().
    • nsource_file

      public static ByteBuffer nsource_file(long struct)
      Unsafe version of source_file().
    • nsource_fileString

      public static String nsource_fileString(long struct)
      Unsafe version of source_fileString().
    • ncode

      public static void ncode(long struct, int value)
      Unsafe version of code.
    • nmessage

      public static void nmessage(long struct, ByteBuffer value)
      Unsafe version of message.
    • ncontext

      public static void ncontext(long struct, @Nullable ByteBuffer value)
      Unsafe version of context.
    • nbyte_position

      public static void nbyte_position(long struct, long value)
      Unsafe version of byte_position.
    • nline_number

      public static void nline_number(long struct, int value)
      Unsafe version of line_number.
    • nsource_file

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

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