Record Class CLDx9SurfaceInfoKhr

java.lang.Object
java.lang.Record
club.doki7.opencl.datatype.CLDx9SurfaceInfoKhr
All Implemented Interfaces:
IPointer, ICLDx9SurfaceInfoKhr

@ValueBasedCandidate @UnsafeConstructor public record CLDx9SurfaceInfoKhr(@NotNull MemorySegment segment) extends Record implements ICLDx9SurfaceInfoKhr

Represents a pointer to a cl_dx9_surface_info_khr structure in native memory.

Structure

typedef struct cl_dx9_surface_info_khr {
    IDirect3DSurface9* resource;
    HANDLE sharedHandle;
} cl_dx9_surface_info_khr;

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:
  • Field Details

    • LAYOUT

      public static final StructLayout LAYOUT
    • BYTES

      public static final long BYTES
    • PATH$resource

      public static final MemoryLayout.PathElement PATH$resource
    • PATH$sharedHandle

      public static final MemoryLayout.PathElement PATH$sharedHandle
    • LAYOUT$resource

      public static final AddressLayout LAYOUT$resource
    • LAYOUT$sharedHandle

      public static final AddressLayout LAYOUT$sharedHandle
    • SIZE$resource

      public static final long SIZE$resource
    • SIZE$sharedHandle

      public static final long SIZE$sharedHandle
    • OFFSET$resource

      public static final long OFFSET$resource
    • OFFSET$sharedHandle

      public static final long OFFSET$sharedHandle
  • Constructor Details

    • CLDx9SurfaceInfoKhr

      public CLDx9SurfaceInfoKhr(@NotNull @NotNull MemorySegment segment)
      Creates an instance of a CLDx9SurfaceInfoKhr record class.
      Parameters:
      segment - the value for the segment record component
  • Method Details

    • allocate

      public static CLDx9SurfaceInfoKhr allocate(Arena arena)
    • allocate

      public static CLDx9SurfaceInfoKhr.Ptr allocate(Arena arena, long count)
    • clone

      public static CLDx9SurfaceInfoKhr clone(Arena arena, CLDx9SurfaceInfoKhr src)
    • resource

      @Nullable public @Nullable PointerPtr resource()
      Note: the returned PointerPtr does not have correct PointerPtr.size() property. It's up to user to track the size of the buffer, and use PointerPtr.reinterpret(long) to set the size before actually reading from or writing to the buffer.
    • resource

      public CLDx9SurfaceInfoKhr resource(@Nullable @Nullable PointerPtr value)
    • resourceRaw

      @Pointer(comment="IDirect3DSurface9*") @NotNull public @NotNull MemorySegment resourceRaw()
    • resourceRaw

      public void resourceRaw(@Pointer(comment="IDirect3DSurface9*") @NotNull @NotNull MemorySegment value)
    • sharedHandle

      @Pointer(comment="HANDLE") @NotNull public @NotNull MemorySegment sharedHandle()
    • sharedHandle

      public CLDx9SurfaceInfoKhr sharedHandle(@Pointer(comment="HANDLE") @NotNull @NotNull MemorySegment value)
    • sharedHandle

      public CLDx9SurfaceInfoKhr sharedHandle(@Nullable @Nullable IPointer pointer)
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • segment

      @NotNull public @NotNull MemorySegment segment()
      Returns the value of the segment record component.
      Specified by:
      segment in interface IPointer
      Returns:
      the value of the segment record component