Record Class STB_VorbisComment
java.lang.Object
java.lang.Record
club.doki7.stb.vorbis.datatype.STB_VorbisComment
- All Implemented Interfaces:
IPointer,ISTB_VorbisComment
@ValueBasedCandidate
@UnsafeConstructor
public record STB_VorbisComment(@NotNull MemorySegment segment)
extends Record
implements ISTB_VorbisComment
Represents a pointer to a stb_vorbis_comment structure in native memory.
Structure
typedef struct stb_vorbis_comment {
char* vendor;
int commentListLength;
char** commentList;
} stb_vorbis_comment;
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 recordRepresents a pointer to / an array of null structure(s) in native memory. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longstatic final StructLayoutstatic final AddressLayoutstatic final ValueLayout.OfIntstatic final AddressLayoutstatic final longstatic final longstatic final longstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final longstatic final longstatic final long -
Constructor Summary
ConstructorsConstructorDescriptionSTB_VorbisComment(@NotNull MemorySegment segment) Creates an instance of aSTB_VorbisCommentrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic STB_VorbisCommentstatic STB_VorbisComment.Ptrstatic STB_VorbisCommentclone(Arena arena, STB_VorbisComment src) @Nullable PointerPtrNote: the returnedPointerPtrdoes not have correctPointerPtr.size()property.commentList(@Nullable PointerPtr value) intcommentListLength(int value) @NotNull MemorySegmentvoidcommentListRaw(@NotNull MemorySegment value) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NotNull MemorySegmentsegment()Returns the value of thesegmentrecord component.final StringtoString()Returns a string representation of this record class.@Nullable BytePtrvendor()Note: the returnedBytePtrdoes not have correctBytePtr.size()property.@NotNull MemorySegmentvoidvendorRaw(@NotNull MemorySegment value)
-
Field Details
-
LAYOUT
-
BYTES
public static final long BYTES -
PATH$vendor
-
PATH$commentListLength
-
PATH$commentList
-
LAYOUT$vendor
-
LAYOUT$commentListLength
-
LAYOUT$commentList
-
SIZE$vendor
public static final long SIZE$vendor -
SIZE$commentListLength
public static final long SIZE$commentListLength -
SIZE$commentList
public static final long SIZE$commentList -
OFFSET$vendor
public static final long OFFSET$vendor -
OFFSET$commentListLength
public static final long OFFSET$commentListLength -
OFFSET$commentList
public static final long OFFSET$commentList
-
-
Constructor Details
-
STB_VorbisComment
Creates an instance of aSTB_VorbisCommentrecord class.- Parameters:
segment- the value for thesegmentrecord component
-
-
Method Details
-
allocate
-
allocate
-
clone
-
vendor
Note: the returnedBytePtrdoes not have correctBytePtr.size()property. It's up to user to track the size of the buffer, and useBytePtr.reinterpret(long)to set the size before actually reading from or writing to the buffer. -
vendor
-
vendorRaw
-
vendorRaw
-
commentListLength
public int commentListLength() -
commentListLength
-
commentList
Note: the returnedPointerPtrdoes not have correctPointerPtr.size()property. It's up to user to track the size of the buffer, and usePointerPtr.reinterpret(long)to set the size before actually reading from or writing to the buffer. -
commentList
-
commentListRaw
-
commentListRaw
-
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 thesegmentrecord component.
-