Class ecs_header_t
java.lang.Object
com.github.elebras1.flecs.ecs_header_t
struct ecs_header_t {
int32_t type;
int32_t refcount;
ecs_mixins_t *mixins;
}
-
Method Summary
Modifier and TypeMethodDescriptionstatic MemorySegmentallocate(SegmentAllocator allocator) Allocate a segment of sizelayout().byteSize()usingallocatorstatic MemorySegmentallocateArray(long elementCount, SegmentAllocator allocator) Allocate an array of sizeelementCountusingallocator.static MemorySegmentasSlice(MemorySegment array, long index) Obtains a slice ofarrayParamwhich selects the array element atindex.static final GroupLayoutlayout()The layout of this structstatic MemorySegmentmixins(MemorySegment struct) Getter for field:ecs_mixins_t *mixinsstatic voidmixins(MemorySegment struct, MemorySegment fieldValue) Setter for field:ecs_mixins_t *mixinsstatic final AddressLayoutLayout for field:ecs_mixins_t *mixinsstatic final longOffset for field:ecs_mixins_t *mixinsstatic intrefcount(MemorySegment struct) Getter for field:int32_t refcountstatic voidrefcount(MemorySegment struct, int fieldValue) Setter for field:int32_t refcountstatic final ValueLayout.OfIntLayout for field:int32_t refcountstatic final longOffset for field:int32_t refcountstatic MemorySegmentreinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer<MemorySegment> cleanup) Reinterpretsaddrusing targetarenaandcleanupAction(if any).static MemorySegmentreinterpret(MemorySegment addr, Arena arena, Consumer<MemorySegment> cleanup) Reinterpretsaddrusing targetarenaandcleanupAction(if any).static longsizeof()The size (in bytes) of this structstatic inttype(MemorySegment struct) Getter for field:int32_t typestatic voidtype(MemorySegment struct, int fieldValue) Setter for field:int32_t typestatic final ValueLayout.OfIntLayout for field:int32_t typestatic final longOffset for field:int32_t type
-
Method Details
-
layout
The layout of this struct -
type$layout
Layout for field:int32_t type -
type$offset
public static final long type$offset()Offset for field:int32_t type -
type
Getter for field:int32_t type -
type
Setter for field:int32_t type -
refcount$layout
Layout for field:int32_t refcount -
refcount$offset
public static final long refcount$offset()Offset for field:int32_t refcount -
refcount
Getter for field:int32_t refcount -
refcount
Setter for field:int32_t refcount -
mixins$layout
Layout for field:ecs_mixins_t *mixins -
mixins$offset
public static final long mixins$offset()Offset for field:ecs_mixins_t *mixins -
mixins
Getter for field:ecs_mixins_t *mixins -
mixins
Setter for field:ecs_mixins_t *mixins -
asSlice
Obtains a slice ofarrayParamwhich selects the array element atindex. The returned segment has addressarrayParam.address() + index * layout().byteSize() -
sizeof
public static long sizeof()The size (in bytes) of this struct -
allocate
Allocate a segment of sizelayout().byteSize()usingallocator -
allocateArray
Allocate an array of sizeelementCountusingallocator. The returned segment has sizeelementCount * layout().byteSize(). -
reinterpret
public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer<MemorySegment> cleanup) Reinterpretsaddrusing targetarenaandcleanupAction(if any). The returned segment has sizelayout().byteSize() -
reinterpret
public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer<MemorySegment> cleanup) Reinterpretsaddrusing targetarenaandcleanupAction(if any). The returned segment has sizeelementCount * layout().byteSize()
-