Class EcsIdentifier
java.lang.Object
com.github.elebras1.flecs.EcsIdentifier
struct EcsIdentifier {
char *value;
ecs_size_t length;
uint64_t hash;
uint64_t index_hash;
ecs_hashmap_t *index;
}
-
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 longhash(MemorySegment struct) Getter for field:uint64_t hashstatic voidhash(MemorySegment struct, long fieldValue) Setter for field:uint64_t hashstatic final ValueLayout.OfLongLayout for field:uint64_t hashstatic final longOffset for field:uint64_t hashstatic MemorySegmentindex(MemorySegment struct) Getter for field:ecs_hashmap_t *indexstatic voidindex(MemorySegment struct, MemorySegment fieldValue) Setter for field:ecs_hashmap_t *indexstatic longindex_hash(MemorySegment struct) Getter for field:uint64_t index_hashstatic voidindex_hash(MemorySegment struct, long fieldValue) Setter for field:uint64_t index_hashstatic final ValueLayout.OfLongLayout for field:uint64_t index_hashstatic final longOffset for field:uint64_t index_hashstatic final AddressLayoutLayout for field:ecs_hashmap_t *indexstatic final longOffset for field:ecs_hashmap_t *indexstatic final GroupLayoutlayout()The layout of this structstatic intlength(MemorySegment struct) Getter for field:ecs_size_t lengthstatic voidlength(MemorySegment struct, int fieldValue) Setter for field:ecs_size_t lengthstatic final ValueLayout.OfIntLayout for field:ecs_size_t lengthstatic final longOffset for field:ecs_size_t lengthstatic 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 MemorySegmentvalue(MemorySegment struct) Getter for field:char *valuestatic voidvalue(MemorySegment struct, MemorySegment fieldValue) Setter for field:char *valuestatic final AddressLayoutLayout for field:char *valuestatic final longOffset for field:char *value
-
Method Details
-
layout
The layout of this struct -
value$layout
Layout for field:char *value -
value$offset
public static final long value$offset()Offset for field:char *value -
value
Getter for field:char *value -
value
Setter for field:char *value -
length$layout
Layout for field:ecs_size_t length -
length$offset
public static final long length$offset()Offset for field:ecs_size_t length -
length
Getter for field:ecs_size_t length -
length
Setter for field:ecs_size_t length -
hash$layout
Layout for field:uint64_t hash -
hash$offset
public static final long hash$offset()Offset for field:uint64_t hash -
hash
Getter for field:uint64_t hash -
hash
Setter for field:uint64_t hash -
index_hash$layout
Layout for field:uint64_t index_hash -
index_hash$offset
public static final long index_hash$offset()Offset for field:uint64_t index_hash -
index_hash
Getter for field:uint64_t index_hash -
index_hash
Setter for field:uint64_t index_hash -
index$layout
Layout for field:ecs_hashmap_t *index -
index$offset
public static final long index$offset()Offset for field:ecs_hashmap_t *index -
index
Getter for field:ecs_hashmap_t *index -
index
Setter for field:ecs_hashmap_t *index -
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()
-