Class ecs_vec_t
java.lang.Object
com.github.elebras1.flecs.ecs_vec_t
struct ecs_vec_t {
void *array;
int32_t count;
int32_t size;
}
-
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 MemorySegmentarray(MemorySegment struct) Getter for field:void *arraystatic voidarray(MemorySegment struct, MemorySegment fieldValue) Setter for field:void *arraystatic final AddressLayoutLayout for field:void *arraystatic final longOffset for field:void *arraystatic MemorySegmentasSlice(MemorySegment array, long index) Obtains a slice ofarrayParamwhich selects the array element atindex.static intcount(MemorySegment struct) Getter for field:int32_t countstatic voidcount(MemorySegment struct, int fieldValue) Setter for field:int32_t countstatic final ValueLayout.OfIntLayout for field:int32_t countstatic final longOffset for field:int32_t countstatic final GroupLayoutlayout()The layout of this structstatic 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 intsize(MemorySegment struct) Getter for field:int32_t sizestatic voidsize(MemorySegment struct, int fieldValue) Setter for field:int32_t sizestatic final ValueLayout.OfIntLayout for field:int32_t sizestatic final longOffset for field:int32_t sizestatic longsizeof()The size (in bytes) of this struct
-
Method Details
-
layout
The layout of this struct -
array$layout
Layout for field:void *array -
array$offset
public static final long array$offset()Offset for field:void *array -
array
Getter for field:void *array -
array
Setter for field:void *array -
count$layout
Layout for field:int32_t count -
count$offset
public static final long count$offset()Offset for field:int32_t count -
count
Getter for field:int32_t count -
count
Setter for field:int32_t count -
size$layout
Layout for field:int32_t size -
size$offset
public static final long size$offset()Offset for field:int32_t size -
size
Getter for field:int32_t size -
size
Setter for field:int32_t size -
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()
-