Class mln_json_value
java.lang.Object
org.maplibre.nativeffi.internal.c.mln_json_value
struct mln_json_value {
uint32_t size;
uint32_t type;
union {
bool bool_value;
uint64_t uint_value;
int64_t int_value;
double double_value;
mln_string_view string_value;
mln_json_array array_value;
mln_json_object object_value;
} data;
}
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classunion { bool bool_value; uint64_t uint_value; int64_t int_value; double double_value; mln_string_view string_value; mln_json_array array_value; mln_json_object object_value; } -
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 MemorySegmentdata(MemorySegment struct) Getter for field:union { bool bool_value; uint64_t uint_value; int64_t int_value; double double_value; mln_string_view string_value; mln_json_array array_value; mln_json_object object_value; } datastatic voiddata(MemorySegment struct, MemorySegment fieldValue) Setter for field:union { bool bool_value; uint64_t uint_value; int64_t int_value; double double_value; mln_string_view string_value; mln_json_array array_value; mln_json_object object_value; } datastatic final GroupLayoutLayout for field:union { bool bool_value; uint64_t uint_value; int64_t int_value; double double_value; mln_string_view string_value; mln_json_array array_value; mln_json_object object_value; } datastatic final longOffset for field:union { bool bool_value; uint64_t uint_value; int64_t int_value; double double_value; mln_string_view string_value; mln_json_array array_value; mln_json_object object_value; } datastatic 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 intsize(MemorySegment struct) Getter for field:uint32_t sizestatic voidsize(MemorySegment struct, int fieldValue) Setter for field:uint32_t sizestatic final ValueLayout.OfIntLayout for field:uint32_t sizestatic final longOffset for field:uint32_t sizestatic longsizeof()The size (in bytes) of this structstatic inttype(MemorySegment struct) Getter for field:uint32_t typestatic voidtype(MemorySegment struct, int fieldValue) Setter for field:uint32_t typestatic final ValueLayout.OfIntLayout for field:uint32_t typestatic final longOffset for field:uint32_t type
-
Method Details
-
layout
The layout of this struct -
size$layout
Layout for field:uint32_t size -
size$offset
public static final long size$offset()Offset for field:uint32_t size -
size
Getter for field:uint32_t size -
size
Setter for field:uint32_t size -
type$layout
Layout for field:uint32_t type -
type$offset
public static final long type$offset()Offset for field:uint32_t type -
type
Getter for field:uint32_t type -
type
Setter for field:uint32_t type -
data$layout
Layout for field:union { bool bool_value; uint64_t uint_value; int64_t int_value; double double_value; mln_string_view string_value; mln_json_array array_value; mln_json_object object_value; } data -
data$offset
public static final long data$offset()Offset for field:union { bool bool_value; uint64_t uint_value; int64_t int_value; double double_value; mln_string_view string_value; mln_json_array array_value; mln_json_object object_value; } data -
data
Getter for field:union { bool bool_value; uint64_t uint_value; int64_t int_value; double double_value; mln_string_view string_value; mln_json_array array_value; mln_json_object object_value; } data -
data
Setter for field:union { bool bool_value; uint64_t uint_value; int64_t int_value; double double_value; mln_string_view string_value; mln_json_array array_value; mln_json_object object_value; } data -
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()
-