Record Class VkAllocationCallbacks
java.lang.Object
java.lang.Record
club.doki7.vulkan.datatype.VkAllocationCallbacks
- All Implemented Interfaces:
IPointer
,IVkAllocationCallbacks
@ValueBasedCandidate
@UnsafeConstructor
public record VkAllocationCallbacks(@NotNull MemorySegment segment)
extends Record
implements IVkAllocationCallbacks
Represents a pointer to a VkAllocationCallbacks
structure in native memory.
Structure
typedef struct VkAllocationCallbacks {
void* pUserData
; // optional
PFN_vkAllocationFunction pfnAllocation
;
PFN_vkReallocationFunction pfnReallocation
;
PFN_vkFreeFunction pfnFree
;
PFN_vkInternalAllocationNotification pfnInternalAllocation
; // optional
PFN_vkInternalFreeNotification pfnInternalFree
; // optional
} VkAllocationCallbacks;
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.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final record
Represents a pointer to / an array ofVkAllocationCallbacks
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 AddressLayout
static final AddressLayout
static final AddressLayout
static final long
static final long
static final long
static final long
static final long
static final long
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final long
static final long
static final long
static final long
static final long
static final long
-
Constructor Summary
ConstructorsConstructorDescriptionVkAllocationCallbacks
(@NotNull MemorySegment segment) Creates an instance of aVkAllocationCallbacks
record class. -
Method Summary
Modifier and TypeMethodDescriptionstatic VkAllocationCallbacks
static VkAllocationCallbacks.Ptr
static VkAllocationCallbacks
clone
(Arena arena, VkAllocationCallbacks src) final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.pfnAllocation
(@Nullable IPointer pointer) void
pfnAllocation
(MemorySegment value) pfnFree()
void
pfnFree
(MemorySegment value) pfnInternalAllocation
(@Nullable IPointer pointer) void
pfnInternalFree
(@Nullable IPointer pointer) void
pfnInternalFree
(MemorySegment value) pfnReallocation
(@Nullable IPointer pointer) void
pfnReallocation
(MemorySegment value) void
pUserData
(MemorySegment value) @NotNull MemorySegment
segment()
Returns the value of thesegment
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
LAYOUT
-
BYTES
public static final long BYTES -
PATH$pUserData
-
PATH$pfnAllocation
-
PATH$pfnReallocation
-
PATH$pfnFree
-
PATH$pfnInternalAllocation
-
PATH$pfnInternalFree
-
LAYOUT$pUserData
-
LAYOUT$pfnAllocation
-
LAYOUT$pfnReallocation
-
LAYOUT$pfnFree
-
LAYOUT$pfnInternalAllocation
-
LAYOUT$pfnInternalFree
-
SIZE$pUserData
public static final long SIZE$pUserData -
SIZE$pfnAllocation
public static final long SIZE$pfnAllocation -
SIZE$pfnReallocation
public static final long SIZE$pfnReallocation -
SIZE$pfnFree
public static final long SIZE$pfnFree -
SIZE$pfnInternalAllocation
public static final long SIZE$pfnInternalAllocation -
SIZE$pfnInternalFree
public static final long SIZE$pfnInternalFree -
OFFSET$pUserData
public static final long OFFSET$pUserData -
OFFSET$pfnAllocation
public static final long OFFSET$pfnAllocation -
OFFSET$pfnReallocation
public static final long OFFSET$pfnReallocation -
OFFSET$pfnFree
public static final long OFFSET$pfnFree -
OFFSET$pfnInternalAllocation
public static final long OFFSET$pfnInternalAllocation -
OFFSET$pfnInternalFree
public static final long OFFSET$pfnInternalFree
-
-
Constructor Details
-
VkAllocationCallbacks
Creates an instance of aVkAllocationCallbacks
record class.- Parameters:
segment
- the value for thesegment
record component
-
-
Method Details
-
allocate
-
allocate
-
clone
-
pUserData
-
pUserData
-
pUserData
-
pfnAllocation
-
pfnAllocation
-
pfnAllocation
-
pfnReallocation
-
pfnReallocation
-
pfnReallocation
-
pfnFree
-
pfnFree
-
pfnFree
-
pfnInternalAllocation
@Pointer(comment="PFN_vkInternalAllocationNotification") public MemorySegment pfnInternalAllocation() -
pfnInternalAllocation
public void pfnInternalAllocation(@Pointer(comment="PFN_vkInternalAllocationNotification") MemorySegment value) -
pfnInternalAllocation
-
pfnInternalFree
-
pfnInternalFree
-
pfnInternalFree
-
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.
-