Record Class STBI_IoCallbacks
java.lang.Object
java.lang.Record
club.doki7.stb.image.datatype.STBI_IoCallbacks
- All Implemented Interfaces:
IPointer
,ISTBI_IoCallbacks
@ValueBasedCandidate
@UnsafeConstructor
public record STBI_IoCallbacks(@NotNull MemorySegment segment)
extends Record
implements ISTBI_IoCallbacks
Represents a pointer to a stbi_io_callbacks
structure in native memory.
Structure
typedef struct stbi_io_callbacks {
PFN_stbi_io_callbacks_
read
read
;
PFN_stbi_io_callbacks_
skip
skip
;
PFN_stbi_io_callbacks_
eof
eof
;
} stbi_io_callbacks;
Contracts
The property segment()
should always be not-null
(segment != NULL && !segment.equals(MemorySegment.NULL)
), and properly aligned to
LAYOUT.byteAlignment()
bytes. To represent null pointer, you may use a Java
null
instead. See the documentation of IPointer.segment()
for more details.
The constructor of this class is marked as UnsafeConstructor
, because it does not
perform any runtime check. The constructor can be useful for automatic code generators.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final record
Represents a pointer to / an array of null structure(s) in native memory. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final long
static final StructLayout
static final AddressLayout
static final AddressLayout
static final AddressLayout
static final long
static final long
static final long
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final long
static final long
static final long
-
Constructor Summary
ConstructorsConstructorDescriptionSTBI_IoCallbacks
(@NotNull MemorySegment segment) Creates an instance of aSTBI_IoCallbacks
record class. -
Method Summary
Modifier and TypeMethodDescriptionstatic STBI_IoCallbacks
static STBI_IoCallbacks.Ptr
static STBI_IoCallbacks
clone
(Arena arena, STBI_IoCallbacks src) @NotNull MemorySegment
eof()
eof
(@NotNull STBIFunctionTypes.IPFN_stbi_io_callbacks_eof value) eof
(@NotNull Arena arena, @NotNull STBIFunctionTypes.IPFN_stbi_io_callbacks_eof value) eof
(@NotNull MemorySegment value) final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.@NotNull MemorySegment
read()
read
(@NotNull STBIFunctionTypes.IPFN_stbi_io_callbacks_read value) read
(@NotNull Arena arena, @NotNull STBIFunctionTypes.IPFN_stbi_io_callbacks_read value) read
(@NotNull MemorySegment value) @NotNull MemorySegment
segment()
Returns the value of thesegment
record component.@NotNull MemorySegment
skip()
skip
(@NotNull STBIFunctionTypes.IPFN_stbi_io_callbacks_skip value) skip
(@NotNull Arena arena, @NotNull STBIFunctionTypes.IPFN_stbi_io_callbacks_skip value) skip
(@NotNull MemorySegment value) final String
toString()
Returns a string representation of this record class.
-
Field Details
-
LAYOUT
-
BYTES
public static final long BYTES -
PATH$read
-
PATH$skip
-
PATH$eof
-
LAYOUT$read
-
LAYOUT$skip
-
LAYOUT$eof
-
SIZE$read
public static final long SIZE$read -
SIZE$skip
public static final long SIZE$skip -
SIZE$eof
public static final long SIZE$eof -
OFFSET$read
public static final long OFFSET$read -
OFFSET$skip
public static final long OFFSET$skip -
OFFSET$eof
public static final long OFFSET$eof
-
-
Constructor Details
-
STBI_IoCallbacks
Creates an instance of aSTBI_IoCallbacks
record class.- Parameters:
segment
- the value for thesegment
record component
-
-
Method Details
-
allocate
-
allocate
-
clone
-
read
-
read
public STBI_IoCallbacks read(@Pointer(comment="PFN_stbi_io_callbacks_read") @NotNull @NotNull MemorySegment value) -
read
-
read
public STBI_IoCallbacks read(@NotNull @NotNull Arena arena, @NotNull @NotNull STBIFunctionTypes.IPFN_stbi_io_callbacks_read value) -
read
-
skip
-
skip
public STBI_IoCallbacks skip(@Pointer(comment="PFN_stbi_io_callbacks_skip") @NotNull @NotNull MemorySegment value) -
skip
-
skip
public STBI_IoCallbacks skip(@NotNull @NotNull Arena arena, @NotNull @NotNull STBIFunctionTypes.IPFN_stbi_io_callbacks_skip value) -
skip
-
eof
-
eof
public STBI_IoCallbacks eof(@Pointer(comment="PFN_stbi_io_callbacks_eof") @NotNull @NotNull MemorySegment value) -
eof
-
eof
public STBI_IoCallbacks eof(@NotNull @NotNull Arena arena, @NotNull @NotNull STBIFunctionTypes.IPFN_stbi_io_callbacks_eof value) -
eof
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object)
. -
segment
Returns the value of thesegment
record component.
-