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.@NotNull MemorySegment
pfnAllocation
(@Nullable IPointer pointer) pfnAllocation
(@NotNull VkFunctionTypes.IPFN_vkAllocationFunction value) pfnAllocation
(@NotNull Arena arena, @NotNull VkFunctionTypes.IPFN_vkAllocationFunction value) pfnAllocation
(@NotNull MemorySegment value) @NotNull MemorySegment
pfnFree()
pfnFree
(@NotNull VkFunctionTypes.IPFN_vkFreeFunction value) pfnFree
(@NotNull Arena arena, @NotNull VkFunctionTypes.IPFN_vkFreeFunction value) pfnFree
(@NotNull MemorySegment value) @NotNull MemorySegment
pfnInternalAllocation
(@Nullable IPointer pointer) pfnInternalAllocation
(@NotNull Arena arena, @NotNull VkFunctionTypes.IPFN_vkInternalAllocationNotification value) pfnInternalAllocation
(@NotNull MemorySegment value) @NotNull MemorySegment
pfnInternalFree
(@Nullable IPointer pointer) pfnInternalFree
(@NotNull VkFunctionTypes.IPFN_vkInternalFreeNotification value) pfnInternalFree
(@NotNull Arena arena, @NotNull VkFunctionTypes.IPFN_vkInternalFreeNotification value) pfnInternalFree
(@NotNull MemorySegment value) @NotNull MemorySegment
pfnReallocation
(@Nullable IPointer pointer) pfnReallocation
(@NotNull VkFunctionTypes.IPFN_vkReallocationFunction value) pfnReallocation
(@NotNull Arena arena, @NotNull VkFunctionTypes.IPFN_vkReallocationFunction value) pfnReallocation
(@NotNull MemorySegment value) @NotNull MemorySegment
pUserData
(@NotNull 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
public VkAllocationCallbacks pUserData(@Pointer(comment="void*") @NotNull @NotNull MemorySegment value) -
pUserData
-
pfnAllocation
-
pfnAllocation
public VkAllocationCallbacks pfnAllocation(@Pointer(comment="PFN_vkAllocationFunction") @NotNull @NotNull MemorySegment value) -
pfnAllocation
public VkAllocationCallbacks pfnAllocation(@NotNull @NotNull VkFunctionTypes.IPFN_vkAllocationFunction value) -
pfnAllocation
public VkAllocationCallbacks pfnAllocation(@NotNull @NotNull Arena arena, @NotNull @NotNull VkFunctionTypes.IPFN_vkAllocationFunction value) -
pfnAllocation
-
pfnReallocation
@Pointer(comment="PFN_vkReallocationFunction") @NotNull public @NotNull MemorySegment pfnReallocation() -
pfnReallocation
public VkAllocationCallbacks pfnReallocation(@Pointer(comment="PFN_vkReallocationFunction") @NotNull @NotNull MemorySegment value) -
pfnReallocation
public VkAllocationCallbacks pfnReallocation(@NotNull @NotNull VkFunctionTypes.IPFN_vkReallocationFunction value) -
pfnReallocation
public VkAllocationCallbacks pfnReallocation(@NotNull @NotNull Arena arena, @NotNull @NotNull VkFunctionTypes.IPFN_vkReallocationFunction value) -
pfnReallocation
-
pfnFree
-
pfnFree
public VkAllocationCallbacks pfnFree(@Pointer(comment="PFN_vkFreeFunction") @NotNull @NotNull MemorySegment value) -
pfnFree
-
pfnFree
public VkAllocationCallbacks pfnFree(@NotNull @NotNull Arena arena, @NotNull @NotNull VkFunctionTypes.IPFN_vkFreeFunction value) -
pfnFree
-
pfnInternalAllocation
@Pointer(comment="PFN_vkInternalAllocationNotification") @NotNull public @NotNull MemorySegment pfnInternalAllocation() -
pfnInternalAllocation
public VkAllocationCallbacks pfnInternalAllocation(@Pointer(comment="PFN_vkInternalAllocationNotification") @NotNull @NotNull MemorySegment value) -
pfnInternalAllocation
public VkAllocationCallbacks pfnInternalAllocation(@NotNull @NotNull VkFunctionTypes.IPFN_vkInternalAllocationNotification value) -
pfnInternalAllocation
public VkAllocationCallbacks pfnInternalAllocation(@NotNull @NotNull Arena arena, @NotNull @NotNull VkFunctionTypes.IPFN_vkInternalAllocationNotification value) -
pfnInternalAllocation
-
pfnInternalFree
@Pointer(comment="PFN_vkInternalFreeNotification") @NotNull public @NotNull MemorySegment pfnInternalFree() -
pfnInternalFree
public VkAllocationCallbacks pfnInternalFree(@Pointer(comment="PFN_vkInternalFreeNotification") @NotNull @NotNull MemorySegment value) -
pfnInternalFree
public VkAllocationCallbacks pfnInternalFree(@NotNull @NotNull VkFunctionTypes.IPFN_vkInternalFreeNotification value) -
pfnInternalFree
public VkAllocationCallbacks pfnInternalFree(@NotNull @NotNull Arena arena, @NotNull @NotNull VkFunctionTypes.IPFN_vkInternalFreeNotification value) -
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.
-