Class mln_json_array
java.lang.Object
org.maplibre.nativeffi.internal.c.mln_json_array
struct mln_json_array {
const mln_json_value *values;
size_t value_count;
}
-
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 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 longvalue_count(MemorySegment struct) Getter for field:size_t value_countstatic voidvalue_count(MemorySegment struct, long fieldValue) Setter for field:size_t value_countstatic final ValueLayout.OfLongLayout for field:size_t value_countstatic final longOffset for field:size_t value_countstatic MemorySegmentvalues(MemorySegment struct) Getter for field:const mln_json_value *valuesstatic voidvalues(MemorySegment struct, MemorySegment fieldValue) Setter for field:const mln_json_value *valuesstatic final AddressLayoutLayout for field:const mln_json_value *valuesstatic final longOffset for field:const mln_json_value *values
-
Method Details
-
layout
The layout of this struct -
values$layout
Layout for field:const mln_json_value *values -
values$offset
public static final long values$offset()Offset for field:const mln_json_value *values -
values
Getter for field:const mln_json_value *values -
values
Setter for field:const mln_json_value *values -
value_count$layout
Layout for field:size_t value_count -
value_count$offset
public static final long value_count$offset()Offset for field:size_t value_count -
value_count
Getter for field:size_t value_count -
value_count
Setter for field:size_t value_count -
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()
-