@maydon_tech/react-native-nitro-maps 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +20 -0
- package/NitroMap.podspec +42 -0
- package/README.md +172 -0
- package/android/CMakeLists.txt +27 -0
- package/android/build.gradle +141 -0
- package/android/gradle.properties +5 -0
- package/android/src/main/AndroidManifest.xml +3 -0
- package/android/src/main/cpp/cpp-adapter.cpp +6 -0
- package/android/src/main/java/com/margelo/nitro/nitromap/ClusterIconGenerator.kt +108 -0
- package/android/src/main/java/com/margelo/nitro/nitromap/ColorUtils.kt +63 -0
- package/android/src/main/java/com/margelo/nitro/nitromap/HybridNitroMap.kt +408 -0
- package/android/src/main/java/com/margelo/nitro/nitromap/HybridNitroMapConfig.kt +68 -0
- package/android/src/main/java/com/margelo/nitro/nitromap/MarkerIconCache.kt +176 -0
- package/android/src/main/java/com/margelo/nitro/nitromap/MarkerIconFactory.kt +252 -0
- package/android/src/main/java/com/margelo/nitro/nitromap/NitroMapPackage.kt +33 -0
- package/android/src/main/java/com/margelo/nitro/nitromap/clustering/NitroClusterEngine.kt +252 -0
- package/android/src/main/java/com/margelo/nitro/nitromap/clustering/QuadTree.kt +195 -0
- package/android/src/main/java/com/margelo/nitro/nitromap/providers/GoogleMapProvider.kt +912 -0
- package/android/src/main/java/com/margelo/nitro/nitromap/providers/MapProviderInterface.kt +70 -0
- package/cpp/ClusterEngine.hpp +411 -0
- package/cpp/KDBush.hpp +238 -0
- package/cpp/QuadTree.hpp +246 -0
- package/ios/Clustering/ClusterEngineWrapper.h +58 -0
- package/ios/Clustering/ClusterEngineWrapper.mm +142 -0
- package/ios/Clustering/ClusterIconRenderer.swift +80 -0
- package/ios/Clustering/NitroClusterEngine.swift +117 -0
- package/ios/Clustering/NitroClusterIconGenerator.swift +35 -0
- package/ios/MarkerRenderer/MarkerIconFactory.swift +322 -0
- package/ios/MarkerRenderer/PriceMarkerRenderer.swift +140 -0
- package/ios/NitroMap.swift +332 -0
- package/ios/NitroMapConfig/HybridNitroMapConfig.swift +33 -0
- package/ios/Providers/GoogleMapDelegate.swift +310 -0
- package/ios/Providers/GoogleMapProvider+Camera.swift +164 -0
- package/ios/Providers/GoogleMapProvider.swift +924 -0
- package/ios/Providers/MapProviderProtocol.swift +78 -0
- package/ios/Shared/ClusterConfig+Factory.swift +58 -0
- package/ios/Shared/ClusteringManager.swift +211 -0
- package/ios/Shared/MapStyleProvider.swift +135 -0
- package/ios/Shared/MarkerSelectionHandler.swift +116 -0
- package/ios/Utils/ColorValueExtension.swift +54 -0
- package/lib/module/components/ImageMarker.js +146 -0
- package/lib/module/components/ImageMarker.js.map +1 -0
- package/lib/module/components/NitroMap.js +320 -0
- package/lib/module/components/NitroMap.js.map +1 -0
- package/lib/module/components/PriceMarker.js +165 -0
- package/lib/module/components/PriceMarker.js.map +1 -0
- package/lib/module/context/NitroMapContext.js +15 -0
- package/lib/module/context/NitroMapContext.js.map +1 -0
- package/lib/module/hooks/useNitroMarker.js +104 -0
- package/lib/module/hooks/useNitroMarker.js.map +1 -0
- package/lib/module/index.js +21 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/modules/index.js +4 -0
- package/lib/module/modules/index.js.map +1 -0
- package/lib/module/modules/module.js +30 -0
- package/lib/module/modules/module.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/module/specs/NitroMap.nitro.js +4 -0
- package/lib/module/specs/NitroMap.nitro.js.map +1 -0
- package/lib/module/specs/NitroMapConfig.nitro.js +4 -0
- package/lib/module/specs/NitroMapConfig.nitro.js.map +1 -0
- package/lib/module/types/map.js +2 -0
- package/lib/module/types/map.js.map +1 -0
- package/lib/module/types/marker.js +4 -0
- package/lib/module/types/marker.js.map +1 -0
- package/lib/module/utils/colors.js +147 -0
- package/lib/module/utils/colors.js.map +1 -0
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/src/components/ImageMarker.d.ts +70 -0
- package/lib/typescript/src/components/ImageMarker.d.ts.map +1 -0
- package/lib/typescript/src/components/NitroMap.d.ts +14 -0
- package/lib/typescript/src/components/NitroMap.d.ts.map +1 -0
- package/lib/typescript/src/components/PriceMarker.d.ts +88 -0
- package/lib/typescript/src/components/PriceMarker.d.ts.map +1 -0
- package/lib/typescript/src/context/NitroMapContext.d.ts +16 -0
- package/lib/typescript/src/context/NitroMapContext.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useNitroMarker.d.ts +78 -0
- package/lib/typescript/src/hooks/useNitroMarker.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +12 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/lib/typescript/src/modules/index.d.ts +2 -0
- package/lib/typescript/src/modules/index.d.ts.map +1 -0
- package/lib/typescript/src/modules/module.d.ts +22 -0
- package/lib/typescript/src/modules/module.d.ts.map +1 -0
- package/lib/typescript/src/specs/NitroMap.nitro.d.ts +227 -0
- package/lib/typescript/src/specs/NitroMap.nitro.d.ts.map +1 -0
- package/lib/typescript/src/specs/NitroMapConfig.nitro.d.ts +10 -0
- package/lib/typescript/src/specs/NitroMapConfig.nitro.d.ts.map +1 -0
- package/lib/typescript/src/types/map.d.ts +154 -0
- package/lib/typescript/src/types/map.d.ts.map +1 -0
- package/lib/typescript/src/types/marker.d.ts +248 -0
- package/lib/typescript/src/types/marker.d.ts.map +1 -0
- package/lib/typescript/src/utils/colors.d.ts +82 -0
- package/lib/typescript/src/utils/colors.d.ts.map +1 -0
- package/nitro.json +21 -0
- package/nitrogen/generated/android/c++/JCamera.hpp +74 -0
- package/nitrogen/generated/android/c++/JClusterAnimationStyle.hpp +68 -0
- package/nitrogen/generated/android/c++/JClusterConfig.hpp +121 -0
- package/nitrogen/generated/android/c++/JClusterPressEvent.hpp +86 -0
- package/nitrogen/generated/android/c++/JClusterStrategy.hpp +59 -0
- package/nitrogen/generated/android/c++/JColorValue.cpp +26 -0
- package/nitrogen/generated/android/c++/JColorValue.hpp +70 -0
- package/nitrogen/generated/android/c++/JCoordinate.hpp +61 -0
- package/nitrogen/generated/android/c++/JEdgePadding.hpp +69 -0
- package/nitrogen/generated/android/c++/JFunc_void.hpp +75 -0
- package/nitrogen/generated/android/c++/JFunc_void_ClusterPressEvent.hpp +81 -0
- package/nitrogen/generated/android/c++/JFunc_void_MapError.hpp +78 -0
- package/nitrogen/generated/android/c++/JFunc_void_MapPressEvent.hpp +81 -0
- package/nitrogen/generated/android/c++/JFunc_void_MarkerDragEvent.hpp +80 -0
- package/nitrogen/generated/android/c++/JFunc_void_MarkerPressEvent.hpp +80 -0
- package/nitrogen/generated/android/c++/JFunc_void_RegionChangeEvent.hpp +79 -0
- package/nitrogen/generated/android/c++/JHybridNitroMapConfigSpec.cpp +59 -0
- package/nitrogen/generated/android/c++/JHybridNitroMapConfigSpec.hpp +66 -0
- package/nitrogen/generated/android/c++/JHybridNitroMapSpec.cpp +593 -0
- package/nitrogen/generated/android/c++/JHybridNitroMapSpec.hpp +125 -0
- package/nitrogen/generated/android/c++/JImageMarkerConfig.hpp +86 -0
- package/nitrogen/generated/android/c++/JMapBoundaries.hpp +62 -0
- package/nitrogen/generated/android/c++/JMapError.hpp +61 -0
- package/nitrogen/generated/android/c++/JMapPressEvent.hpp +64 -0
- package/nitrogen/generated/android/c++/JMapProvider.hpp +62 -0
- package/nitrogen/generated/android/c++/JMapStyleElement.hpp +87 -0
- package/nitrogen/generated/android/c++/JMapStyler.hpp +78 -0
- package/nitrogen/generated/android/c++/JMapType.hpp +62 -0
- package/nitrogen/generated/android/c++/JMarkerAnimation.hpp +62 -0
- package/nitrogen/generated/android/c++/JMarkerColor.hpp +69 -0
- package/nitrogen/generated/android/c++/JMarkerConfig.hpp +77 -0
- package/nitrogen/generated/android/c++/JMarkerData.hpp +121 -0
- package/nitrogen/generated/android/c++/JMarkerDragEvent.hpp +63 -0
- package/nitrogen/generated/android/c++/JMarkerPressEvent.hpp +63 -0
- package/nitrogen/generated/android/c++/JMarkerStyle.hpp +62 -0
- package/nitrogen/generated/android/c++/JPoint.hpp +61 -0
- package/nitrogen/generated/android/c++/JPriceMarkerStyle.hpp +102 -0
- package/nitrogen/generated/android/c++/JRegion.hpp +69 -0
- package/nitrogen/generated/android/c++/JRegionChangeEvent.hpp +62 -0
- package/nitrogen/generated/android/c++/JVariant_String_MarkerColor.cpp +26 -0
- package/nitrogen/generated/android/c++/JVariant_String_MarkerColor.hpp +70 -0
- package/nitrogen/generated/android/c++/views/JHybridNitroMapStateUpdater.cpp +144 -0
- package/nitrogen/generated/android/c++/views/JHybridNitroMapStateUpdater.hpp +49 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/Camera.kt +50 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/ClusterAnimationStyle.kt +24 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/ClusterConfig.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/ClusterPressEvent.kt +44 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/ClusterStrategy.kt +21 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/ColorValue.kt +59 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/Coordinate.kt +41 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/EdgePadding.kt +47 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/Func_void.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/Func_void_ClusterPressEvent.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/Func_void_MapError.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/Func_void_MapPressEvent.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/Func_void_MarkerDragEvent.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/Func_void_MarkerPressEvent.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/Func_void_RegionChangeEvent.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/HybridNitroMapConfigSpec.kt +61 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/HybridNitroMapSpec.kt +342 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/ImageMarkerConfig.kt +56 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/MapBoundaries.kt +41 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/MapError.kt +41 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/MapPressEvent.kt +41 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/MapProvider.kt +22 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/MapStyleElement.kt +44 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/MapStyler.kt +53 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/MapType.kt +22 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/MarkerAnimation.kt +22 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/MarkerColor.kt +47 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/MarkerConfig.kt +44 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/MarkerData.kt +71 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/MarkerDragEvent.kt +41 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/MarkerPressEvent.kt +41 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/MarkerStyle.kt +22 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/Point.kt +41 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/PriceMarkerStyle.kt +68 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/Region.kt +47 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/RegionChangeEvent.kt +41 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/Variant_String_MarkerColor.kt +59 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/nitromapOnLoad.kt +35 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/views/HybridNitroMapManager.kt +50 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromap/views/HybridNitroMapStateUpdater.kt +23 -0
- package/nitrogen/generated/android/nitromap+autolinking.cmake +87 -0
- package/nitrogen/generated/android/nitromap+autolinking.gradle +27 -0
- package/nitrogen/generated/android/nitromapOnLoad.cpp +70 -0
- package/nitrogen/generated/android/nitromapOnLoad.hpp +25 -0
- package/nitrogen/generated/ios/NitroMap+autolinking.rb +60 -0
- package/nitrogen/generated/ios/NitroMap-Swift-Cxx-Bridge.cpp +130 -0
- package/nitrogen/generated/ios/NitroMap-Swift-Cxx-Bridge.hpp +793 -0
- package/nitrogen/generated/ios/NitroMap-Swift-Cxx-Umbrella.hpp +132 -0
- package/nitrogen/generated/ios/NitroMapAutolinking.mm +41 -0
- package/nitrogen/generated/ios/NitroMapAutolinking.swift +40 -0
- package/nitrogen/generated/ios/c++/HybridNitroMapConfigSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridNitroMapConfigSpecSwift.hpp +84 -0
- package/nitrogen/generated/ios/c++/HybridNitroMapSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridNitroMapSpecSwift.hpp +410 -0
- package/nitrogen/generated/ios/c++/views/HybridNitroMapComponent.mm +206 -0
- package/nitrogen/generated/ios/swift/Camera.swift +80 -0
- package/nitrogen/generated/ios/swift/ClusterAnimationStyle.swift +52 -0
- package/nitrogen/generated/ios/swift/ClusterConfig.swift +268 -0
- package/nitrogen/generated/ios/swift/ClusterPressEvent.swift +70 -0
- package/nitrogen/generated/ios/swift/ClusterStrategy.swift +40 -0
- package/nitrogen/generated/ios/swift/ColorValue.swift +18 -0
- package/nitrogen/generated/ios/swift/Coordinate.swift +47 -0
- package/nitrogen/generated/ios/swift/EdgePadding.swift +69 -0
- package/nitrogen/generated/ios/swift/Func_void.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_Camera.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_ClusterPressEvent.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_MapBoundaries.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_MapError.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_MapPressEvent.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_MarkerDragEvent.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_MarkerPressEvent.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_RegionChangeEvent.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_std__exception_ptr.swift +47 -0
- package/nitrogen/generated/ios/swift/HybridNitroMapConfigSpec.swift +57 -0
- package/nitrogen/generated/ios/swift/HybridNitroMapConfigSpec_cxx.swift +142 -0
- package/nitrogen/generated/ios/swift/HybridNitroMapSpec.swift +93 -0
- package/nitrogen/generated/ios/swift/HybridNitroMapSpec_cxx.swift +953 -0
- package/nitrogen/generated/ios/swift/ImageMarkerConfig.swift +166 -0
- package/nitrogen/generated/ios/swift/MapBoundaries.swift +47 -0
- package/nitrogen/generated/ios/swift/MapError.swift +47 -0
- package/nitrogen/generated/ios/swift/MapPressEvent.swift +47 -0
- package/nitrogen/generated/ios/swift/MapProvider.swift +44 -0
- package/nitrogen/generated/ios/swift/MapStyleElement.swift +108 -0
- package/nitrogen/generated/ios/swift/MapStyler.swift +177 -0
- package/nitrogen/generated/ios/swift/MapType.swift +44 -0
- package/nitrogen/generated/ios/swift/MarkerAnimation.swift +44 -0
- package/nitrogen/generated/ios/swift/MarkerColor.swift +69 -0
- package/nitrogen/generated/ios/swift/MarkerConfig.swift +82 -0
- package/nitrogen/generated/ios/swift/MarkerData.swift +195 -0
- package/nitrogen/generated/ios/swift/MarkerDragEvent.swift +47 -0
- package/nitrogen/generated/ios/swift/MarkerPressEvent.swift +47 -0
- package/nitrogen/generated/ios/swift/MarkerStyle.swift +44 -0
- package/nitrogen/generated/ios/swift/Point.swift +47 -0
- package/nitrogen/generated/ios/swift/PriceMarkerStyle.swift +374 -0
- package/nitrogen/generated/ios/swift/Region.swift +69 -0
- package/nitrogen/generated/ios/swift/RegionChangeEvent.swift +47 -0
- package/nitrogen/generated/ios/swift/Variant_String_MarkerColor.swift +18 -0
- package/nitrogen/generated/shared/c++/Camera.hpp +92 -0
- package/nitrogen/generated/shared/c++/ClusterAnimationStyle.hpp +88 -0
- package/nitrogen/generated/shared/c++/ClusterConfig.hpp +140 -0
- package/nitrogen/generated/shared/c++/ClusterPressEvent.hpp +86 -0
- package/nitrogen/generated/shared/c++/ClusterStrategy.hpp +76 -0
- package/nitrogen/generated/shared/c++/Coordinate.hpp +79 -0
- package/nitrogen/generated/shared/c++/EdgePadding.hpp +87 -0
- package/nitrogen/generated/shared/c++/HybridNitroMapConfigSpec.cpp +22 -0
- package/nitrogen/generated/shared/c++/HybridNitroMapConfigSpec.hpp +65 -0
- package/nitrogen/generated/shared/c++/HybridNitroMapSpec.cpp +82 -0
- package/nitrogen/generated/shared/c++/HybridNitroMapSpec.hpp +173 -0
- package/nitrogen/generated/shared/c++/ImageMarkerConfig.hpp +103 -0
- package/nitrogen/generated/shared/c++/MapBoundaries.hpp +80 -0
- package/nitrogen/generated/shared/c++/MapError.hpp +79 -0
- package/nitrogen/generated/shared/c++/MapPressEvent.hpp +83 -0
- package/nitrogen/generated/shared/c++/MapProvider.hpp +80 -0
- package/nitrogen/generated/shared/c++/MapStyleElement.hpp +87 -0
- package/nitrogen/generated/shared/c++/MapStyler.hpp +96 -0
- package/nitrogen/generated/shared/c++/MapType.hpp +80 -0
- package/nitrogen/generated/shared/c++/MarkerAnimation.hpp +80 -0
- package/nitrogen/generated/shared/c++/MarkerColor.hpp +87 -0
- package/nitrogen/generated/shared/c++/MarkerConfig.hpp +91 -0
- package/nitrogen/generated/shared/c++/MarkerData.hpp +131 -0
- package/nitrogen/generated/shared/c++/MarkerDragEvent.hpp +81 -0
- package/nitrogen/generated/shared/c++/MarkerPressEvent.hpp +81 -0
- package/nitrogen/generated/shared/c++/MarkerStyle.hpp +80 -0
- package/nitrogen/generated/shared/c++/Point.hpp +79 -0
- package/nitrogen/generated/shared/c++/PriceMarkerStyle.hpp +119 -0
- package/nitrogen/generated/shared/c++/Region.hpp +87 -0
- package/nitrogen/generated/shared/c++/RegionChangeEvent.hpp +80 -0
- package/nitrogen/generated/shared/c++/views/HybridNitroMapComponent.cpp +351 -0
- package/nitrogen/generated/shared/c++/views/HybridNitroMapComponent.hpp +141 -0
- package/nitrogen/generated/shared/json/NitroMapConfig.json +32 -0
- package/package.json +176 -0
- package/react-native.config.js +16 -0
- package/src/components/ImageMarker.tsx +254 -0
- package/src/components/NitroMap.tsx +433 -0
- package/src/components/PriceMarker.tsx +311 -0
- package/src/context/NitroMapContext.tsx +33 -0
- package/src/hooks/useNitroMarker.ts +198 -0
- package/src/index.tsx +62 -0
- package/src/modules/index.ts +6 -0
- package/src/modules/module.ts +45 -0
- package/src/specs/NitroMap.nitro.ts +292 -0
- package/src/specs/NitroMapConfig.nitro.ts +8 -0
- package/src/types/map.ts +166 -0
- package/src/types/marker.ts +267 -0
- package/src/utils/colors.ts +159 -0
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JMapType.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#include <fbjni/fbjni.h>
|
|
11
|
+
#include "MapType.hpp"
|
|
12
|
+
|
|
13
|
+
namespace margelo::nitro::nitromap {
|
|
14
|
+
|
|
15
|
+
using namespace facebook;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* The C++ JNI bridge between the C++ enum "MapType" and the the Kotlin enum "MapType".
|
|
19
|
+
*/
|
|
20
|
+
struct JMapType final: public jni::JavaClass<JMapType> {
|
|
21
|
+
public:
|
|
22
|
+
static auto constexpr kJavaDescriptor = "Lcom/margelo/nitro/nitromap/MapType;";
|
|
23
|
+
|
|
24
|
+
public:
|
|
25
|
+
/**
|
|
26
|
+
* Convert this Java/Kotlin-based enum to the C++ enum MapType.
|
|
27
|
+
*/
|
|
28
|
+
[[maybe_unused]]
|
|
29
|
+
[[nodiscard]]
|
|
30
|
+
MapType toCpp() const {
|
|
31
|
+
static const auto clazz = javaClassStatic();
|
|
32
|
+
static const auto fieldOrdinal = clazz->getField<int>("value");
|
|
33
|
+
int ordinal = this->getFieldValue(fieldOrdinal);
|
|
34
|
+
return static_cast<MapType>(ordinal);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
public:
|
|
38
|
+
/**
|
|
39
|
+
* Create a Java/Kotlin-based enum with the given C++ enum's value.
|
|
40
|
+
*/
|
|
41
|
+
[[maybe_unused]]
|
|
42
|
+
static jni::alias_ref<JMapType> fromCpp(MapType value) {
|
|
43
|
+
static const auto clazz = javaClassStatic();
|
|
44
|
+
static const auto fieldSTANDARD = clazz->getStaticField<JMapType>("STANDARD");
|
|
45
|
+
static const auto fieldSATELLITE = clazz->getStaticField<JMapType>("SATELLITE");
|
|
46
|
+
static const auto fieldHYBRID = clazz->getStaticField<JMapType>("HYBRID");
|
|
47
|
+
|
|
48
|
+
switch (value) {
|
|
49
|
+
case MapType::STANDARD:
|
|
50
|
+
return clazz->getStaticFieldValue(fieldSTANDARD);
|
|
51
|
+
case MapType::SATELLITE:
|
|
52
|
+
return clazz->getStaticFieldValue(fieldSATELLITE);
|
|
53
|
+
case MapType::HYBRID:
|
|
54
|
+
return clazz->getStaticFieldValue(fieldHYBRID);
|
|
55
|
+
default:
|
|
56
|
+
std::string stringValue = std::to_string(static_cast<int>(value));
|
|
57
|
+
throw std::invalid_argument("Invalid enum value (" + stringValue + "!");
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
} // namespace margelo::nitro::nitromap
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JMarkerAnimation.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#include <fbjni/fbjni.h>
|
|
11
|
+
#include "MarkerAnimation.hpp"
|
|
12
|
+
|
|
13
|
+
namespace margelo::nitro::nitromap {
|
|
14
|
+
|
|
15
|
+
using namespace facebook;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* The C++ JNI bridge between the C++ enum "MarkerAnimation" and the the Kotlin enum "MarkerAnimation".
|
|
19
|
+
*/
|
|
20
|
+
struct JMarkerAnimation final: public jni::JavaClass<JMarkerAnimation> {
|
|
21
|
+
public:
|
|
22
|
+
static auto constexpr kJavaDescriptor = "Lcom/margelo/nitro/nitromap/MarkerAnimation;";
|
|
23
|
+
|
|
24
|
+
public:
|
|
25
|
+
/**
|
|
26
|
+
* Convert this Java/Kotlin-based enum to the C++ enum MarkerAnimation.
|
|
27
|
+
*/
|
|
28
|
+
[[maybe_unused]]
|
|
29
|
+
[[nodiscard]]
|
|
30
|
+
MarkerAnimation toCpp() const {
|
|
31
|
+
static const auto clazz = javaClassStatic();
|
|
32
|
+
static const auto fieldOrdinal = clazz->getField<int>("value");
|
|
33
|
+
int ordinal = this->getFieldValue(fieldOrdinal);
|
|
34
|
+
return static_cast<MarkerAnimation>(ordinal);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
public:
|
|
38
|
+
/**
|
|
39
|
+
* Create a Java/Kotlin-based enum with the given C++ enum's value.
|
|
40
|
+
*/
|
|
41
|
+
[[maybe_unused]]
|
|
42
|
+
static jni::alias_ref<JMarkerAnimation> fromCpp(MarkerAnimation value) {
|
|
43
|
+
static const auto clazz = javaClassStatic();
|
|
44
|
+
static const auto fieldNONE = clazz->getStaticField<JMarkerAnimation>("NONE");
|
|
45
|
+
static const auto fieldPOP = clazz->getStaticField<JMarkerAnimation>("POP");
|
|
46
|
+
static const auto fieldFADEIN = clazz->getStaticField<JMarkerAnimation>("FADEIN");
|
|
47
|
+
|
|
48
|
+
switch (value) {
|
|
49
|
+
case MarkerAnimation::NONE:
|
|
50
|
+
return clazz->getStaticFieldValue(fieldNONE);
|
|
51
|
+
case MarkerAnimation::POP:
|
|
52
|
+
return clazz->getStaticFieldValue(fieldPOP);
|
|
53
|
+
case MarkerAnimation::FADEIN:
|
|
54
|
+
return clazz->getStaticFieldValue(fieldFADEIN);
|
|
55
|
+
default:
|
|
56
|
+
std::string stringValue = std::to_string(static_cast<int>(value));
|
|
57
|
+
throw std::invalid_argument("Invalid enum value (" + stringValue + "!");
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
} // namespace margelo::nitro::nitromap
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JMarkerColor.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#include <fbjni/fbjni.h>
|
|
11
|
+
#include "MarkerColor.hpp"
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
namespace margelo::nitro::nitromap {
|
|
16
|
+
|
|
17
|
+
using namespace facebook;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* The C++ JNI bridge between the C++ struct "MarkerColor" and the the Kotlin data class "MarkerColor".
|
|
21
|
+
*/
|
|
22
|
+
struct JMarkerColor final: public jni::JavaClass<JMarkerColor> {
|
|
23
|
+
public:
|
|
24
|
+
static auto constexpr kJavaDescriptor = "Lcom/margelo/nitro/nitromap/MarkerColor;";
|
|
25
|
+
|
|
26
|
+
public:
|
|
27
|
+
/**
|
|
28
|
+
* Convert this Java/Kotlin-based struct to the C++ struct MarkerColor by copying all values to C++.
|
|
29
|
+
*/
|
|
30
|
+
[[maybe_unused]]
|
|
31
|
+
[[nodiscard]]
|
|
32
|
+
MarkerColor toCpp() const {
|
|
33
|
+
static const auto clazz = javaClassStatic();
|
|
34
|
+
static const auto fieldR = clazz->getField<double>("r");
|
|
35
|
+
double r = this->getFieldValue(fieldR);
|
|
36
|
+
static const auto fieldG = clazz->getField<double>("g");
|
|
37
|
+
double g = this->getFieldValue(fieldG);
|
|
38
|
+
static const auto fieldB = clazz->getField<double>("b");
|
|
39
|
+
double b = this->getFieldValue(fieldB);
|
|
40
|
+
static const auto fieldA = clazz->getField<double>("a");
|
|
41
|
+
double a = this->getFieldValue(fieldA);
|
|
42
|
+
return MarkerColor(
|
|
43
|
+
r,
|
|
44
|
+
g,
|
|
45
|
+
b,
|
|
46
|
+
a
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
public:
|
|
51
|
+
/**
|
|
52
|
+
* Create a Java/Kotlin-based struct by copying all values from the given C++ struct to Java.
|
|
53
|
+
*/
|
|
54
|
+
[[maybe_unused]]
|
|
55
|
+
static jni::local_ref<JMarkerColor::javaobject> fromCpp(const MarkerColor& value) {
|
|
56
|
+
using JSignature = JMarkerColor(double, double, double, double);
|
|
57
|
+
static const auto clazz = javaClassStatic();
|
|
58
|
+
static const auto create = clazz->getStaticMethod<JSignature>("fromCpp");
|
|
59
|
+
return create(
|
|
60
|
+
clazz,
|
|
61
|
+
value.r,
|
|
62
|
+
value.g,
|
|
63
|
+
value.b,
|
|
64
|
+
value.a
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
} // namespace margelo::nitro::nitromap
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JMarkerConfig.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#include <fbjni/fbjni.h>
|
|
11
|
+
#include "MarkerConfig.hpp"
|
|
12
|
+
|
|
13
|
+
#include "ImageMarkerConfig.hpp"
|
|
14
|
+
#include "JColorValue.hpp"
|
|
15
|
+
#include "JImageMarkerConfig.hpp"
|
|
16
|
+
#include "JMarkerColor.hpp"
|
|
17
|
+
#include "JMarkerStyle.hpp"
|
|
18
|
+
#include "JPriceMarkerStyle.hpp"
|
|
19
|
+
#include "JVariant_String_MarkerColor.hpp"
|
|
20
|
+
#include "MarkerColor.hpp"
|
|
21
|
+
#include "MarkerStyle.hpp"
|
|
22
|
+
#include "PriceMarkerStyle.hpp"
|
|
23
|
+
#include <optional>
|
|
24
|
+
#include <string>
|
|
25
|
+
#include <variant>
|
|
26
|
+
|
|
27
|
+
namespace margelo::nitro::nitromap {
|
|
28
|
+
|
|
29
|
+
using namespace facebook;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* The C++ JNI bridge between the C++ struct "MarkerConfig" and the the Kotlin data class "MarkerConfig".
|
|
33
|
+
*/
|
|
34
|
+
struct JMarkerConfig final: public jni::JavaClass<JMarkerConfig> {
|
|
35
|
+
public:
|
|
36
|
+
static auto constexpr kJavaDescriptor = "Lcom/margelo/nitro/nitromap/MarkerConfig;";
|
|
37
|
+
|
|
38
|
+
public:
|
|
39
|
+
/**
|
|
40
|
+
* Convert this Java/Kotlin-based struct to the C++ struct MarkerConfig by copying all values to C++.
|
|
41
|
+
*/
|
|
42
|
+
[[maybe_unused]]
|
|
43
|
+
[[nodiscard]]
|
|
44
|
+
MarkerConfig toCpp() const {
|
|
45
|
+
static const auto clazz = javaClassStatic();
|
|
46
|
+
static const auto fieldStyle = clazz->getField<JMarkerStyle>("style");
|
|
47
|
+
jni::local_ref<JMarkerStyle> style = this->getFieldValue(fieldStyle);
|
|
48
|
+
static const auto fieldImage = clazz->getField<JImageMarkerConfig>("image");
|
|
49
|
+
jni::local_ref<JImageMarkerConfig> image = this->getFieldValue(fieldImage);
|
|
50
|
+
static const auto fieldPriceMarker = clazz->getField<JPriceMarkerStyle>("priceMarker");
|
|
51
|
+
jni::local_ref<JPriceMarkerStyle> priceMarker = this->getFieldValue(fieldPriceMarker);
|
|
52
|
+
return MarkerConfig(
|
|
53
|
+
style->toCpp(),
|
|
54
|
+
image != nullptr ? std::make_optional(image->toCpp()) : std::nullopt,
|
|
55
|
+
priceMarker != nullptr ? std::make_optional(priceMarker->toCpp()) : std::nullopt
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
public:
|
|
60
|
+
/**
|
|
61
|
+
* Create a Java/Kotlin-based struct by copying all values from the given C++ struct to Java.
|
|
62
|
+
*/
|
|
63
|
+
[[maybe_unused]]
|
|
64
|
+
static jni::local_ref<JMarkerConfig::javaobject> fromCpp(const MarkerConfig& value) {
|
|
65
|
+
using JSignature = JMarkerConfig(jni::alias_ref<JMarkerStyle>, jni::alias_ref<JImageMarkerConfig>, jni::alias_ref<JPriceMarkerStyle>);
|
|
66
|
+
static const auto clazz = javaClassStatic();
|
|
67
|
+
static const auto create = clazz->getStaticMethod<JSignature>("fromCpp");
|
|
68
|
+
return create(
|
|
69
|
+
clazz,
|
|
70
|
+
JMarkerStyle::fromCpp(value.style),
|
|
71
|
+
value.image.has_value() ? JImageMarkerConfig::fromCpp(value.image.value()) : nullptr,
|
|
72
|
+
value.priceMarker.has_value() ? JPriceMarkerStyle::fromCpp(value.priceMarker.value()) : nullptr
|
|
73
|
+
);
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
} // namespace margelo::nitro::nitromap
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JMarkerData.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#include <fbjni/fbjni.h>
|
|
11
|
+
#include "MarkerData.hpp"
|
|
12
|
+
|
|
13
|
+
#include "Coordinate.hpp"
|
|
14
|
+
#include "ImageMarkerConfig.hpp"
|
|
15
|
+
#include "JColorValue.hpp"
|
|
16
|
+
#include "JCoordinate.hpp"
|
|
17
|
+
#include "JImageMarkerConfig.hpp"
|
|
18
|
+
#include "JMarkerAnimation.hpp"
|
|
19
|
+
#include "JMarkerColor.hpp"
|
|
20
|
+
#include "JMarkerConfig.hpp"
|
|
21
|
+
#include "JMarkerStyle.hpp"
|
|
22
|
+
#include "JPoint.hpp"
|
|
23
|
+
#include "JPriceMarkerStyle.hpp"
|
|
24
|
+
#include "JVariant_String_MarkerColor.hpp"
|
|
25
|
+
#include "MarkerAnimation.hpp"
|
|
26
|
+
#include "MarkerColor.hpp"
|
|
27
|
+
#include "MarkerConfig.hpp"
|
|
28
|
+
#include "MarkerStyle.hpp"
|
|
29
|
+
#include "Point.hpp"
|
|
30
|
+
#include "PriceMarkerStyle.hpp"
|
|
31
|
+
#include <optional>
|
|
32
|
+
#include <string>
|
|
33
|
+
#include <variant>
|
|
34
|
+
|
|
35
|
+
namespace margelo::nitro::nitromap {
|
|
36
|
+
|
|
37
|
+
using namespace facebook;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* The C++ JNI bridge between the C++ struct "MarkerData" and the the Kotlin data class "MarkerData".
|
|
41
|
+
*/
|
|
42
|
+
struct JMarkerData final: public jni::JavaClass<JMarkerData> {
|
|
43
|
+
public:
|
|
44
|
+
static auto constexpr kJavaDescriptor = "Lcom/margelo/nitro/nitromap/MarkerData;";
|
|
45
|
+
|
|
46
|
+
public:
|
|
47
|
+
/**
|
|
48
|
+
* Convert this Java/Kotlin-based struct to the C++ struct MarkerData by copying all values to C++.
|
|
49
|
+
*/
|
|
50
|
+
[[maybe_unused]]
|
|
51
|
+
[[nodiscard]]
|
|
52
|
+
MarkerData toCpp() const {
|
|
53
|
+
static const auto clazz = javaClassStatic();
|
|
54
|
+
static const auto fieldId = clazz->getField<jni::JString>("id");
|
|
55
|
+
jni::local_ref<jni::JString> id = this->getFieldValue(fieldId);
|
|
56
|
+
static const auto fieldCoordinate = clazz->getField<JCoordinate>("coordinate");
|
|
57
|
+
jni::local_ref<JCoordinate> coordinate = this->getFieldValue(fieldCoordinate);
|
|
58
|
+
static const auto fieldTitle = clazz->getField<jni::JString>("title");
|
|
59
|
+
jni::local_ref<jni::JString> title = this->getFieldValue(fieldTitle);
|
|
60
|
+
static const auto fieldDescription = clazz->getField<jni::JString>("description");
|
|
61
|
+
jni::local_ref<jni::JString> description = this->getFieldValue(fieldDescription);
|
|
62
|
+
static const auto fieldDraggable = clazz->getField<jboolean>("draggable");
|
|
63
|
+
jboolean draggable = this->getFieldValue(fieldDraggable);
|
|
64
|
+
static const auto fieldOpacity = clazz->getField<double>("opacity");
|
|
65
|
+
double opacity = this->getFieldValue(fieldOpacity);
|
|
66
|
+
static const auto fieldRotation = clazz->getField<double>("rotation");
|
|
67
|
+
double rotation = this->getFieldValue(fieldRotation);
|
|
68
|
+
static const auto fieldZIndex = clazz->getField<double>("zIndex");
|
|
69
|
+
double zIndex = this->getFieldValue(fieldZIndex);
|
|
70
|
+
static const auto fieldAnchor = clazz->getField<JPoint>("anchor");
|
|
71
|
+
jni::local_ref<JPoint> anchor = this->getFieldValue(fieldAnchor);
|
|
72
|
+
static const auto fieldConfig = clazz->getField<JMarkerConfig>("config");
|
|
73
|
+
jni::local_ref<JMarkerConfig> config = this->getFieldValue(fieldConfig);
|
|
74
|
+
static const auto fieldClusteringEnabled = clazz->getField<jboolean>("clusteringEnabled");
|
|
75
|
+
jboolean clusteringEnabled = this->getFieldValue(fieldClusteringEnabled);
|
|
76
|
+
static const auto fieldAnimation = clazz->getField<JMarkerAnimation>("animation");
|
|
77
|
+
jni::local_ref<JMarkerAnimation> animation = this->getFieldValue(fieldAnimation);
|
|
78
|
+
return MarkerData(
|
|
79
|
+
id->toStdString(),
|
|
80
|
+
coordinate->toCpp(),
|
|
81
|
+
title != nullptr ? std::make_optional(title->toStdString()) : std::nullopt,
|
|
82
|
+
description != nullptr ? std::make_optional(description->toStdString()) : std::nullopt,
|
|
83
|
+
static_cast<bool>(draggable),
|
|
84
|
+
opacity,
|
|
85
|
+
rotation,
|
|
86
|
+
zIndex,
|
|
87
|
+
anchor->toCpp(),
|
|
88
|
+
config->toCpp(),
|
|
89
|
+
static_cast<bool>(clusteringEnabled),
|
|
90
|
+
animation->toCpp()
|
|
91
|
+
);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
public:
|
|
95
|
+
/**
|
|
96
|
+
* Create a Java/Kotlin-based struct by copying all values from the given C++ struct to Java.
|
|
97
|
+
*/
|
|
98
|
+
[[maybe_unused]]
|
|
99
|
+
static jni::local_ref<JMarkerData::javaobject> fromCpp(const MarkerData& value) {
|
|
100
|
+
using JSignature = JMarkerData(jni::alias_ref<jni::JString>, jni::alias_ref<JCoordinate>, jni::alias_ref<jni::JString>, jni::alias_ref<jni::JString>, jboolean, double, double, double, jni::alias_ref<JPoint>, jni::alias_ref<JMarkerConfig>, jboolean, jni::alias_ref<JMarkerAnimation>);
|
|
101
|
+
static const auto clazz = javaClassStatic();
|
|
102
|
+
static const auto create = clazz->getStaticMethod<JSignature>("fromCpp");
|
|
103
|
+
return create(
|
|
104
|
+
clazz,
|
|
105
|
+
jni::make_jstring(value.id),
|
|
106
|
+
JCoordinate::fromCpp(value.coordinate),
|
|
107
|
+
value.title.has_value() ? jni::make_jstring(value.title.value()) : nullptr,
|
|
108
|
+
value.description.has_value() ? jni::make_jstring(value.description.value()) : nullptr,
|
|
109
|
+
value.draggable,
|
|
110
|
+
value.opacity,
|
|
111
|
+
value.rotation,
|
|
112
|
+
value.zIndex,
|
|
113
|
+
JPoint::fromCpp(value.anchor),
|
|
114
|
+
JMarkerConfig::fromCpp(value.config),
|
|
115
|
+
value.clusteringEnabled,
|
|
116
|
+
JMarkerAnimation::fromCpp(value.animation)
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
} // namespace margelo::nitro::nitromap
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JMarkerDragEvent.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#include <fbjni/fbjni.h>
|
|
11
|
+
#include "MarkerDragEvent.hpp"
|
|
12
|
+
|
|
13
|
+
#include "Coordinate.hpp"
|
|
14
|
+
#include "JCoordinate.hpp"
|
|
15
|
+
#include <string>
|
|
16
|
+
|
|
17
|
+
namespace margelo::nitro::nitromap {
|
|
18
|
+
|
|
19
|
+
using namespace facebook;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* The C++ JNI bridge between the C++ struct "MarkerDragEvent" and the the Kotlin data class "MarkerDragEvent".
|
|
23
|
+
*/
|
|
24
|
+
struct JMarkerDragEvent final: public jni::JavaClass<JMarkerDragEvent> {
|
|
25
|
+
public:
|
|
26
|
+
static auto constexpr kJavaDescriptor = "Lcom/margelo/nitro/nitromap/MarkerDragEvent;";
|
|
27
|
+
|
|
28
|
+
public:
|
|
29
|
+
/**
|
|
30
|
+
* Convert this Java/Kotlin-based struct to the C++ struct MarkerDragEvent by copying all values to C++.
|
|
31
|
+
*/
|
|
32
|
+
[[maybe_unused]]
|
|
33
|
+
[[nodiscard]]
|
|
34
|
+
MarkerDragEvent toCpp() const {
|
|
35
|
+
static const auto clazz = javaClassStatic();
|
|
36
|
+
static const auto fieldId = clazz->getField<jni::JString>("id");
|
|
37
|
+
jni::local_ref<jni::JString> id = this->getFieldValue(fieldId);
|
|
38
|
+
static const auto fieldCoordinate = clazz->getField<JCoordinate>("coordinate");
|
|
39
|
+
jni::local_ref<JCoordinate> coordinate = this->getFieldValue(fieldCoordinate);
|
|
40
|
+
return MarkerDragEvent(
|
|
41
|
+
id->toStdString(),
|
|
42
|
+
coordinate->toCpp()
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
public:
|
|
47
|
+
/**
|
|
48
|
+
* Create a Java/Kotlin-based struct by copying all values from the given C++ struct to Java.
|
|
49
|
+
*/
|
|
50
|
+
[[maybe_unused]]
|
|
51
|
+
static jni::local_ref<JMarkerDragEvent::javaobject> fromCpp(const MarkerDragEvent& value) {
|
|
52
|
+
using JSignature = JMarkerDragEvent(jni::alias_ref<jni::JString>, jni::alias_ref<JCoordinate>);
|
|
53
|
+
static const auto clazz = javaClassStatic();
|
|
54
|
+
static const auto create = clazz->getStaticMethod<JSignature>("fromCpp");
|
|
55
|
+
return create(
|
|
56
|
+
clazz,
|
|
57
|
+
jni::make_jstring(value.id),
|
|
58
|
+
JCoordinate::fromCpp(value.coordinate)
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
} // namespace margelo::nitro::nitromap
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JMarkerPressEvent.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#include <fbjni/fbjni.h>
|
|
11
|
+
#include "MarkerPressEvent.hpp"
|
|
12
|
+
|
|
13
|
+
#include "Coordinate.hpp"
|
|
14
|
+
#include "JCoordinate.hpp"
|
|
15
|
+
#include <string>
|
|
16
|
+
|
|
17
|
+
namespace margelo::nitro::nitromap {
|
|
18
|
+
|
|
19
|
+
using namespace facebook;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* The C++ JNI bridge between the C++ struct "MarkerPressEvent" and the the Kotlin data class "MarkerPressEvent".
|
|
23
|
+
*/
|
|
24
|
+
struct JMarkerPressEvent final: public jni::JavaClass<JMarkerPressEvent> {
|
|
25
|
+
public:
|
|
26
|
+
static auto constexpr kJavaDescriptor = "Lcom/margelo/nitro/nitromap/MarkerPressEvent;";
|
|
27
|
+
|
|
28
|
+
public:
|
|
29
|
+
/**
|
|
30
|
+
* Convert this Java/Kotlin-based struct to the C++ struct MarkerPressEvent by copying all values to C++.
|
|
31
|
+
*/
|
|
32
|
+
[[maybe_unused]]
|
|
33
|
+
[[nodiscard]]
|
|
34
|
+
MarkerPressEvent toCpp() const {
|
|
35
|
+
static const auto clazz = javaClassStatic();
|
|
36
|
+
static const auto fieldId = clazz->getField<jni::JString>("id");
|
|
37
|
+
jni::local_ref<jni::JString> id = this->getFieldValue(fieldId);
|
|
38
|
+
static const auto fieldCoordinate = clazz->getField<JCoordinate>("coordinate");
|
|
39
|
+
jni::local_ref<JCoordinate> coordinate = this->getFieldValue(fieldCoordinate);
|
|
40
|
+
return MarkerPressEvent(
|
|
41
|
+
id->toStdString(),
|
|
42
|
+
coordinate->toCpp()
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
public:
|
|
47
|
+
/**
|
|
48
|
+
* Create a Java/Kotlin-based struct by copying all values from the given C++ struct to Java.
|
|
49
|
+
*/
|
|
50
|
+
[[maybe_unused]]
|
|
51
|
+
static jni::local_ref<JMarkerPressEvent::javaobject> fromCpp(const MarkerPressEvent& value) {
|
|
52
|
+
using JSignature = JMarkerPressEvent(jni::alias_ref<jni::JString>, jni::alias_ref<JCoordinate>);
|
|
53
|
+
static const auto clazz = javaClassStatic();
|
|
54
|
+
static const auto create = clazz->getStaticMethod<JSignature>("fromCpp");
|
|
55
|
+
return create(
|
|
56
|
+
clazz,
|
|
57
|
+
jni::make_jstring(value.id),
|
|
58
|
+
JCoordinate::fromCpp(value.coordinate)
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
} // namespace margelo::nitro::nitromap
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JMarkerStyle.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#include <fbjni/fbjni.h>
|
|
11
|
+
#include "MarkerStyle.hpp"
|
|
12
|
+
|
|
13
|
+
namespace margelo::nitro::nitromap {
|
|
14
|
+
|
|
15
|
+
using namespace facebook;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* The C++ JNI bridge between the C++ enum "MarkerStyle" and the the Kotlin enum "MarkerStyle".
|
|
19
|
+
*/
|
|
20
|
+
struct JMarkerStyle final: public jni::JavaClass<JMarkerStyle> {
|
|
21
|
+
public:
|
|
22
|
+
static auto constexpr kJavaDescriptor = "Lcom/margelo/nitro/nitromap/MarkerStyle;";
|
|
23
|
+
|
|
24
|
+
public:
|
|
25
|
+
/**
|
|
26
|
+
* Convert this Java/Kotlin-based enum to the C++ enum MarkerStyle.
|
|
27
|
+
*/
|
|
28
|
+
[[maybe_unused]]
|
|
29
|
+
[[nodiscard]]
|
|
30
|
+
MarkerStyle toCpp() const {
|
|
31
|
+
static const auto clazz = javaClassStatic();
|
|
32
|
+
static const auto fieldOrdinal = clazz->getField<int>("value");
|
|
33
|
+
int ordinal = this->getFieldValue(fieldOrdinal);
|
|
34
|
+
return static_cast<MarkerStyle>(ordinal);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
public:
|
|
38
|
+
/**
|
|
39
|
+
* Create a Java/Kotlin-based enum with the given C++ enum's value.
|
|
40
|
+
*/
|
|
41
|
+
[[maybe_unused]]
|
|
42
|
+
static jni::alias_ref<JMarkerStyle> fromCpp(MarkerStyle value) {
|
|
43
|
+
static const auto clazz = javaClassStatic();
|
|
44
|
+
static const auto fieldDEFAULT = clazz->getStaticField<JMarkerStyle>("DEFAULT");
|
|
45
|
+
static const auto fieldIMAGE = clazz->getStaticField<JMarkerStyle>("IMAGE");
|
|
46
|
+
static const auto fieldPRICEMARKER = clazz->getStaticField<JMarkerStyle>("PRICEMARKER");
|
|
47
|
+
|
|
48
|
+
switch (value) {
|
|
49
|
+
case MarkerStyle::DEFAULT:
|
|
50
|
+
return clazz->getStaticFieldValue(fieldDEFAULT);
|
|
51
|
+
case MarkerStyle::IMAGE:
|
|
52
|
+
return clazz->getStaticFieldValue(fieldIMAGE);
|
|
53
|
+
case MarkerStyle::PRICEMARKER:
|
|
54
|
+
return clazz->getStaticFieldValue(fieldPRICEMARKER);
|
|
55
|
+
default:
|
|
56
|
+
std::string stringValue = std::to_string(static_cast<int>(value));
|
|
57
|
+
throw std::invalid_argument("Invalid enum value (" + stringValue + "!");
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
} // namespace margelo::nitro::nitromap
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JPoint.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#include <fbjni/fbjni.h>
|
|
11
|
+
#include "Point.hpp"
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
namespace margelo::nitro::nitromap {
|
|
16
|
+
|
|
17
|
+
using namespace facebook;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* The C++ JNI bridge between the C++ struct "Point" and the the Kotlin data class "Point".
|
|
21
|
+
*/
|
|
22
|
+
struct JPoint final: public jni::JavaClass<JPoint> {
|
|
23
|
+
public:
|
|
24
|
+
static auto constexpr kJavaDescriptor = "Lcom/margelo/nitro/nitromap/Point;";
|
|
25
|
+
|
|
26
|
+
public:
|
|
27
|
+
/**
|
|
28
|
+
* Convert this Java/Kotlin-based struct to the C++ struct Point by copying all values to C++.
|
|
29
|
+
*/
|
|
30
|
+
[[maybe_unused]]
|
|
31
|
+
[[nodiscard]]
|
|
32
|
+
Point toCpp() const {
|
|
33
|
+
static const auto clazz = javaClassStatic();
|
|
34
|
+
static const auto fieldX = clazz->getField<double>("x");
|
|
35
|
+
double x = this->getFieldValue(fieldX);
|
|
36
|
+
static const auto fieldY = clazz->getField<double>("y");
|
|
37
|
+
double y = this->getFieldValue(fieldY);
|
|
38
|
+
return Point(
|
|
39
|
+
x,
|
|
40
|
+
y
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
public:
|
|
45
|
+
/**
|
|
46
|
+
* Create a Java/Kotlin-based struct by copying all values from the given C++ struct to Java.
|
|
47
|
+
*/
|
|
48
|
+
[[maybe_unused]]
|
|
49
|
+
static jni::local_ref<JPoint::javaobject> fromCpp(const Point& value) {
|
|
50
|
+
using JSignature = JPoint(double, double);
|
|
51
|
+
static const auto clazz = javaClassStatic();
|
|
52
|
+
static const auto create = clazz->getStaticMethod<JSignature>("fromCpp");
|
|
53
|
+
return create(
|
|
54
|
+
clazz,
|
|
55
|
+
value.x,
|
|
56
|
+
value.y
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
} // namespace margelo::nitro::nitromap
|