Class mln_geojson.data
java.lang.Object
org.maplibre.nativeffi.internal.c.mln_geojson.data
- Enclosing class:
mln_geojson
union {
const mln_geometry *geometry;
const mln_feature *feature;
mln_feature_collection feature_collection;
}
-
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 MemorySegmentfeature(MemorySegment union) Getter for field:const mln_feature *featurestatic voidfeature(MemorySegment union, MemorySegment fieldValue) Setter for field:const mln_feature *featurestatic MemorySegmentfeature_collection(MemorySegment union) Getter for field:mln_feature_collection feature_collectionstatic voidfeature_collection(MemorySegment union, MemorySegment fieldValue) Setter for field:mln_feature_collection feature_collectionstatic final GroupLayoutLayout for field:mln_feature_collection feature_collectionstatic final longOffset for field:mln_feature_collection feature_collectionstatic final AddressLayoutLayout for field:const mln_feature *featurestatic final longOffset for field:const mln_feature *featurestatic MemorySegmentgeometry(MemorySegment union) Getter for field:const mln_geometry *geometrystatic voidgeometry(MemorySegment union, MemorySegment fieldValue) Setter for field:const mln_geometry *geometrystatic final AddressLayoutLayout for field:const mln_geometry *geometrystatic final longOffset for field:const mln_geometry *geometrystatic final GroupLayoutlayout()The layout of this unionstatic 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 union
-
Method Details
-
layout
The layout of this union -
geometry$layout
Layout for field:const mln_geometry *geometry -
geometry$offset
public static final long geometry$offset()Offset for field:const mln_geometry *geometry -
geometry
Getter for field:const mln_geometry *geometry -
geometry
Setter for field:const mln_geometry *geometry -
feature$layout
Layout for field:const mln_feature *feature -
feature$offset
public static final long feature$offset()Offset for field:const mln_feature *feature -
feature
Getter for field:const mln_feature *feature -
feature
Setter for field:const mln_feature *feature -
feature_collection$layout
Layout for field:mln_feature_collection feature_collection -
feature_collection$offset
public static final long feature_collection$offset()Offset for field:mln_feature_collection feature_collection -
feature_collection
Getter for field:mln_feature_collection feature_collection -
feature_collection
Setter for field:mln_feature_collection feature_collection -
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()
-