Class ExrErrorInfo
- All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer
struct ExrErrorInfo {
ExrResult code;
char const * message;
char const * context;
uint64_t byte_position;
int32_t line_number;
char const * source_file;
}-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class Struct
Struct.StructValidationNested classes/interfaces inherited from interface Pointer
Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.static final intThe struct member offsets.Fields inherited from interface Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionExrErrorInfo(ByteBuffer container) Creates aExrErrorInfoinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionlongbyte_position(long value) Sets the specified value to thebyte_positionfield.static ExrErrorInfocalloc()Returns a newExrErrorInfoinstance allocated withmemCalloc.static ExrErrorInfo.Buffercalloc(int capacity) Returns a newExrErrorInfo.Bufferinstance allocated withmemCalloc.static ExrErrorInfo.Buffercalloc(int capacity, MemoryStack stack) Returns a newExrErrorInfo.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static ExrErrorInfocalloc(MemoryStack stack) Returns a newExrErrorInfoinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.intcode()code(int value) Sets the specified value to thecodefield.@Nullable ByteBuffercontext()context(@Nullable ByteBuffer value) Sets the address of the specified encoded string to thecontextfield.@Nullable Stringstatic ExrErrorInfocreate()Returns a newExrErrorInfoinstance allocated withBufferUtils.static ExrErrorInfo.Buffercreate(int capacity) Returns a newExrErrorInfo.Bufferinstance allocated withBufferUtils.static ExrErrorInfocreate(long address) Returns a newExrErrorInfoinstance for the specified memory address.static ExrErrorInfo.Buffercreate(long address, int capacity) Create aExrErrorInfo.Bufferinstance at the specified memory.static @Nullable ExrErrorInfocreateSafe(long address) static @Nullable ExrErrorInfo.BuffercreateSafe(long address, int capacity) intline_number(int value) Sets the specified value to theline_numberfield.static ExrErrorInfomalloc()Returns a newExrErrorInfoinstance allocated withmemAlloc.static ExrErrorInfo.Buffermalloc(int capacity) Returns a newExrErrorInfo.Bufferinstance allocated withmemAlloc.static ExrErrorInfo.Buffermalloc(int capacity, MemoryStack stack) Returns a newExrErrorInfo.Bufferinstance allocated on the specifiedMemoryStack.static ExrErrorInfomalloc(MemoryStack stack) Returns a newExrErrorInfoinstance allocated on the specifiedMemoryStack.message()message(ByteBuffer value) Sets the address of the specified encoded string to themessagefield.static longnbyte_position(long struct) Unsafe version ofbyte_position().static voidnbyte_position(long struct, long value) Unsafe version ofbyte_position.static intncode(long struct) Unsafe version ofcode().static voidncode(long struct, int value) Unsafe version ofcode.static @Nullable ByteBufferncontext(long struct) Unsafe version ofcontext().static voidncontext(long struct, @Nullable ByteBuffer value) Unsafe version ofcontext.static @Nullable StringncontextString(long struct) Unsafe version ofcontextString().static intnline_number(long struct) Unsafe version ofline_number().static voidnline_number(long struct, int value) Unsafe version ofline_number.static ByteBuffernmessage(long struct) Unsafe version ofmessage().static voidnmessage(long struct, ByteBuffer value) Unsafe version ofmessage.static StringnmessageString(long struct) Unsafe version ofmessageString().static ByteBuffernsource_file(long struct) Unsafe version ofsource_file().static voidnsource_file(long struct, ByteBuffer value) Unsafe version ofsource_file.static Stringnsource_fileString(long struct) Unsafe version ofsource_fileString().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(ExrErrorInfo src) Copies the specified struct data to this struct.intsizeof()Returnssizeof(struct).source_file(ByteBuffer value) Sets the address of the specified encoded string to thesource_filefield.static voidvalidate(long struct) Validates pointer members that should not beNULL.Methods inherited from class Pointer.Default
address, equals, hashCode, toStringMethods inherited from interface NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
CODE
public static final int CODEThe struct member offsets. -
MESSAGE
public static final int MESSAGEThe struct member offsets. -
CONTEXT
public static final int CONTEXTThe struct member offsets. -
BYTE_POSITION
public static final int BYTE_POSITIONThe struct member offsets. -
LINE_NUMBER
public static final int LINE_NUMBERThe struct member offsets. -
SOURCE_FILE
public static final int SOURCE_FILEThe struct member offsets.
-
-
Constructor Details
-
ExrErrorInfo
Creates aExrErrorInfoinstance at the current position of the specifiedByteBuffercontainer. 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:StructReturnssizeof(struct).- Specified by:
sizeofin classStruct<ExrErrorInfo>
-
code
- Returns:
- the value of the
codefield.
-
message
- Returns:
- a
ByteBufferview of the null-terminated string pointed to by themessagefield.
-
messageString
- Returns:
- the null-terminated string pointed to by the
messagefield.
-
context
- Returns:
- a
ByteBufferview of the null-terminated string pointed to by thecontextfield.
-
contextString
- Returns:
- the null-terminated string pointed to by the
contextfield.
-
byte_position
- Returns:
- the value of the
byte_positionfield.
-
line_number
- Returns:
- the value of the
line_numberfield.
-
source_file
- Returns:
- a
ByteBufferview of the null-terminated string pointed to by thesource_filefield.
-
source_fileString
- Returns:
- the null-terminated string pointed to by the
source_filefield.
-
code
Sets the specified value to thecodefield. -
message
Sets the address of the specified encoded string to themessagefield. -
context
Sets the address of the specified encoded string to thecontextfield. -
byte_position
Sets the specified value to thebyte_positionfield. -
line_number
Sets the specified value to theline_numberfield. -
source_file
Sets the address of the specified encoded string to thesource_filefield. -
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
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
Returns a newExrErrorInfoinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newExrErrorInfoinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newExrErrorInfoinstance allocated withBufferUtils. -
create
Returns a newExrErrorInfoinstance for the specified memory address. -
createSafe
-
malloc
Returns a newExrErrorInfo.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newExrErrorInfo.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newExrErrorInfo.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aExrErrorInfo.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newExrErrorInfoinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newExrErrorInfoinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newExrErrorInfo.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newExrErrorInfo.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
ncode
public static int ncode(long struct) Unsafe version ofcode(). -
nmessage
Unsafe version ofmessage(). -
nmessageString
Unsafe version ofmessageString(). -
ncontext
Unsafe version ofcontext(). -
ncontextString
Unsafe version ofcontextString(). -
nbyte_position
public static long nbyte_position(long struct) Unsafe version ofbyte_position(). -
nline_number
public static int nline_number(long struct) Unsafe version ofline_number(). -
nsource_file
Unsafe version ofsource_file(). -
nsource_fileString
Unsafe version ofsource_fileString(). -
ncode
public static void ncode(long struct, int value) Unsafe version ofcode. -
nmessage
Unsafe version ofmessage. -
ncontext
Unsafe version ofcontext. -
nbyte_position
public static void nbyte_position(long struct, long value) Unsafe version ofbyte_position. -
nline_number
public static void nline_number(long struct, int value) Unsafe version ofline_number. -
nsource_file
Unsafe version ofsource_file. -
validate
public static void validate(long struct) Validates pointer members that should not beNULL.- Parameters:
struct- the struct to validate
-