Class ExrDataSource
- All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer
struct ExrDataSource {
void * userdata;
ExrFetchCallback fetch;
ExrFetchCancel cancel;
uint64_t total_size;
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 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
ConstructorsConstructorDescriptionExrDataSource(ByteBuffer container) Creates aExrDataSourceinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionstatic ExrDataSourcecalloc()Returns a newExrDataSourceinstance allocated withmemCalloc.static ExrDataSource.Buffercalloc(int capacity) Returns a newExrDataSource.Bufferinstance allocated withmemCalloc.static ExrDataSource.Buffercalloc(int capacity, MemoryStack stack) Returns a newExrDataSource.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static ExrDataSourcecalloc(MemoryStack stack) Returns a newExrDataSourceinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.@Nullable ExrFetchCancelcancel()cancel(@Nullable ExrFetchCancelI value) Sets the specified value to thecancelfield.static ExrDataSourcecreate()Returns a newExrDataSourceinstance allocated withBufferUtils.static ExrDataSource.Buffercreate(int capacity) Returns a newExrDataSource.Bufferinstance allocated withBufferUtils.static ExrDataSourcecreate(long address) Returns a newExrDataSourceinstance for the specified memory address.static ExrDataSource.Buffercreate(long address, int capacity) Create aExrDataSource.Bufferinstance at the specified memory.static @Nullable ExrDataSourcecreateSafe(long address) static @Nullable ExrDataSource.BuffercreateSafe(long address, int capacity) fetch()fetch(ExrFetchCallbackI value) Sets the specified value to thefetchfield.intflags()flags(int value) Sets the specified value to theflagsfield.static ExrDataSourcemalloc()Returns a newExrDataSourceinstance allocated withmemAlloc.static ExrDataSource.Buffermalloc(int capacity) Returns a newExrDataSource.Bufferinstance allocated withmemAlloc.static ExrDataSource.Buffermalloc(int capacity, MemoryStack stack) Returns a newExrDataSource.Bufferinstance allocated on the specifiedMemoryStack.static ExrDataSourcemalloc(MemoryStack stack) Returns a newExrDataSourceinstance allocated on the specifiedMemoryStack.static @Nullable ExrFetchCancelncancel(long struct) Unsafe version ofcancel().static voidncancel(long struct, @Nullable ExrFetchCancelI value) Unsafe version ofcancel.static ExrFetchCallbacknfetch(long struct) Unsafe version offetch().static voidnfetch(long struct, ExrFetchCallbackI value) Unsafe version offetch.static intnflags(long struct) Unsafe version offlags().static voidnflags(long struct, int value) Unsafe version offlags.static longntotal_size(long struct) Unsafe version oftotal_size().static voidntotal_size(long struct, long value) Unsafe version oftotal_size.static longnuserdata(long struct) Unsafe version ofuserdata().static voidnuserdata(long struct, long value) Unsafe version ofuserdata.set(long userdata, ExrFetchCallbackI fetch, ExrFetchCancelI cancel, long total_size, int flags) Initializes this struct with the specified values.set(ExrDataSource src) Copies the specified struct data to this struct.intsizeof()Returnssizeof(struct).longtotal_size(long value) Sets the specified value to thetotal_sizefield.longuserdata()userdata(long value) Sets the specified value to theuserdatafield.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. -
USERDATA
public static final int USERDATAThe struct member offsets. -
FETCH
public static final int FETCHThe struct member offsets. -
CANCEL
public static final int CANCELThe struct member offsets. -
TOTAL_SIZE
public static final int TOTAL_SIZEThe struct member offsets. -
FLAGS
public static final int FLAGSThe struct member offsets.
-
-
Constructor Details
-
ExrDataSource
Creates aExrDataSourceinstance 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<ExrDataSource>
-
userdata
- Returns:
- the value of the
userdatafield.
-
fetch
- Returns:
- the value of the
fetchfield.
-
cancel
- Returns:
- the value of the
cancelfield.
-
total_size
- Returns:
- the value of the
total_sizefield.
-
flags
- Returns:
- the value of the
flagsfield.
-
userdata
Sets the specified value to theuserdatafield. -
fetch
Sets the specified value to thefetchfield. -
cancel
Sets the specified value to thecancelfield. -
total_size
Sets the specified value to thetotal_sizefield. -
flags
Sets the specified value to theflagsfield. -
set
public ExrDataSource set(long userdata, ExrFetchCallbackI fetch, ExrFetchCancelI cancel, long total_size, int flags) 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 newExrDataSourceinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newExrDataSourceinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newExrDataSourceinstance allocated withBufferUtils. -
create
Returns a newExrDataSourceinstance for the specified memory address. -
createSafe
-
malloc
Returns a newExrDataSource.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newExrDataSource.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newExrDataSource.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aExrDataSource.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newExrDataSourceinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newExrDataSourceinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newExrDataSource.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newExrDataSource.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(). -
nfetch
Unsafe version offetch(). -
ncancel
Unsafe version ofcancel(). -
ntotal_size
public static long ntotal_size(long struct) Unsafe version oftotal_size(). -
nflags
public static int nflags(long struct) Unsafe version offlags(). -
nuserdata
public static void nuserdata(long struct, long value) Unsafe version ofuserdata. -
nfetch
Unsafe version offetch. -
ncancel
Unsafe version ofcancel. -
ntotal_size
public static void ntotal_size(long struct, long value) Unsafe version oftotal_size. -
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
-