Class ecs_app_desc_t
java.lang.Object
com.github.elebras1.flecs.ecs_app_desc_t
struct ecs_app_desc_t {
float target_fps;
float delta_time;
int32_t threads;
int32_t frames;
_Bool enable_rest;
_Bool enable_stats;
uint16_t port;
ecs_app_init_action_t init;
void *ctx;
}
-
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 MemorySegmentctx(MemorySegment struct) Getter for field:void *ctxstatic voidctx(MemorySegment struct, MemorySegment fieldValue) Setter for field:void *ctxstatic final AddressLayoutLayout for field:void *ctxstatic final longOffset for field:void *ctxstatic floatdelta_time(MemorySegment struct) Getter for field:float delta_timestatic voiddelta_time(MemorySegment struct, float fieldValue) Setter for field:float delta_timestatic final ValueLayout.OfFloatLayout for field:float delta_timestatic final longOffset for field:float delta_timestatic booleanenable_rest(MemorySegment struct) Getter for field:_Bool enable_reststatic voidenable_rest(MemorySegment struct, boolean fieldValue) Setter for field:_Bool enable_reststatic final ValueLayout.OfBooleanLayout for field:_Bool enable_reststatic final longOffset for field:_Bool enable_reststatic booleanenable_stats(MemorySegment struct) Getter for field:_Bool enable_statsstatic voidenable_stats(MemorySegment struct, boolean fieldValue) Setter for field:_Bool enable_statsstatic final ValueLayout.OfBooleanLayout for field:_Bool enable_statsstatic final longOffset for field:_Bool enable_statsstatic intframes(MemorySegment struct) Getter for field:int32_t framesstatic voidframes(MemorySegment struct, int fieldValue) Setter for field:int32_t framesstatic final ValueLayout.OfIntLayout for field:int32_t framesstatic final longOffset for field:int32_t framesstatic MemorySegmentinit(MemorySegment struct) Getter for field:ecs_app_init_action_t initstatic voidinit(MemorySegment struct, MemorySegment fieldValue) Setter for field:ecs_app_init_action_t initstatic final AddressLayoutLayout for field:ecs_app_init_action_t initstatic final longOffset for field:ecs_app_init_action_t initstatic final GroupLayoutlayout()The layout of this structstatic shortport(MemorySegment struct) Getter for field:uint16_t portstatic voidport(MemorySegment struct, short fieldValue) Setter for field:uint16_t portstatic final ValueLayout.OfShortLayout for field:uint16_t portstatic final longOffset for field:uint16_t portstatic 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 floattarget_fps(MemorySegment struct) Getter for field:float target_fpsstatic voidtarget_fps(MemorySegment struct, float fieldValue) Setter for field:float target_fpsstatic final ValueLayout.OfFloatLayout for field:float target_fpsstatic final longOffset for field:float target_fpsstatic intthreads(MemorySegment struct) Getter for field:int32_t threadsstatic voidthreads(MemorySegment struct, int fieldValue) Setter for field:int32_t threadsstatic final ValueLayout.OfIntLayout for field:int32_t threadsstatic final longOffset for field:int32_t threads
-
Method Details
-
layout
The layout of this struct -
target_fps$layout
Layout for field:float target_fps -
target_fps$offset
public static final long target_fps$offset()Offset for field:float target_fps -
target_fps
Getter for field:float target_fps -
target_fps
Setter for field:float target_fps -
delta_time$layout
Layout for field:float delta_time -
delta_time$offset
public static final long delta_time$offset()Offset for field:float delta_time -
delta_time
Getter for field:float delta_time -
delta_time
Setter for field:float delta_time -
threads$layout
Layout for field:int32_t threads -
threads$offset
public static final long threads$offset()Offset for field:int32_t threads -
threads
Getter for field:int32_t threads -
threads
Setter for field:int32_t threads -
frames$layout
Layout for field:int32_t frames -
frames$offset
public static final long frames$offset()Offset for field:int32_t frames -
frames
Getter for field:int32_t frames -
frames
Setter for field:int32_t frames -
enable_rest$layout
Layout for field:_Bool enable_rest -
enable_rest$offset
public static final long enable_rest$offset()Offset for field:_Bool enable_rest -
enable_rest
Getter for field:_Bool enable_rest -
enable_rest
Setter for field:_Bool enable_rest -
enable_stats$layout
Layout for field:_Bool enable_stats -
enable_stats$offset
public static final long enable_stats$offset()Offset for field:_Bool enable_stats -
enable_stats
Getter for field:_Bool enable_stats -
enable_stats
Setter for field:_Bool enable_stats -
port$layout
Layout for field:uint16_t port -
port$offset
public static final long port$offset()Offset for field:uint16_t port -
port
Getter for field:uint16_t port -
port
Setter for field:uint16_t port -
init$layout
Layout for field:ecs_app_init_action_t init -
init$offset
public static final long init$offset()Offset for field:ecs_app_init_action_t init -
init
Getter for field:ecs_app_init_action_t init -
init
Setter for field:ecs_app_init_action_t init -
ctx$layout
Layout for field:void *ctx -
ctx$offset
public static final long ctx$offset()Offset for field:void *ctx -
ctx
Getter for field:void *ctx -
ctx
Setter for field:void *ctx -
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()
-