@inoxialabs/react-native-nitro-location-geocoder 1.0.0 → 1.0.1
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/README.md +20 -20
- package/android/src/main/java/com/margelo/nitro/locationgeocoder/HybridLocationGeocoder.kt +71 -71
- package/ios/HybridLocationGeocoder.swift +78 -78
- package/nitrogen/generated/.gitattributes +1 -1
- package/nitrogen/generated/android/NitroLocationGeocoder+autolinking.cmake +81 -81
- package/nitrogen/generated/android/NitroLocationGeocoder+autolinking.gradle +27 -27
- package/nitrogen/generated/android/NitroLocationGeocoderOnLoad.cpp +54 -54
- package/nitrogen/generated/android/NitroLocationGeocoderOnLoad.hpp +34 -34
- package/nitrogen/generated/android/c++/JHybridLocationGeocoderSpec.cpp +69 -69
- package/nitrogen/generated/android/c++/JHybridLocationGeocoderSpec.hpp +63 -63
- package/nitrogen/generated/android/c++/JLocationGeocoderResult.hpp +77 -77
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/locationgeocoder/HybridLocationGeocoderSpec.kt +55 -55
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/locationgeocoder/LocationGeocoderResult.kt +76 -53
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/locationgeocoder/NitroLocationGeocoderOnLoad.kt +35 -35
- package/nitrogen/generated/ios/NitroLocationGeocoder+autolinking.rb +62 -60
- package/nitrogen/generated/ios/NitroLocationGeocoder-Swift-Cxx-Bridge.cpp +49 -49
- package/nitrogen/generated/ios/NitroLocationGeocoder-Swift-Cxx-Bridge.hpp +114 -114
- package/nitrogen/generated/ios/NitroLocationGeocoder-Swift-Cxx-Umbrella.hpp +48 -48
- package/nitrogen/generated/ios/NitroLocationGeocoderAutolinking.mm +33 -33
- package/nitrogen/generated/ios/NitroLocationGeocoderAutolinking.swift +26 -26
- package/nitrogen/generated/ios/c++/HybridLocationGeocoderSpecSwift.cpp +11 -11
- package/nitrogen/generated/ios/c++/HybridLocationGeocoderSpecSwift.hpp +85 -85
- package/nitrogen/generated/ios/swift/Func_void_LocationGeocoderResult.swift +46 -46
- package/nitrogen/generated/ios/swift/Func_void_std__exception_ptr.swift +46 -46
- package/nitrogen/generated/ios/swift/HybridLocationGeocoderSpec.swift +55 -55
- package/nitrogen/generated/ios/swift/HybridLocationGeocoderSpec_cxx.swift +145 -145
- package/nitrogen/generated/ios/swift/LocationGeocoderResult.swift +54 -54
- package/nitrogen/generated/shared/c++/HybridLocationGeocoderSpec.cpp +21 -21
- package/nitrogen/generated/shared/c++/HybridLocationGeocoderSpec.hpp +65 -65
- package/nitrogen/generated/shared/c++/LocationGeocoderResult.hpp +103 -103
- package/package.json +3 -3
- package/src/index.ts +47 -47
|
@@ -1,114 +1,114 @@
|
|
|
1
|
-
///
|
|
2
|
-
/// NitroLocationGeocoder-Swift-Cxx-Bridge.hpp
|
|
3
|
-
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
-
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
-
///
|
|
7
|
-
|
|
8
|
-
#pragma once
|
|
9
|
-
|
|
10
|
-
// Forward declarations of C++ defined types
|
|
11
|
-
// Forward declaration of `HybridLocationGeocoderSpec` to properly resolve imports.
|
|
12
|
-
namespace margelo::nitro::locationgeocoder { class HybridLocationGeocoderSpec; }
|
|
13
|
-
// Forward declaration of `LocationGeocoderResult` to properly resolve imports.
|
|
14
|
-
namespace margelo::nitro::locationgeocoder { struct LocationGeocoderResult; }
|
|
15
|
-
|
|
16
|
-
// Forward declarations of Swift defined types
|
|
17
|
-
// Forward declaration of `HybridLocationGeocoderSpec_cxx` to properly resolve imports.
|
|
18
|
-
namespace NitroLocationGeocoder { class HybridLocationGeocoderSpec_cxx; }
|
|
19
|
-
|
|
20
|
-
// Include C++ defined types
|
|
21
|
-
#include "HybridLocationGeocoderSpec.hpp"
|
|
22
|
-
#include "LocationGeocoderResult.hpp"
|
|
23
|
-
#include <NitroModules/Promise.hpp>
|
|
24
|
-
#include <NitroModules/PromiseHolder.hpp>
|
|
25
|
-
#include <NitroModules/Result.hpp>
|
|
26
|
-
#include <exception>
|
|
27
|
-
#include <functional>
|
|
28
|
-
#include <memory>
|
|
29
|
-
#include <string>
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Contains specialized versions of C++ templated types so they can be accessed from Swift,
|
|
33
|
-
* as well as helper functions to interact with those C++ types from Swift.
|
|
34
|
-
*/
|
|
35
|
-
namespace margelo::nitro::locationgeocoder::bridge::swift {
|
|
36
|
-
|
|
37
|
-
// pragma MARK: std::shared_ptr<Promise<LocationGeocoderResult>>
|
|
38
|
-
/**
|
|
39
|
-
* Specialized version of `std::shared_ptr<Promise<LocationGeocoderResult>>`.
|
|
40
|
-
*/
|
|
41
|
-
using std__shared_ptr_Promise_LocationGeocoderResult__ = std::shared_ptr<Promise<LocationGeocoderResult>>;
|
|
42
|
-
inline std::shared_ptr<Promise<LocationGeocoderResult>> create_std__shared_ptr_Promise_LocationGeocoderResult__() noexcept {
|
|
43
|
-
return Promise<LocationGeocoderResult>::create();
|
|
44
|
-
}
|
|
45
|
-
inline PromiseHolder<LocationGeocoderResult> wrap_std__shared_ptr_Promise_LocationGeocoderResult__(std::shared_ptr<Promise<LocationGeocoderResult>> promise) noexcept {
|
|
46
|
-
return PromiseHolder<LocationGeocoderResult>(std::move(promise));
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
// pragma MARK: std::function<void(const LocationGeocoderResult& /* result */)>
|
|
50
|
-
/**
|
|
51
|
-
* Specialized version of `std::function<void(const LocationGeocoderResult&)>`.
|
|
52
|
-
*/
|
|
53
|
-
using Func_void_LocationGeocoderResult = std::function<void(const LocationGeocoderResult& /* result */)>;
|
|
54
|
-
/**
|
|
55
|
-
* Wrapper class for a `std::function<void(const LocationGeocoderResult& / * result * /)>`, this can be used from Swift.
|
|
56
|
-
*/
|
|
57
|
-
class Func_void_LocationGeocoderResult_Wrapper final {
|
|
58
|
-
public:
|
|
59
|
-
explicit Func_void_LocationGeocoderResult_Wrapper(std::function<void(const LocationGeocoderResult& /* result */)>&& func): _function(std::make_unique<std::function<void(const LocationGeocoderResult& /* result */)>>(std::move(func))) {}
|
|
60
|
-
inline void call(LocationGeocoderResult result) const noexcept {
|
|
61
|
-
_function->operator()(result);
|
|
62
|
-
}
|
|
63
|
-
private:
|
|
64
|
-
std::unique_ptr<std::function<void(const LocationGeocoderResult& /* result */)>> _function;
|
|
65
|
-
} SWIFT_NONCOPYABLE;
|
|
66
|
-
Func_void_LocationGeocoderResult create_Func_void_LocationGeocoderResult(void* NON_NULL swiftClosureWrapper) noexcept;
|
|
67
|
-
inline Func_void_LocationGeocoderResult_Wrapper wrap_Func_void_LocationGeocoderResult(Func_void_LocationGeocoderResult value) noexcept {
|
|
68
|
-
return Func_void_LocationGeocoderResult_Wrapper(std::move(value));
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
// pragma MARK: std::function<void(const std::exception_ptr& /* error */)>
|
|
72
|
-
/**
|
|
73
|
-
* Specialized version of `std::function<void(const std::exception_ptr&)>`.
|
|
74
|
-
*/
|
|
75
|
-
using Func_void_std__exception_ptr = std::function<void(const std::exception_ptr& /* error */)>;
|
|
76
|
-
/**
|
|
77
|
-
* Wrapper class for a `std::function<void(const std::exception_ptr& / * error * /)>`, this can be used from Swift.
|
|
78
|
-
*/
|
|
79
|
-
class Func_void_std__exception_ptr_Wrapper final {
|
|
80
|
-
public:
|
|
81
|
-
explicit Func_void_std__exception_ptr_Wrapper(std::function<void(const std::exception_ptr& /* error */)>&& func): _function(std::make_unique<std::function<void(const std::exception_ptr& /* error */)>>(std::move(func))) {}
|
|
82
|
-
inline void call(std::exception_ptr error) const noexcept {
|
|
83
|
-
_function->operator()(error);
|
|
84
|
-
}
|
|
85
|
-
private:
|
|
86
|
-
std::unique_ptr<std::function<void(const std::exception_ptr& /* error */)>> _function;
|
|
87
|
-
} SWIFT_NONCOPYABLE;
|
|
88
|
-
Func_void_std__exception_ptr create_Func_void_std__exception_ptr(void* NON_NULL swiftClosureWrapper) noexcept;
|
|
89
|
-
inline Func_void_std__exception_ptr_Wrapper wrap_Func_void_std__exception_ptr(Func_void_std__exception_ptr value) noexcept {
|
|
90
|
-
return Func_void_std__exception_ptr_Wrapper(std::move(value));
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
// pragma MARK: std::shared_ptr<HybridLocationGeocoderSpec>
|
|
94
|
-
/**
|
|
95
|
-
* Specialized version of `std::shared_ptr<HybridLocationGeocoderSpec>`.
|
|
96
|
-
*/
|
|
97
|
-
using std__shared_ptr_HybridLocationGeocoderSpec_ = std::shared_ptr<HybridLocationGeocoderSpec>;
|
|
98
|
-
std::shared_ptr<HybridLocationGeocoderSpec> create_std__shared_ptr_HybridLocationGeocoderSpec_(void* NON_NULL swiftUnsafePointer) noexcept;
|
|
99
|
-
void* NON_NULL get_std__shared_ptr_HybridLocationGeocoderSpec_(std__shared_ptr_HybridLocationGeocoderSpec_ cppType);
|
|
100
|
-
|
|
101
|
-
// pragma MARK: std::weak_ptr<HybridLocationGeocoderSpec>
|
|
102
|
-
using std__weak_ptr_HybridLocationGeocoderSpec_ = std::weak_ptr<HybridLocationGeocoderSpec>;
|
|
103
|
-
inline std__weak_ptr_HybridLocationGeocoderSpec_ weakify_std__shared_ptr_HybridLocationGeocoderSpec_(const std::shared_ptr<HybridLocationGeocoderSpec>& strong) noexcept { return strong; }
|
|
104
|
-
|
|
105
|
-
// pragma MARK: Result<std::shared_ptr<Promise<LocationGeocoderResult>>>
|
|
106
|
-
using Result_std__shared_ptr_Promise_LocationGeocoderResult___ = Result<std::shared_ptr<Promise<LocationGeocoderResult>>>;
|
|
107
|
-
inline Result_std__shared_ptr_Promise_LocationGeocoderResult___ create_Result_std__shared_ptr_Promise_LocationGeocoderResult___(const std::shared_ptr<Promise<LocationGeocoderResult>>& value) noexcept {
|
|
108
|
-
return Result<std::shared_ptr<Promise<LocationGeocoderResult>>>::withValue(value);
|
|
109
|
-
}
|
|
110
|
-
inline Result_std__shared_ptr_Promise_LocationGeocoderResult___ create_Result_std__shared_ptr_Promise_LocationGeocoderResult___(const std::exception_ptr& error) noexcept {
|
|
111
|
-
return Result<std::shared_ptr<Promise<LocationGeocoderResult>>>::withError(error);
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
} // namespace margelo::nitro::locationgeocoder::bridge::swift
|
|
1
|
+
///
|
|
2
|
+
/// NitroLocationGeocoder-Swift-Cxx-Bridge.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
// Forward declarations of C++ defined types
|
|
11
|
+
// Forward declaration of `HybridLocationGeocoderSpec` to properly resolve imports.
|
|
12
|
+
namespace margelo::nitro::locationgeocoder { class HybridLocationGeocoderSpec; }
|
|
13
|
+
// Forward declaration of `LocationGeocoderResult` to properly resolve imports.
|
|
14
|
+
namespace margelo::nitro::locationgeocoder { struct LocationGeocoderResult; }
|
|
15
|
+
|
|
16
|
+
// Forward declarations of Swift defined types
|
|
17
|
+
// Forward declaration of `HybridLocationGeocoderSpec_cxx` to properly resolve imports.
|
|
18
|
+
namespace NitroLocationGeocoder { class HybridLocationGeocoderSpec_cxx; }
|
|
19
|
+
|
|
20
|
+
// Include C++ defined types
|
|
21
|
+
#include "HybridLocationGeocoderSpec.hpp"
|
|
22
|
+
#include "LocationGeocoderResult.hpp"
|
|
23
|
+
#include <NitroModules/Promise.hpp>
|
|
24
|
+
#include <NitroModules/PromiseHolder.hpp>
|
|
25
|
+
#include <NitroModules/Result.hpp>
|
|
26
|
+
#include <exception>
|
|
27
|
+
#include <functional>
|
|
28
|
+
#include <memory>
|
|
29
|
+
#include <string>
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Contains specialized versions of C++ templated types so they can be accessed from Swift,
|
|
33
|
+
* as well as helper functions to interact with those C++ types from Swift.
|
|
34
|
+
*/
|
|
35
|
+
namespace margelo::nitro::locationgeocoder::bridge::swift {
|
|
36
|
+
|
|
37
|
+
// pragma MARK: std::shared_ptr<Promise<LocationGeocoderResult>>
|
|
38
|
+
/**
|
|
39
|
+
* Specialized version of `std::shared_ptr<Promise<LocationGeocoderResult>>`.
|
|
40
|
+
*/
|
|
41
|
+
using std__shared_ptr_Promise_LocationGeocoderResult__ = std::shared_ptr<Promise<LocationGeocoderResult>>;
|
|
42
|
+
inline std::shared_ptr<Promise<LocationGeocoderResult>> create_std__shared_ptr_Promise_LocationGeocoderResult__() noexcept {
|
|
43
|
+
return Promise<LocationGeocoderResult>::create();
|
|
44
|
+
}
|
|
45
|
+
inline PromiseHolder<LocationGeocoderResult> wrap_std__shared_ptr_Promise_LocationGeocoderResult__(std::shared_ptr<Promise<LocationGeocoderResult>> promise) noexcept {
|
|
46
|
+
return PromiseHolder<LocationGeocoderResult>(std::move(promise));
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// pragma MARK: std::function<void(const LocationGeocoderResult& /* result */)>
|
|
50
|
+
/**
|
|
51
|
+
* Specialized version of `std::function<void(const LocationGeocoderResult&)>`.
|
|
52
|
+
*/
|
|
53
|
+
using Func_void_LocationGeocoderResult = std::function<void(const LocationGeocoderResult& /* result */)>;
|
|
54
|
+
/**
|
|
55
|
+
* Wrapper class for a `std::function<void(const LocationGeocoderResult& / * result * /)>`, this can be used from Swift.
|
|
56
|
+
*/
|
|
57
|
+
class Func_void_LocationGeocoderResult_Wrapper final {
|
|
58
|
+
public:
|
|
59
|
+
explicit Func_void_LocationGeocoderResult_Wrapper(std::function<void(const LocationGeocoderResult& /* result */)>&& func): _function(std::make_unique<std::function<void(const LocationGeocoderResult& /* result */)>>(std::move(func))) {}
|
|
60
|
+
inline void call(LocationGeocoderResult result) const noexcept {
|
|
61
|
+
_function->operator()(result);
|
|
62
|
+
}
|
|
63
|
+
private:
|
|
64
|
+
std::unique_ptr<std::function<void(const LocationGeocoderResult& /* result */)>> _function;
|
|
65
|
+
} SWIFT_NONCOPYABLE;
|
|
66
|
+
Func_void_LocationGeocoderResult create_Func_void_LocationGeocoderResult(void* NON_NULL swiftClosureWrapper) noexcept;
|
|
67
|
+
inline Func_void_LocationGeocoderResult_Wrapper wrap_Func_void_LocationGeocoderResult(Func_void_LocationGeocoderResult value) noexcept {
|
|
68
|
+
return Func_void_LocationGeocoderResult_Wrapper(std::move(value));
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// pragma MARK: std::function<void(const std::exception_ptr& /* error */)>
|
|
72
|
+
/**
|
|
73
|
+
* Specialized version of `std::function<void(const std::exception_ptr&)>`.
|
|
74
|
+
*/
|
|
75
|
+
using Func_void_std__exception_ptr = std::function<void(const std::exception_ptr& /* error */)>;
|
|
76
|
+
/**
|
|
77
|
+
* Wrapper class for a `std::function<void(const std::exception_ptr& / * error * /)>`, this can be used from Swift.
|
|
78
|
+
*/
|
|
79
|
+
class Func_void_std__exception_ptr_Wrapper final {
|
|
80
|
+
public:
|
|
81
|
+
explicit Func_void_std__exception_ptr_Wrapper(std::function<void(const std::exception_ptr& /* error */)>&& func): _function(std::make_unique<std::function<void(const std::exception_ptr& /* error */)>>(std::move(func))) {}
|
|
82
|
+
inline void call(std::exception_ptr error) const noexcept {
|
|
83
|
+
_function->operator()(error);
|
|
84
|
+
}
|
|
85
|
+
private:
|
|
86
|
+
std::unique_ptr<std::function<void(const std::exception_ptr& /* error */)>> _function;
|
|
87
|
+
} SWIFT_NONCOPYABLE;
|
|
88
|
+
Func_void_std__exception_ptr create_Func_void_std__exception_ptr(void* NON_NULL swiftClosureWrapper) noexcept;
|
|
89
|
+
inline Func_void_std__exception_ptr_Wrapper wrap_Func_void_std__exception_ptr(Func_void_std__exception_ptr value) noexcept {
|
|
90
|
+
return Func_void_std__exception_ptr_Wrapper(std::move(value));
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// pragma MARK: std::shared_ptr<HybridLocationGeocoderSpec>
|
|
94
|
+
/**
|
|
95
|
+
* Specialized version of `std::shared_ptr<HybridLocationGeocoderSpec>`.
|
|
96
|
+
*/
|
|
97
|
+
using std__shared_ptr_HybridLocationGeocoderSpec_ = std::shared_ptr<HybridLocationGeocoderSpec>;
|
|
98
|
+
std::shared_ptr<HybridLocationGeocoderSpec> create_std__shared_ptr_HybridLocationGeocoderSpec_(void* NON_NULL swiftUnsafePointer) noexcept;
|
|
99
|
+
void* NON_NULL get_std__shared_ptr_HybridLocationGeocoderSpec_(std__shared_ptr_HybridLocationGeocoderSpec_ cppType);
|
|
100
|
+
|
|
101
|
+
// pragma MARK: std::weak_ptr<HybridLocationGeocoderSpec>
|
|
102
|
+
using std__weak_ptr_HybridLocationGeocoderSpec_ = std::weak_ptr<HybridLocationGeocoderSpec>;
|
|
103
|
+
inline std__weak_ptr_HybridLocationGeocoderSpec_ weakify_std__shared_ptr_HybridLocationGeocoderSpec_(const std::shared_ptr<HybridLocationGeocoderSpec>& strong) noexcept { return strong; }
|
|
104
|
+
|
|
105
|
+
// pragma MARK: Result<std::shared_ptr<Promise<LocationGeocoderResult>>>
|
|
106
|
+
using Result_std__shared_ptr_Promise_LocationGeocoderResult___ = Result<std::shared_ptr<Promise<LocationGeocoderResult>>>;
|
|
107
|
+
inline Result_std__shared_ptr_Promise_LocationGeocoderResult___ create_Result_std__shared_ptr_Promise_LocationGeocoderResult___(const std::shared_ptr<Promise<LocationGeocoderResult>>& value) noexcept {
|
|
108
|
+
return Result<std::shared_ptr<Promise<LocationGeocoderResult>>>::withValue(value);
|
|
109
|
+
}
|
|
110
|
+
inline Result_std__shared_ptr_Promise_LocationGeocoderResult___ create_Result_std__shared_ptr_Promise_LocationGeocoderResult___(const std::exception_ptr& error) noexcept {
|
|
111
|
+
return Result<std::shared_ptr<Promise<LocationGeocoderResult>>>::withError(error);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
} // namespace margelo::nitro::locationgeocoder::bridge::swift
|
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
///
|
|
2
|
-
/// NitroLocationGeocoder-Swift-Cxx-Umbrella.hpp
|
|
3
|
-
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
-
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
-
///
|
|
7
|
-
|
|
8
|
-
#pragma once
|
|
9
|
-
|
|
10
|
-
// Forward declarations of C++ defined types
|
|
11
|
-
// Forward declaration of `HybridLocationGeocoderSpec` to properly resolve imports.
|
|
12
|
-
namespace margelo::nitro::locationgeocoder { class HybridLocationGeocoderSpec; }
|
|
13
|
-
// Forward declaration of `LocationGeocoderResult` to properly resolve imports.
|
|
14
|
-
namespace margelo::nitro::locationgeocoder { struct LocationGeocoderResult; }
|
|
15
|
-
|
|
16
|
-
// Include C++ defined types
|
|
17
|
-
#include "HybridLocationGeocoderSpec.hpp"
|
|
18
|
-
#include "LocationGeocoderResult.hpp"
|
|
19
|
-
#include <NitroModules/Promise.hpp>
|
|
20
|
-
#include <NitroModules/Result.hpp>
|
|
21
|
-
#include <exception>
|
|
22
|
-
#include <memory>
|
|
23
|
-
#include <string>
|
|
24
|
-
|
|
25
|
-
// C++ helpers for Swift
|
|
26
|
-
#include "NitroLocationGeocoder-Swift-Cxx-Bridge.hpp"
|
|
27
|
-
|
|
28
|
-
// Common C++ types used in Swift
|
|
29
|
-
#include <NitroModules/ArrayBufferHolder.hpp>
|
|
30
|
-
#include <NitroModules/AnyMapUtils.hpp>
|
|
31
|
-
#include <NitroModules/RuntimeError.hpp>
|
|
32
|
-
#include <NitroModules/DateToChronoDate.hpp>
|
|
33
|
-
|
|
34
|
-
// Forward declarations of Swift defined types
|
|
35
|
-
// Forward declaration of `HybridLocationGeocoderSpec_cxx` to properly resolve imports.
|
|
36
|
-
namespace NitroLocationGeocoder { class HybridLocationGeocoderSpec_cxx; }
|
|
37
|
-
|
|
38
|
-
// Include Swift defined types
|
|
39
|
-
#if __has_include("NitroLocationGeocoder-Swift.h")
|
|
40
|
-
// This header is generated by Xcode/Swift on every app build.
|
|
41
|
-
// If it cannot be found, make sure the Swift module's name (= podspec name) is actually "NitroLocationGeocoder".
|
|
42
|
-
#include "NitroLocationGeocoder-Swift.h"
|
|
43
|
-
// Same as above, but used when building with frameworks (`use_frameworks`)
|
|
44
|
-
#elif __has_include(<NitroLocationGeocoder/NitroLocationGeocoder-Swift.h>)
|
|
45
|
-
#include <NitroLocationGeocoder/NitroLocationGeocoder-Swift.h>
|
|
46
|
-
#else
|
|
47
|
-
#error NitroLocationGeocoder's autogenerated Swift header cannot be found! Make sure the Swift module's name (= podspec name) is actually "NitroLocationGeocoder", and try building the app first.
|
|
48
|
-
#endif
|
|
1
|
+
///
|
|
2
|
+
/// NitroLocationGeocoder-Swift-Cxx-Umbrella.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
// Forward declarations of C++ defined types
|
|
11
|
+
// Forward declaration of `HybridLocationGeocoderSpec` to properly resolve imports.
|
|
12
|
+
namespace margelo::nitro::locationgeocoder { class HybridLocationGeocoderSpec; }
|
|
13
|
+
// Forward declaration of `LocationGeocoderResult` to properly resolve imports.
|
|
14
|
+
namespace margelo::nitro::locationgeocoder { struct LocationGeocoderResult; }
|
|
15
|
+
|
|
16
|
+
// Include C++ defined types
|
|
17
|
+
#include "HybridLocationGeocoderSpec.hpp"
|
|
18
|
+
#include "LocationGeocoderResult.hpp"
|
|
19
|
+
#include <NitroModules/Promise.hpp>
|
|
20
|
+
#include <NitroModules/Result.hpp>
|
|
21
|
+
#include <exception>
|
|
22
|
+
#include <memory>
|
|
23
|
+
#include <string>
|
|
24
|
+
|
|
25
|
+
// C++ helpers for Swift
|
|
26
|
+
#include "NitroLocationGeocoder-Swift-Cxx-Bridge.hpp"
|
|
27
|
+
|
|
28
|
+
// Common C++ types used in Swift
|
|
29
|
+
#include <NitroModules/ArrayBufferHolder.hpp>
|
|
30
|
+
#include <NitroModules/AnyMapUtils.hpp>
|
|
31
|
+
#include <NitroModules/RuntimeError.hpp>
|
|
32
|
+
#include <NitroModules/DateToChronoDate.hpp>
|
|
33
|
+
|
|
34
|
+
// Forward declarations of Swift defined types
|
|
35
|
+
// Forward declaration of `HybridLocationGeocoderSpec_cxx` to properly resolve imports.
|
|
36
|
+
namespace NitroLocationGeocoder { class HybridLocationGeocoderSpec_cxx; }
|
|
37
|
+
|
|
38
|
+
// Include Swift defined types
|
|
39
|
+
#if __has_include("NitroLocationGeocoder-Swift.h")
|
|
40
|
+
// This header is generated by Xcode/Swift on every app build.
|
|
41
|
+
// If it cannot be found, make sure the Swift module's name (= podspec name) is actually "NitroLocationGeocoder".
|
|
42
|
+
#include "NitroLocationGeocoder-Swift.h"
|
|
43
|
+
// Same as above, but used when building with frameworks (`use_frameworks`)
|
|
44
|
+
#elif __has_include(<NitroLocationGeocoder/NitroLocationGeocoder-Swift.h>)
|
|
45
|
+
#include <NitroLocationGeocoder/NitroLocationGeocoder-Swift.h>
|
|
46
|
+
#else
|
|
47
|
+
#error NitroLocationGeocoder's autogenerated Swift header cannot be found! Make sure the Swift module's name (= podspec name) is actually "NitroLocationGeocoder", and try building the app first.
|
|
48
|
+
#endif
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
///
|
|
2
|
-
/// NitroLocationGeocoderAutolinking.mm
|
|
3
|
-
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
-
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
-
///
|
|
7
|
-
|
|
8
|
-
#import <Foundation/Foundation.h>
|
|
9
|
-
#import <NitroModules/HybridObjectRegistry.hpp>
|
|
10
|
-
#import "NitroLocationGeocoder-Swift-Cxx-Umbrella.hpp"
|
|
11
|
-
#import <type_traits>
|
|
12
|
-
|
|
13
|
-
#include "HybridLocationGeocoderSpecSwift.hpp"
|
|
14
|
-
|
|
15
|
-
@interface NitroLocationGeocoderAutolinking : NSObject
|
|
16
|
-
@end
|
|
17
|
-
|
|
18
|
-
@implementation NitroLocationGeocoderAutolinking
|
|
19
|
-
|
|
20
|
-
+ (void) load {
|
|
21
|
-
using namespace margelo::nitro;
|
|
22
|
-
using namespace margelo::nitro::locationgeocoder;
|
|
23
|
-
|
|
24
|
-
HybridObjectRegistry::registerHybridObjectConstructor(
|
|
25
|
-
"LocationGeocoder",
|
|
26
|
-
[]() -> std::shared_ptr<HybridObject> {
|
|
27
|
-
std::shared_ptr<HybridLocationGeocoderSpec> hybridObject = NitroLocationGeocoder::NitroLocationGeocoderAutolinking::createLocationGeocoder();
|
|
28
|
-
return hybridObject;
|
|
29
|
-
}
|
|
30
|
-
);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
@end
|
|
1
|
+
///
|
|
2
|
+
/// NitroLocationGeocoderAutolinking.mm
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#import <Foundation/Foundation.h>
|
|
9
|
+
#import <NitroModules/HybridObjectRegistry.hpp>
|
|
10
|
+
#import "NitroLocationGeocoder-Swift-Cxx-Umbrella.hpp"
|
|
11
|
+
#import <type_traits>
|
|
12
|
+
|
|
13
|
+
#include "HybridLocationGeocoderSpecSwift.hpp"
|
|
14
|
+
|
|
15
|
+
@interface NitroLocationGeocoderAutolinking : NSObject
|
|
16
|
+
@end
|
|
17
|
+
|
|
18
|
+
@implementation NitroLocationGeocoderAutolinking
|
|
19
|
+
|
|
20
|
+
+ (void) load {
|
|
21
|
+
using namespace margelo::nitro;
|
|
22
|
+
using namespace margelo::nitro::locationgeocoder;
|
|
23
|
+
|
|
24
|
+
HybridObjectRegistry::registerHybridObjectConstructor(
|
|
25
|
+
"LocationGeocoder",
|
|
26
|
+
[]() -> std::shared_ptr<HybridObject> {
|
|
27
|
+
std::shared_ptr<HybridLocationGeocoderSpec> hybridObject = NitroLocationGeocoder::NitroLocationGeocoderAutolinking::createLocationGeocoder();
|
|
28
|
+
return hybridObject;
|
|
29
|
+
}
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
@end
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
///
|
|
2
|
-
/// NitroLocationGeocoderAutolinking.swift
|
|
3
|
-
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
-
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
-
///
|
|
7
|
-
|
|
8
|
-
import NitroModules
|
|
9
|
-
|
|
10
|
-
// TODO: Use empty enums once Swift supports exporting them as namespaces
|
|
11
|
-
// See: https://github.com/swiftlang/swift/pull/83616
|
|
12
|
-
public final class NitroLocationGeocoderAutolinking {
|
|
13
|
-
public typealias bridge = margelo.nitro.locationgeocoder.bridge.swift
|
|
14
|
-
|
|
15
|
-
public static func createLocationGeocoder() -> bridge.std__shared_ptr_HybridLocationGeocoderSpec_ {
|
|
16
|
-
let hybridObject = HybridLocationGeocoder()
|
|
17
|
-
return { () -> bridge.std__shared_ptr_HybridLocationGeocoderSpec_ in
|
|
18
|
-
let __cxxWrapped = hybridObject.getCxxWrapper()
|
|
19
|
-
return __cxxWrapped.getCxxPart()
|
|
20
|
-
}()
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
public static func isLocationGeocoderRecyclable() -> Bool {
|
|
24
|
-
return HybridLocationGeocoder.self is any RecyclableView.Type
|
|
25
|
-
}
|
|
26
|
-
}
|
|
1
|
+
///
|
|
2
|
+
/// NitroLocationGeocoderAutolinking.swift
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
import NitroModules
|
|
9
|
+
|
|
10
|
+
// TODO: Use empty enums once Swift supports exporting them as namespaces
|
|
11
|
+
// See: https://github.com/swiftlang/swift/pull/83616
|
|
12
|
+
public final class NitroLocationGeocoderAutolinking {
|
|
13
|
+
public typealias bridge = margelo.nitro.locationgeocoder.bridge.swift
|
|
14
|
+
|
|
15
|
+
public static func createLocationGeocoder() -> bridge.std__shared_ptr_HybridLocationGeocoderSpec_ {
|
|
16
|
+
let hybridObject = HybridLocationGeocoder()
|
|
17
|
+
return { () -> bridge.std__shared_ptr_HybridLocationGeocoderSpec_ in
|
|
18
|
+
let __cxxWrapped = hybridObject.getCxxWrapper()
|
|
19
|
+
return __cxxWrapped.getCxxPart()
|
|
20
|
+
}()
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
public static func isLocationGeocoderRecyclable() -> Bool {
|
|
24
|
+
return HybridLocationGeocoder.self is any RecyclableView.Type
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
///
|
|
2
|
-
/// HybridLocationGeocoderSpecSwift.cpp
|
|
3
|
-
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
-
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
-
///
|
|
7
|
-
|
|
8
|
-
#include "HybridLocationGeocoderSpecSwift.hpp"
|
|
9
|
-
|
|
10
|
-
namespace margelo::nitro::locationgeocoder {
|
|
11
|
-
} // namespace margelo::nitro::locationgeocoder
|
|
1
|
+
///
|
|
2
|
+
/// HybridLocationGeocoderSpecSwift.cpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#include "HybridLocationGeocoderSpecSwift.hpp"
|
|
9
|
+
|
|
10
|
+
namespace margelo::nitro::locationgeocoder {
|
|
11
|
+
} // namespace margelo::nitro::locationgeocoder
|
|
@@ -1,85 +1,85 @@
|
|
|
1
|
-
///
|
|
2
|
-
/// HybridLocationGeocoderSpecSwift.hpp
|
|
3
|
-
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
-
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
-
///
|
|
7
|
-
|
|
8
|
-
#pragma once
|
|
9
|
-
|
|
10
|
-
#include "HybridLocationGeocoderSpec.hpp"
|
|
11
|
-
|
|
12
|
-
// Forward declaration of `HybridLocationGeocoderSpec_cxx` to properly resolve imports.
|
|
13
|
-
namespace NitroLocationGeocoder { class HybridLocationGeocoderSpec_cxx; }
|
|
14
|
-
|
|
15
|
-
// Forward declaration of `LocationGeocoderResult` to properly resolve imports.
|
|
16
|
-
namespace margelo::nitro::locationgeocoder { struct LocationGeocoderResult; }
|
|
17
|
-
|
|
18
|
-
#include "LocationGeocoderResult.hpp"
|
|
19
|
-
#include <NitroModules/Promise.hpp>
|
|
20
|
-
#include <string>
|
|
21
|
-
|
|
22
|
-
#include "NitroLocationGeocoder-Swift-Cxx-Umbrella.hpp"
|
|
23
|
-
|
|
24
|
-
namespace margelo::nitro::locationgeocoder {
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* The C++ part of HybridLocationGeocoderSpec_cxx.swift.
|
|
28
|
-
*
|
|
29
|
-
* HybridLocationGeocoderSpecSwift (C++) accesses HybridLocationGeocoderSpec_cxx (Swift), and might
|
|
30
|
-
* contain some additional bridging code for C++ <> Swift interop.
|
|
31
|
-
*
|
|
32
|
-
* Since this obviously introduces an overhead, I hope at some point in
|
|
33
|
-
* the future, HybridLocationGeocoderSpec_cxx can directly inherit from the C++ class HybridLocationGeocoderSpec
|
|
34
|
-
* to simplify the whole structure and memory management.
|
|
35
|
-
*/
|
|
36
|
-
class HybridLocationGeocoderSpecSwift: public virtual HybridLocationGeocoderSpec {
|
|
37
|
-
public:
|
|
38
|
-
// Constructor from a Swift instance
|
|
39
|
-
explicit HybridLocationGeocoderSpecSwift(const NitroLocationGeocoder::HybridLocationGeocoderSpec_cxx& swiftPart):
|
|
40
|
-
HybridObject(HybridLocationGeocoderSpec::TAG),
|
|
41
|
-
_swiftPart(swiftPart) { }
|
|
42
|
-
|
|
43
|
-
public:
|
|
44
|
-
// Get the Swift part
|
|
45
|
-
inline NitroLocationGeocoder::HybridLocationGeocoderSpec_cxx& getSwiftPart() noexcept {
|
|
46
|
-
return _swiftPart;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
public:
|
|
50
|
-
inline size_t getExternalMemorySize() noexcept override {
|
|
51
|
-
return _swiftPart.getMemorySize();
|
|
52
|
-
}
|
|
53
|
-
bool equals(const std::shared_ptr<HybridObject>& other) override {
|
|
54
|
-
if (auto otherCast = std::dynamic_pointer_cast<HybridLocationGeocoderSpecSwift>(other)) {
|
|
55
|
-
return _swiftPart.equals(otherCast->_swiftPart);
|
|
56
|
-
}
|
|
57
|
-
return false;
|
|
58
|
-
}
|
|
59
|
-
void dispose() noexcept override {
|
|
60
|
-
_swiftPart.dispose();
|
|
61
|
-
}
|
|
62
|
-
std::string toString() override {
|
|
63
|
-
return _swiftPart.toString();
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
public:
|
|
67
|
-
// Properties
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
public:
|
|
71
|
-
// Methods
|
|
72
|
-
inline std::shared_ptr<Promise<LocationGeocoderResult>> reverseGeocode(double latitude, double longitude, const std::string& locale) override {
|
|
73
|
-
auto __result = _swiftPart.reverseGeocode(std::forward<decltype(latitude)>(latitude), std::forward<decltype(longitude)>(longitude), locale);
|
|
74
|
-
if (__result.hasError()) [[unlikely]] {
|
|
75
|
-
std::rethrow_exception(__result.error());
|
|
76
|
-
}
|
|
77
|
-
auto __value = std::move(__result.value());
|
|
78
|
-
return __value;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
private:
|
|
82
|
-
NitroLocationGeocoder::HybridLocationGeocoderSpec_cxx _swiftPart;
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
} // namespace margelo::nitro::locationgeocoder
|
|
1
|
+
///
|
|
2
|
+
/// HybridLocationGeocoderSpecSwift.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#include "HybridLocationGeocoderSpec.hpp"
|
|
11
|
+
|
|
12
|
+
// Forward declaration of `HybridLocationGeocoderSpec_cxx` to properly resolve imports.
|
|
13
|
+
namespace NitroLocationGeocoder { class HybridLocationGeocoderSpec_cxx; }
|
|
14
|
+
|
|
15
|
+
// Forward declaration of `LocationGeocoderResult` to properly resolve imports.
|
|
16
|
+
namespace margelo::nitro::locationgeocoder { struct LocationGeocoderResult; }
|
|
17
|
+
|
|
18
|
+
#include "LocationGeocoderResult.hpp"
|
|
19
|
+
#include <NitroModules/Promise.hpp>
|
|
20
|
+
#include <string>
|
|
21
|
+
|
|
22
|
+
#include "NitroLocationGeocoder-Swift-Cxx-Umbrella.hpp"
|
|
23
|
+
|
|
24
|
+
namespace margelo::nitro::locationgeocoder {
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* The C++ part of HybridLocationGeocoderSpec_cxx.swift.
|
|
28
|
+
*
|
|
29
|
+
* HybridLocationGeocoderSpecSwift (C++) accesses HybridLocationGeocoderSpec_cxx (Swift), and might
|
|
30
|
+
* contain some additional bridging code for C++ <> Swift interop.
|
|
31
|
+
*
|
|
32
|
+
* Since this obviously introduces an overhead, I hope at some point in
|
|
33
|
+
* the future, HybridLocationGeocoderSpec_cxx can directly inherit from the C++ class HybridLocationGeocoderSpec
|
|
34
|
+
* to simplify the whole structure and memory management.
|
|
35
|
+
*/
|
|
36
|
+
class HybridLocationGeocoderSpecSwift: public virtual HybridLocationGeocoderSpec {
|
|
37
|
+
public:
|
|
38
|
+
// Constructor from a Swift instance
|
|
39
|
+
explicit HybridLocationGeocoderSpecSwift(const NitroLocationGeocoder::HybridLocationGeocoderSpec_cxx& swiftPart):
|
|
40
|
+
HybridObject(HybridLocationGeocoderSpec::TAG),
|
|
41
|
+
_swiftPart(swiftPart) { }
|
|
42
|
+
|
|
43
|
+
public:
|
|
44
|
+
// Get the Swift part
|
|
45
|
+
inline NitroLocationGeocoder::HybridLocationGeocoderSpec_cxx& getSwiftPart() noexcept {
|
|
46
|
+
return _swiftPart;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
public:
|
|
50
|
+
inline size_t getExternalMemorySize() noexcept override {
|
|
51
|
+
return _swiftPart.getMemorySize();
|
|
52
|
+
}
|
|
53
|
+
bool equals(const std::shared_ptr<HybridObject>& other) override {
|
|
54
|
+
if (auto otherCast = std::dynamic_pointer_cast<HybridLocationGeocoderSpecSwift>(other)) {
|
|
55
|
+
return _swiftPart.equals(otherCast->_swiftPart);
|
|
56
|
+
}
|
|
57
|
+
return false;
|
|
58
|
+
}
|
|
59
|
+
void dispose() noexcept override {
|
|
60
|
+
_swiftPart.dispose();
|
|
61
|
+
}
|
|
62
|
+
std::string toString() override {
|
|
63
|
+
return _swiftPart.toString();
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
public:
|
|
67
|
+
// Properties
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
public:
|
|
71
|
+
// Methods
|
|
72
|
+
inline std::shared_ptr<Promise<LocationGeocoderResult>> reverseGeocode(double latitude, double longitude, const std::string& locale) override {
|
|
73
|
+
auto __result = _swiftPart.reverseGeocode(std::forward<decltype(latitude)>(latitude), std::forward<decltype(longitude)>(longitude), locale);
|
|
74
|
+
if (__result.hasError()) [[unlikely]] {
|
|
75
|
+
std::rethrow_exception(__result.error());
|
|
76
|
+
}
|
|
77
|
+
auto __value = std::move(__result.value());
|
|
78
|
+
return __value;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
private:
|
|
82
|
+
NitroLocationGeocoder::HybridLocationGeocoderSpec_cxx _swiftPart;
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
} // namespace margelo::nitro::locationgeocoder
|