Class mln_json_value

java.lang.Object
org.maplibre.nativeffi.internal.c.mln_json_value

public class mln_json_value extends Object
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 Classes
    Modifier and Type
    Class
    Description
    static class 
    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 Type
    Method
    Description
    Allocate a segment of size layout().byteSize() using allocator
    allocateArray(long elementCount, SegmentAllocator allocator)
    Allocate an array of size elementCount using allocator.
    asSlice(MemorySegment array, long index)
    Obtains a slice of arrayParam which selects the array element at index.
    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
    
    static void
    data(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;
    } data
    
    static final GroupLayout
    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
    
    static final long
    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
    
    static final GroupLayout
    The layout of this struct
    reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer<MemorySegment> cleanup)
    Reinterprets addr using target arena and cleanupAction (if any).
    Reinterprets addr using target arena and cleanupAction (if any).
    static int
    Getter for field:
    uint32_t size
    
    static void
    size(MemorySegment struct, int fieldValue)
    Setter for field:
    uint32_t size
    
    static final ValueLayout.OfInt
    Layout for field:
    uint32_t size
    
    static final long
    Offset for field:
    uint32_t size
    
    static long
    The size (in bytes) of this struct
    static int
    Getter for field:
    uint32_t type
    
    static void
    type(MemorySegment struct, int fieldValue)
    Setter for field:
    uint32_t type
    
    static final ValueLayout.OfInt
    Layout for field:
    uint32_t type
    
    static final long
    Offset for field:
    uint32_t type
    

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • layout

      public static final GroupLayout layout()
      The layout of this struct
    • size$layout

      public static final ValueLayout.OfInt size$layout()
      Layout for field:
      uint32_t size
      
    • size$offset

      public static final long size$offset()
      Offset for field:
      uint32_t size
      
    • size

      public static int size(MemorySegment struct)
      Getter for field:
      uint32_t size
      
    • size

      public static void size(MemorySegment struct, int fieldValue)
      Setter for field:
      uint32_t size
      
    • type$layout

      public static final ValueLayout.OfInt type$layout()
      Layout for field:
      uint32_t type
      
    • type$offset

      public static final long type$offset()
      Offset for field:
      uint32_t type
      
    • type

      public static int type(MemorySegment struct)
      Getter for field:
      uint32_t type
      
    • type

      public static void type(MemorySegment struct, int fieldValue)
      Setter for field:
      uint32_t type
      
    • data$layout

      public static final GroupLayout 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

      public static MemorySegment data(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;
      } data
      
    • data

      public static void data(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;
      } data
      
    • asSlice

      public static MemorySegment asSlice(MemorySegment array, long index)
      Obtains a slice of arrayParam which selects the array element at index. The returned segment has address arrayParam.address() + index * layout().byteSize()
    • sizeof

      public static long sizeof()
      The size (in bytes) of this struct
    • allocate

      public static MemorySegment allocate(SegmentAllocator allocator)
      Allocate a segment of size layout().byteSize() using allocator
    • allocateArray

      public static MemorySegment allocateArray(long elementCount, SegmentAllocator allocator)
      Allocate an array of size elementCount using allocator. The returned segment has size elementCount * layout().byteSize().
    • reinterpret

      public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer<MemorySegment> cleanup)
      Reinterprets addr using target arena and cleanupAction (if any). The returned segment has size layout().byteSize()
    • reinterpret

      public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer<MemorySegment> cleanup)
      Reinterprets addr using target arena and cleanupAction (if any). The returned segment has size elementCount * layout().byteSize()