Class ecs_script_var_t
java.lang.Object
com.github.elebras1.flecs.ecs_script_var_t
struct ecs_script_var_t {
const char *name;
ecs_value_t value;
const ecs_type_info_t *type_info;
int32_t sp;
_Bool is_const;
}
-
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 booleanis_const(MemorySegment struct) Getter for field:_Bool is_conststatic voidis_const(MemorySegment struct, boolean fieldValue) Setter for field:_Bool is_conststatic final ValueLayout.OfBooleanLayout for field:_Bool is_conststatic final longOffset for field:_Bool is_conststatic final GroupLayoutlayout()The layout of this structstatic MemorySegmentname(MemorySegment struct) Getter for field:const char *namestatic voidname(MemorySegment struct, MemorySegment fieldValue) Setter for field:const char *namestatic final AddressLayoutLayout for field:const char *namestatic final longOffset for field:const char *namestatic 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 intsp(MemorySegment struct) Getter for field:int32_t spstatic voidsp(MemorySegment struct, int fieldValue) Setter for field:int32_t spstatic final ValueLayout.OfIntLayout for field:int32_t spstatic final longOffset for field:int32_t spstatic MemorySegmenttype_info(MemorySegment struct) Getter for field:const ecs_type_info_t *type_infostatic voidtype_info(MemorySegment struct, MemorySegment fieldValue) Setter for field:const ecs_type_info_t *type_infostatic final AddressLayoutLayout for field:const ecs_type_info_t *type_infostatic final longOffset for field:const ecs_type_info_t *type_infostatic MemorySegmentvalue(MemorySegment struct) Getter for field:ecs_value_t valuestatic voidvalue(MemorySegment struct, MemorySegment fieldValue) Setter for field:ecs_value_t valuestatic final GroupLayoutLayout for field:ecs_value_t valuestatic final longOffset for field:ecs_value_t value
-
Method Details
-
layout
The layout of this struct -
name$layout
Layout for field:const char *name -
name$offset
public static final long name$offset()Offset for field:const char *name -
name
Getter for field:const char *name -
name
Setter for field:const char *name -
value$layout
Layout for field:ecs_value_t value -
value$offset
public static final long value$offset()Offset for field:ecs_value_t value -
value
Getter for field:ecs_value_t value -
value
Setter for field:ecs_value_t value -
type_info$layout
Layout for field:const ecs_type_info_t *type_info -
type_info$offset
public static final long type_info$offset()Offset for field:const ecs_type_info_t *type_info -
type_info
Getter for field:const ecs_type_info_t *type_info -
type_info
Setter for field:const ecs_type_info_t *type_info -
sp$layout
Layout for field:int32_t sp -
sp$offset
public static final long sp$offset()Offset for field:int32_t sp -
sp
Getter for field:int32_t sp -
sp
Setter for field:int32_t sp -
is_const$layout
Layout for field:_Bool is_const -
is_const$offset
public static final long is_const$offset()Offset for field:_Bool is_const -
is_const
Getter for field:_Bool is_const -
is_const
Setter for field:_Bool is_const -
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()
-