Class EcsRest
java.lang.Object
com.github.elebras1.flecs.EcsRest
struct {
uint16_t port;
char *ipaddr;
ecs_rest_ctx_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 MemorySegmentimpl(MemorySegment struct) Getter for field:ecs_rest_ctx_t *implstatic voidimpl(MemorySegment struct, MemorySegment fieldValue) Setter for field:ecs_rest_ctx_t *implstatic final AddressLayoutLayout for field:ecs_rest_ctx_t *implstatic final longOffset for field:ecs_rest_ctx_t *implstatic MemorySegmentipaddr(MemorySegment struct) Getter for field:char *ipaddrstatic voidipaddr(MemorySegment struct, MemorySegment fieldValue) Setter for field:char *ipaddrstatic final AddressLayoutLayout for field:char *ipaddrstatic final longOffset for field:char *ipaddrstatic 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 struct
-
Method Details
-
layout
The layout of this struct -
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 -
ipaddr$layout
Layout for field:char *ipaddr -
ipaddr$offset
public static final long ipaddr$offset()Offset for field:char *ipaddr -
ipaddr
Getter for field:char *ipaddr -
ipaddr
Setter for field:char *ipaddr -
impl$layout
Layout for field:ecs_rest_ctx_t *impl -
impl$offset
public static final long impl$offset()Offset for field:ecs_rest_ctx_t *impl -
impl
Getter for field:ecs_rest_ctx_t *impl -
impl
Setter for field:ecs_rest_ctx_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()
-