Class ExrDataSink
- All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer
struct ExrDataSink {
void * userdata;
ExrWriteCallback write;
ExrFetchCancel cancel;
uint32_t flags;
}-
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 size in bytes.static final intThe struct member offsets.static final intThe struct member offsets.Fields inherited from interface Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionExrDataSink(ByteBuffer container) Creates aExrDataSinkinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionstatic ExrDataSinkcalloc()Returns a newExrDataSinkinstance allocated withmemCalloc.static ExrDataSink.Buffercalloc(int capacity) Returns a newExrDataSink.Bufferinstance allocated withmemCalloc.static ExrDataSink.Buffercalloc(int capacity, MemoryStack stack) Returns a newExrDataSink.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static ExrDataSinkcalloc(MemoryStack stack) Returns a newExrDataSinkinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.@Nullable ExrFetchCancelcancel()cancel(@Nullable ExrFetchCancelI value) Sets the specified value to thecancelfield.static ExrDataSinkcreate()Returns a newExrDataSinkinstance allocated withBufferUtils.static ExrDataSink.Buffercreate(int capacity) Returns a newExrDataSink.Bufferinstance allocated withBufferUtils.static ExrDataSinkcreate(long address) Returns a newExrDataSinkinstance for the specified memory address.static ExrDataSink.Buffercreate(long address, int capacity) Create aExrDataSink.Bufferinstance at the specified memory.static @Nullable ExrDataSinkcreateSafe(long address) static @Nullable ExrDataSink.BuffercreateSafe(long address, int capacity) intflags()flags(int value) Sets the specified value to theflagsfield.static ExrDataSinkmalloc()Returns a newExrDataSinkinstance allocated withmemAlloc.static ExrDataSink.Buffermalloc(int capacity) Returns a newExrDataSink.Bufferinstance allocated withmemAlloc.static ExrDataSink.Buffermalloc(int capacity, MemoryStack stack) Returns a newExrDataSink.Bufferinstance allocated on the specifiedMemoryStack.static ExrDataSinkmalloc(MemoryStack stack) Returns a newExrDataSinkinstance allocated on the specifiedMemoryStack.static @Nullable ExrFetchCancelncancel(long struct) Unsafe version ofcancel().static voidncancel(long struct, @Nullable ExrFetchCancelI value) Unsafe version ofcancel.static intnflags(long struct) Unsafe version offlags().static voidnflags(long struct, int value) Unsafe version offlags.static longnuserdata(long struct) Unsafe version ofuserdata().static voidnuserdata(long struct, long value) Unsafe version ofuserdata.static ExrWriteCallbacknwrite(long struct) Unsafe version ofwrite().static voidnwrite(long struct, ExrWriteCallbackI value) Unsafe version ofwrite.set(long userdata, ExrWriteCallbackI write, ExrFetchCancelI cancel, int flags) Initializes this struct with the specified values.set(ExrDataSink src) Copies the specified struct data to this struct.intsizeof()Returnssizeof(struct).longuserdata()userdata(long value) Sets the specified value to theuserdatafield.static voidvalidate(long struct) Validates pointer members that should not beNULL.write()write(ExrWriteCallbackI value) Sets the specified value to thewritefield.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. -
USERDATA
public static final int USERDATAThe struct member offsets. -
WRITE
public static final int WRITEThe struct member offsets. -
CANCEL
public static final int CANCELThe struct member offsets. -
FLAGS
public static final int FLAGSThe struct member offsets.
-
-
Constructor Details
-
ExrDataSink
Creates aExrDataSinkinstance 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<ExrDataSink>
-
userdata
- Returns:
- the value of the
userdatafield.
-
write
- Returns:
- the value of the
writefield.
-
cancel
- Returns:
- the value of the
cancelfield.
-
flags
- Returns:
- the value of the
flagsfield.
-
userdata
Sets the specified value to theuserdatafield. -
write
Sets the specified value to thewritefield. -
cancel
Sets the specified value to thecancelfield. -
flags
Sets the specified value to theflagsfield. -
set
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 newExrDataSinkinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newExrDataSinkinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newExrDataSinkinstance allocated withBufferUtils. -
create
Returns a newExrDataSinkinstance for the specified memory address. -
createSafe
-
malloc
Returns a newExrDataSink.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newExrDataSink.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newExrDataSink.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aExrDataSink.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newExrDataSinkinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newExrDataSinkinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newExrDataSink.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newExrDataSink.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
nuserdata
public static long nuserdata(long struct) Unsafe version ofuserdata(). -
nwrite
Unsafe version ofwrite(). -
ncancel
Unsafe version ofcancel(). -
nflags
public static int nflags(long struct) Unsafe version offlags(). -
nuserdata
public static void nuserdata(long struct, long value) Unsafe version ofuserdata. -
nwrite
Unsafe version ofwrite. -
ncancel
Unsafe version ofcancel. -
nflags
public static void nflags(long struct, int value) Unsafe version offlags. -
validate
public static void validate(long struct) Validates pointer members that should not beNULL.- Parameters:
struct- the struct to validate
-