Class mln_json_value.data
java.lang.Object
org.maplibre.nativeffi.internal.c.mln_json_value.data
- Enclosing class:
mln_json_value
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;
}
-
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 MemorySegmentarray_value(MemorySegment union) Getter for field:mln_json_array array_valuestatic voidarray_value(MemorySegment union, MemorySegment fieldValue) Setter for field:mln_json_array array_valuestatic final GroupLayoutLayout for field:mln_json_array array_valuestatic final longOffset for field:mln_json_array array_valuestatic MemorySegmentasSlice(MemorySegment array, long index) Obtains a slice ofarrayParamwhich selects the array element atindex.static booleanbool_value(MemorySegment union) Getter for field:bool bool_valuestatic voidbool_value(MemorySegment union, boolean fieldValue) Setter for field:bool bool_valuestatic final ValueLayout.OfBooleanLayout for field:bool bool_valuestatic final longOffset for field:bool bool_valuestatic doubledouble_value(MemorySegment union) Getter for field:double double_valuestatic voiddouble_value(MemorySegment union, double fieldValue) Setter for field:double double_valuestatic final ValueLayout.OfDoubleLayout for field:double double_valuestatic final longOffset for field:double double_valuestatic longint_value(MemorySegment union) Getter for field:int64_t int_valuestatic voidint_value(MemorySegment union, long fieldValue) Setter for field:int64_t int_valuestatic final ValueLayout.OfLongLayout for field:int64_t int_valuestatic final longOffset for field:int64_t int_valuestatic final GroupLayoutlayout()The layout of this unionstatic MemorySegmentobject_value(MemorySegment union) Getter for field:mln_json_object object_valuestatic voidobject_value(MemorySegment union, MemorySegment fieldValue) Setter for field:mln_json_object object_valuestatic final GroupLayoutLayout for field:mln_json_object object_valuestatic final longOffset for field:mln_json_object object_valuestatic 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 unionstatic MemorySegmentstring_value(MemorySegment union) Getter for field:mln_string_view string_valuestatic voidstring_value(MemorySegment union, MemorySegment fieldValue) Setter for field:mln_string_view string_valuestatic final GroupLayoutLayout for field:mln_string_view string_valuestatic final longOffset for field:mln_string_view string_valuestatic longuint_value(MemorySegment union) Getter for field:uint64_t uint_valuestatic voiduint_value(MemorySegment union, long fieldValue) Setter for field:uint64_t uint_valuestatic final ValueLayout.OfLongLayout for field:uint64_t uint_valuestatic final longOffset for field:uint64_t uint_value
-
Method Details
-
layout
The layout of this union -
bool_value$layout
Layout for field:bool bool_value -
bool_value$offset
public static final long bool_value$offset()Offset for field:bool bool_value -
bool_value
Getter for field:bool bool_value -
bool_value
Setter for field:bool bool_value -
uint_value$layout
Layout for field:uint64_t uint_value -
uint_value$offset
public static final long uint_value$offset()Offset for field:uint64_t uint_value -
uint_value
Getter for field:uint64_t uint_value -
uint_value
Setter for field:uint64_t uint_value -
int_value$layout
Layout for field:int64_t int_value -
int_value$offset
public static final long int_value$offset()Offset for field:int64_t int_value -
int_value
Getter for field:int64_t int_value -
int_value
Setter for field:int64_t int_value -
double_value$layout
Layout for field:double double_value -
double_value$offset
public static final long double_value$offset()Offset for field:double double_value -
double_value
Getter for field:double double_value -
double_value
Setter for field:double double_value -
string_value$layout
Layout for field:mln_string_view string_value -
string_value$offset
public static final long string_value$offset()Offset for field:mln_string_view string_value -
string_value
Getter for field:mln_string_view string_value -
string_value
Setter for field:mln_string_view string_value -
array_value$layout
Layout for field:mln_json_array array_value -
array_value$offset
public static final long array_value$offset()Offset for field:mln_json_array array_value -
array_value
Getter for field:mln_json_array array_value -
array_value
Setter for field:mln_json_array array_value -
object_value$layout
Layout for field:mln_json_object object_value -
object_value$offset
public static final long object_value$offset()Offset for field:mln_json_object object_value -
object_value
Getter for field:mln_json_object object_value -
object_value
Setter for field:mln_json_object object_value -
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 union -
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()
-