Class ecs_hashmap_t
java.lang.Object
com.github.elebras1.flecs.ecs_hashmap_t
struct {
ecs_hash_value_action_t hash;
ecs_compare_action_t compare;
ecs_size_t key_size;
ecs_size_t value_size;
ecs_map_t impl;
}
-
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 MemorySegmentcompare(MemorySegment struct) Getter for field:ecs_compare_action_t comparestatic voidcompare(MemorySegment struct, MemorySegment fieldValue) Setter for field:ecs_compare_action_t comparestatic final AddressLayoutLayout for field:ecs_compare_action_t comparestatic final longOffset for field:ecs_compare_action_t comparestatic MemorySegmenthash(MemorySegment struct) Getter for field:ecs_hash_value_action_t hashstatic voidhash(MemorySegment struct, MemorySegment fieldValue) Setter for field:ecs_hash_value_action_t hashstatic final AddressLayoutLayout for field:ecs_hash_value_action_t hashstatic final longOffset for field:ecs_hash_value_action_t hashstatic MemorySegmentimpl(MemorySegment struct) Getter for field:ecs_map_t implstatic voidimpl(MemorySegment struct, MemorySegment fieldValue) Setter for field:ecs_map_t implstatic final GroupLayoutLayout for field:ecs_map_t implstatic final longOffset for field:ecs_map_t implstatic intkey_size(MemorySegment struct) Getter for field:ecs_size_t key_sizestatic voidkey_size(MemorySegment struct, int fieldValue) Setter for field:ecs_size_t key_sizestatic final ValueLayout.OfIntLayout for field:ecs_size_t key_sizestatic final longOffset for field:ecs_size_t key_sizestatic 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 structstatic intvalue_size(MemorySegment struct) Getter for field:ecs_size_t value_sizestatic voidvalue_size(MemorySegment struct, int fieldValue) Setter for field:ecs_size_t value_sizestatic final ValueLayout.OfIntLayout for field:ecs_size_t value_sizestatic final longOffset for field:ecs_size_t value_size
-
Method Details
-
layout
The layout of this struct -
hash$layout
Layout for field:ecs_hash_value_action_t hash -
hash$offset
public static final long hash$offset()Offset for field:ecs_hash_value_action_t hash -
hash
Getter for field:ecs_hash_value_action_t hash -
hash
Setter for field:ecs_hash_value_action_t hash -
compare$layout
Layout for field:ecs_compare_action_t compare -
compare$offset
public static final long compare$offset()Offset for field:ecs_compare_action_t compare -
compare
Getter for field:ecs_compare_action_t compare -
compare
Setter for field:ecs_compare_action_t compare -
key_size$layout
Layout for field:ecs_size_t key_size -
key_size$offset
public static final long key_size$offset()Offset for field:ecs_size_t key_size -
key_size
Getter for field:ecs_size_t key_size -
key_size
Setter for field:ecs_size_t key_size -
value_size$layout
Layout for field:ecs_size_t value_size -
value_size$offset
public static final long value_size$offset()Offset for field:ecs_size_t value_size -
value_size
Getter for field:ecs_size_t value_size -
value_size
Setter for field:ecs_size_t value_size -
impl$layout
Layout for field:ecs_map_t impl -
impl$offset
public static final long impl$offset()Offset for field:ecs_map_t impl -
impl
Getter for field:ecs_map_t impl -
impl
Setter for field:ecs_map_t impl -
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()
-