Class ecs_map_t
java.lang.Object
com.github.elebras1.flecs.ecs_map_t
struct ecs_map_t {
ecs_bucket_t *buckets;
int32_t bucket_count;
unsigned int count : 26;
unsigned int bucket_shift : 6;
struct ecs_allocator_t *allocator;
}
-
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 MemorySegmentallocator(MemorySegment struct) Getter for field:struct ecs_allocator_t *allocatorstatic voidallocator(MemorySegment struct, MemorySegment fieldValue) Setter for field:struct ecs_allocator_t *allocatorstatic final AddressLayoutLayout for field:struct ecs_allocator_t *allocatorstatic final longOffset for field:struct ecs_allocator_t *allocatorstatic MemorySegmentasSlice(MemorySegment array, long index) Obtains a slice ofarrayParamwhich selects the array element atindex.static intbucket_count(MemorySegment struct) Getter for field:int32_t bucket_countstatic voidbucket_count(MemorySegment struct, int fieldValue) Setter for field:int32_t bucket_countstatic final ValueLayout.OfIntLayout for field:int32_t bucket_countstatic final longOffset for field:int32_t bucket_countstatic MemorySegmentbuckets(MemorySegment struct) Getter for field:ecs_bucket_t *bucketsstatic voidbuckets(MemorySegment struct, MemorySegment fieldValue) Setter for field:ecs_bucket_t *bucketsstatic final AddressLayoutLayout for field:ecs_bucket_t *bucketsstatic final longOffset for field:ecs_bucket_t *bucketsstatic 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 longsizeof()The size (in bytes) of this struct
-
Method Details
-
layout
The layout of this struct -
buckets$layout
Layout for field:ecs_bucket_t *buckets -
buckets$offset
public static final long buckets$offset()Offset for field:ecs_bucket_t *buckets -
buckets
Getter for field:ecs_bucket_t *buckets -
buckets
Setter for field:ecs_bucket_t *buckets -
bucket_count$layout
Layout for field:int32_t bucket_count -
bucket_count$offset
public static final long bucket_count$offset()Offset for field:int32_t bucket_count -
bucket_count
Getter for field:int32_t bucket_count -
bucket_count
Setter for field:int32_t bucket_count -
allocator$layout
Layout for field:struct ecs_allocator_t *allocator -
allocator$offset
public static final long allocator$offset()Offset for field:struct ecs_allocator_t *allocator -
allocator
Getter for field:struct ecs_allocator_t *allocator -
allocator
Setter for field:struct ecs_allocator_t *allocator -
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()
-