Class EcsType
java.lang.Object
com.github.elebras1.flecs.EcsType
struct EcsType {
ecs_type_kind_t kind;
_Bool existing;
_Bool partial;
}
-
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 booleanexisting(MemorySegment struct) Getter for field:_Bool existingstatic voidexisting(MemorySegment struct, boolean fieldValue) Setter for field:_Bool existingstatic final ValueLayout.OfBooleanLayout for field:_Bool existingstatic final longOffset for field:_Bool existingstatic intkind(MemorySegment struct) Getter for field:ecs_type_kind_t kindstatic voidkind(MemorySegment struct, int fieldValue) Setter for field:ecs_type_kind_t kindstatic final ValueLayout.OfIntLayout for field:ecs_type_kind_t kindstatic final longOffset for field:ecs_type_kind_t kindstatic final GroupLayoutlayout()The layout of this structstatic booleanpartial(MemorySegment struct) Getter for field:_Bool partialstatic voidpartial(MemorySegment struct, boolean fieldValue) Setter for field:_Bool partialstatic final ValueLayout.OfBooleanLayout for field:_Bool partialstatic final longOffset for field:_Bool partialstatic 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 struct
-
Method Details
-
layout
The layout of this struct -
kind$layout
Layout for field:ecs_type_kind_t kind -
kind$offset
public static final long kind$offset()Offset for field:ecs_type_kind_t kind -
kind
Getter for field:ecs_type_kind_t kind -
kind
Setter for field:ecs_type_kind_t kind -
existing$layout
Layout for field:_Bool existing -
existing$offset
public static final long existing$offset()Offset for field:_Bool existing -
existing
Getter for field:_Bool existing -
existing
Setter for field:_Bool existing -
partial$layout
Layout for field:_Bool partial -
partial$offset
public static final long partial$offset()Offset for field:_Bool partial -
partial
Getter for field:_Bool partial -
partial
Setter for field:_Bool partial -
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()
-