react-native-carrot-quest 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/CarrotQuest.podspec +34 -0
- package/LICENSE +20 -0
- package/README.md +457 -0
- package/android/CMakeLists.txt +24 -0
- package/android/build.gradle +136 -0
- package/android/src/main/AndroidManifest.xml +2 -0
- package/android/src/main/cpp/cpp-adapter.cpp +11 -0
- package/android/src/main/java/com/margelo/nitro/carrotquest/CarrotQuest.kt +585 -0
- package/android/src/main/java/com/margelo/nitro/carrotquest/CarrotQuestPackage.kt +22 -0
- package/android/src/main/java/com/margelo/nitro/carrotquest/CarrotQuestSetup.kt +472 -0
- package/ios/CarrotQuest.swift +588 -0
- package/ios/CarrotQuestSetup.swift +333 -0
- package/lib/module/CarrotQuest.nitro.js +4 -0
- package/lib/module/CarrotQuest.nitro.js.map +1 -0
- package/lib/module/carrot-quest.js +136 -0
- package/lib/module/carrot-quest.js.map +1 -0
- package/lib/module/carrot-quest.native.js +155 -0
- package/lib/module/carrot-quest.native.js.map +1 -0
- package/lib/module/index.js +6 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/module/subscriptions.js +76 -0
- package/lib/module/subscriptions.js.map +1 -0
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/src/CarrotQuest.nitro.d.ts +394 -0
- package/lib/typescript/src/CarrotQuest.nitro.d.ts.map +1 -0
- package/lib/typescript/src/carrot-quest.d.ts +37 -0
- package/lib/typescript/src/carrot-quest.d.ts.map +1 -0
- package/lib/typescript/src/carrot-quest.native.d.ts +37 -0
- package/lib/typescript/src/carrot-quest.native.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +6 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/lib/typescript/src/subscriptions.d.ts +32 -0
- package/lib/typescript/src/subscriptions.d.ts.map +1 -0
- package/nitro.json +23 -0
- package/nitrogen/generated/android/c++/JCarrotQuestEventValue.cpp +30 -0
- package/nitrogen/generated/android/c++/JCarrotQuestEventValue.hpp +83 -0
- package/nitrogen/generated/android/c++/JCarrotQuestLogCategory.hpp +76 -0
- package/nitrogen/generated/android/c++/JCarrotQuestLogEntry.hpp +100 -0
- package/nitrogen/generated/android/c++/JCarrotQuestLogLevel.hpp +70 -0
- package/nitrogen/generated/android/c++/JCarrotQuestProperty.hpp +74 -0
- package/nitrogen/generated/android/c++/JCarrotQuestPropertyKind.hpp +61 -0
- package/nitrogen/generated/android/c++/JCarrotQuestPropertyOperation.hpp +73 -0
- package/nitrogen/generated/android/c++/JCarrotQuestSetupOptions.hpp +94 -0
- package/nitrogen/generated/android/c++/JCarrotQuestTheme.hpp +64 -0
- package/nitrogen/generated/android/c++/JCarrotQuestUrlSource.hpp +64 -0
- package/nitrogen/generated/android/c++/JCarrotQuestUserProperties.hpp +84 -0
- package/nitrogen/generated/android/c++/JFunc_void_CarrotQuestLogEntry.hpp +84 -0
- package/nitrogen/generated/android/c++/JFunc_void_bool.hpp +75 -0
- package/nitrogen/generated/android/c++/JFunc_void_double.hpp +75 -0
- package/nitrogen/generated/android/c++/JFunc_void_std__string.hpp +76 -0
- package/nitrogen/generated/android/c++/JHybridCarrotQuestSpec.cpp +388 -0
- package/nitrogen/generated/android/c++/JHybridCarrotQuestSpec.hpp +96 -0
- package/nitrogen/generated/android/carrotquest+autolinking.cmake +82 -0
- package/nitrogen/generated/android/carrotquest+autolinking.gradle +27 -0
- package/nitrogen/generated/android/carrotquestOnLoad.cpp +62 -0
- package/nitrogen/generated/android/carrotquestOnLoad.hpp +34 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/carrotquest/CarrotQuestEventValue.kt +75 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/carrotquest/CarrotQuestLogCategory.kt +29 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/carrotquest/CarrotQuestLogEntry.kt +81 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/carrotquest/CarrotQuestLogLevel.kt +27 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/carrotquest/CarrotQuestProperty.kt +66 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/carrotquest/CarrotQuestPropertyKind.kt +24 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/carrotquest/CarrotQuestPropertyOperation.kt +28 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/carrotquest/CarrotQuestSetupOptions.kt +91 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/carrotquest/CarrotQuestTheme.kt +25 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/carrotquest/CarrotQuestUrlSource.kt +25 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/carrotquest/CarrotQuestUserProperties.kt +66 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/carrotquest/Func_void_CarrotQuestLogEntry.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/carrotquest/Func_void_bool.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/carrotquest/Func_void_double.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/carrotquest/Func_void_std__string.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/carrotquest/HybridCarrotQuestSpec.kt +209 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/carrotquest/carrotquestOnLoad.kt +35 -0
- package/nitrogen/generated/ios/CarrotQuest+autolinking.rb +62 -0
- package/nitrogen/generated/ios/CarrotQuest-Swift-Cxx-Bridge.cpp +97 -0
- package/nitrogen/generated/ios/CarrotQuest-Swift-Cxx-Bridge.hpp +637 -0
- package/nitrogen/generated/ios/CarrotQuest-Swift-Cxx-Umbrella.hpp +80 -0
- package/nitrogen/generated/ios/CarrotQuestAutolinking.mm +33 -0
- package/nitrogen/generated/ios/CarrotQuestAutolinking.swift +26 -0
- package/nitrogen/generated/ios/c++/HybridCarrotQuestSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridCarrotQuestSpecSwift.hpp +344 -0
- package/nitrogen/generated/ios/swift/CarrotQuestEventValue.swift +32 -0
- package/nitrogen/generated/ios/swift/CarrotQuestLogCategory.swift +64 -0
- package/nitrogen/generated/ios/swift/CarrotQuestLogEntry.swift +86 -0
- package/nitrogen/generated/ios/swift/CarrotQuestLogLevel.swift +56 -0
- package/nitrogen/generated/ios/swift/CarrotQuestProperty.swift +56 -0
- package/nitrogen/generated/ios/swift/CarrotQuestPropertyKind.swift +44 -0
- package/nitrogen/generated/ios/swift/CarrotQuestPropertyOperation.swift +60 -0
- package/nitrogen/generated/ios/swift/CarrotQuestSetupOptions.swift +172 -0
- package/nitrogen/generated/ios/swift/CarrotQuestTheme.swift +48 -0
- package/nitrogen/generated/ios/swift/CarrotQuestUrlSource.swift +48 -0
- package/nitrogen/generated/ios/swift/CarrotQuestUserProperties.swift +110 -0
- package/nitrogen/generated/ios/swift/Func_void.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_CarrotQuestLogEntry.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_bool.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_double.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_std__exception_ptr.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_std__optional_double_.swift +53 -0
- package/nitrogen/generated/ios/swift/Func_void_std__optional_std__string_.swift +53 -0
- package/nitrogen/generated/ios/swift/Func_void_std__string.swift +46 -0
- package/nitrogen/generated/ios/swift/HybridCarrotQuestSpec.swift +88 -0
- package/nitrogen/generated/ios/swift/HybridCarrotQuestSpec_cxx.swift +674 -0
- package/nitrogen/generated/shared/c++/CarrotQuestLogCategory.hpp +100 -0
- package/nitrogen/generated/shared/c++/CarrotQuestLogEntry.hpp +114 -0
- package/nitrogen/generated/shared/c++/CarrotQuestLogLevel.hpp +92 -0
- package/nitrogen/generated/shared/c++/CarrotQuestProperty.hpp +101 -0
- package/nitrogen/generated/shared/c++/CarrotQuestPropertyKind.hpp +80 -0
- package/nitrogen/generated/shared/c++/CarrotQuestPropertyOperation.hpp +96 -0
- package/nitrogen/generated/shared/c++/CarrotQuestSetupOptions.hpp +121 -0
- package/nitrogen/generated/shared/c++/CarrotQuestTheme.hpp +84 -0
- package/nitrogen/generated/shared/c++/CarrotQuestUrlSource.hpp +84 -0
- package/nitrogen/generated/shared/c++/CarrotQuestUserProperties.hpp +97 -0
- package/nitrogen/generated/shared/c++/HybridCarrotQuestSpec.cpp +55 -0
- package/nitrogen/generated/shared/c++/HybridCarrotQuestSpec.hpp +118 -0
- package/package.json +140 -0
- package/src/CarrotQuest.nitro.ts +493 -0
- package/src/carrot-quest.native.tsx +241 -0
- package/src/carrot-quest.tsx +207 -0
- package/src/index.tsx +57 -0
- package/src/subscriptions.ts +83 -0
|
@@ -0,0 +1,637 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// CarrotQuest-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 `CarrotQuestLogCategory` to properly resolve imports.
|
|
12
|
+
namespace margelo::nitro::carrotquest { enum class CarrotQuestLogCategory; }
|
|
13
|
+
// Forward declaration of `CarrotQuestLogEntry` to properly resolve imports.
|
|
14
|
+
namespace margelo::nitro::carrotquest { struct CarrotQuestLogEntry; }
|
|
15
|
+
// Forward declaration of `CarrotQuestLogLevel` to properly resolve imports.
|
|
16
|
+
namespace margelo::nitro::carrotquest { enum class CarrotQuestLogLevel; }
|
|
17
|
+
// Forward declaration of `CarrotQuestPropertyKind` to properly resolve imports.
|
|
18
|
+
namespace margelo::nitro::carrotquest { enum class CarrotQuestPropertyKind; }
|
|
19
|
+
// Forward declaration of `CarrotQuestPropertyOperation` to properly resolve imports.
|
|
20
|
+
namespace margelo::nitro::carrotquest { enum class CarrotQuestPropertyOperation; }
|
|
21
|
+
// Forward declaration of `CarrotQuestProperty` to properly resolve imports.
|
|
22
|
+
namespace margelo::nitro::carrotquest { struct CarrotQuestProperty; }
|
|
23
|
+
// Forward declaration of `CarrotQuestSetupOptions` to properly resolve imports.
|
|
24
|
+
namespace margelo::nitro::carrotquest { struct CarrotQuestSetupOptions; }
|
|
25
|
+
// Forward declaration of `CarrotQuestTheme` to properly resolve imports.
|
|
26
|
+
namespace margelo::nitro::carrotquest { enum class CarrotQuestTheme; }
|
|
27
|
+
// Forward declaration of `HybridCarrotQuestSpec` to properly resolve imports.
|
|
28
|
+
namespace margelo::nitro::carrotquest { class HybridCarrotQuestSpec; }
|
|
29
|
+
|
|
30
|
+
// Forward declarations of Swift defined types
|
|
31
|
+
// Forward declaration of `HybridCarrotQuestSpec_cxx` to properly resolve imports.
|
|
32
|
+
namespace CarrotQuest { class HybridCarrotQuestSpec_cxx; }
|
|
33
|
+
|
|
34
|
+
// Include C++ defined types
|
|
35
|
+
#include "CarrotQuestLogCategory.hpp"
|
|
36
|
+
#include "CarrotQuestLogEntry.hpp"
|
|
37
|
+
#include "CarrotQuestLogLevel.hpp"
|
|
38
|
+
#include "CarrotQuestProperty.hpp"
|
|
39
|
+
#include "CarrotQuestPropertyKind.hpp"
|
|
40
|
+
#include "CarrotQuestPropertyOperation.hpp"
|
|
41
|
+
#include "CarrotQuestSetupOptions.hpp"
|
|
42
|
+
#include "CarrotQuestTheme.hpp"
|
|
43
|
+
#include "HybridCarrotQuestSpec.hpp"
|
|
44
|
+
#include <NitroModules/Promise.hpp>
|
|
45
|
+
#include <NitroModules/PromiseHolder.hpp>
|
|
46
|
+
#include <NitroModules/Result.hpp>
|
|
47
|
+
#include <exception>
|
|
48
|
+
#include <functional>
|
|
49
|
+
#include <memory>
|
|
50
|
+
#include <optional>
|
|
51
|
+
#include <string>
|
|
52
|
+
#include <unordered_map>
|
|
53
|
+
#include <variant>
|
|
54
|
+
#include <vector>
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Contains specialized versions of C++ templated types so they can be accessed from Swift,
|
|
58
|
+
* as well as helper functions to interact with those C++ types from Swift.
|
|
59
|
+
*/
|
|
60
|
+
namespace margelo::nitro::carrotquest::bridge::swift {
|
|
61
|
+
|
|
62
|
+
// pragma MARK: std::shared_ptr<Promise<void>>
|
|
63
|
+
/**
|
|
64
|
+
* Specialized version of `std::shared_ptr<Promise<void>>`.
|
|
65
|
+
*/
|
|
66
|
+
using std__shared_ptr_Promise_void__ = std::shared_ptr<Promise<void>>;
|
|
67
|
+
inline std::shared_ptr<Promise<void>> create_std__shared_ptr_Promise_void__() noexcept {
|
|
68
|
+
return Promise<void>::create();
|
|
69
|
+
}
|
|
70
|
+
inline PromiseHolder<void> wrap_std__shared_ptr_Promise_void__(std::shared_ptr<Promise<void>> promise) noexcept {
|
|
71
|
+
return PromiseHolder<void>(std::move(promise));
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// pragma MARK: std::function<void()>
|
|
75
|
+
/**
|
|
76
|
+
* Specialized version of `std::function<void()>`.
|
|
77
|
+
*/
|
|
78
|
+
using Func_void = std::function<void()>;
|
|
79
|
+
/**
|
|
80
|
+
* Wrapper class for a `std::function<void()>`, this can be used from Swift.
|
|
81
|
+
*/
|
|
82
|
+
class Func_void_Wrapper final {
|
|
83
|
+
public:
|
|
84
|
+
explicit Func_void_Wrapper(std::function<void()>&& func): _function(std::make_unique<std::function<void()>>(std::move(func))) {}
|
|
85
|
+
inline void call() const noexcept {
|
|
86
|
+
_function->operator()();
|
|
87
|
+
}
|
|
88
|
+
private:
|
|
89
|
+
std::unique_ptr<std::function<void()>> _function;
|
|
90
|
+
} SWIFT_NONCOPYABLE;
|
|
91
|
+
Func_void create_Func_void(void* NON_NULL swiftClosureWrapper) noexcept;
|
|
92
|
+
inline Func_void_Wrapper wrap_Func_void(Func_void value) noexcept {
|
|
93
|
+
return Func_void_Wrapper(std::move(value));
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// pragma MARK: std::function<void(const std::exception_ptr& /* error */)>
|
|
97
|
+
/**
|
|
98
|
+
* Specialized version of `std::function<void(const std::exception_ptr&)>`.
|
|
99
|
+
*/
|
|
100
|
+
using Func_void_std__exception_ptr = std::function<void(const std::exception_ptr& /* error */)>;
|
|
101
|
+
/**
|
|
102
|
+
* Wrapper class for a `std::function<void(const std::exception_ptr& / * error * /)>`, this can be used from Swift.
|
|
103
|
+
*/
|
|
104
|
+
class Func_void_std__exception_ptr_Wrapper final {
|
|
105
|
+
public:
|
|
106
|
+
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))) {}
|
|
107
|
+
inline void call(std::exception_ptr error) const noexcept {
|
|
108
|
+
_function->operator()(error);
|
|
109
|
+
}
|
|
110
|
+
private:
|
|
111
|
+
std::unique_ptr<std::function<void(const std::exception_ptr& /* error */)>> _function;
|
|
112
|
+
} SWIFT_NONCOPYABLE;
|
|
113
|
+
Func_void_std__exception_ptr create_Func_void_std__exception_ptr(void* NON_NULL swiftClosureWrapper) noexcept;
|
|
114
|
+
inline Func_void_std__exception_ptr_Wrapper wrap_Func_void_std__exception_ptr(Func_void_std__exception_ptr value) noexcept {
|
|
115
|
+
return Func_void_std__exception_ptr_Wrapper(std::move(value));
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
// pragma MARK: std::optional<std::string>
|
|
119
|
+
/**
|
|
120
|
+
* Specialized version of `std::optional<std::string>`.
|
|
121
|
+
*/
|
|
122
|
+
using std__optional_std__string_ = std::optional<std::string>;
|
|
123
|
+
inline std::optional<std::string> create_std__optional_std__string_(const std::string& value) noexcept {
|
|
124
|
+
return std::optional<std::string>(value);
|
|
125
|
+
}
|
|
126
|
+
inline bool has_value_std__optional_std__string_(const std::optional<std::string>& optional) noexcept {
|
|
127
|
+
return optional.has_value();
|
|
128
|
+
}
|
|
129
|
+
inline std::string get_std__optional_std__string_(const std::optional<std::string>& optional) noexcept {
|
|
130
|
+
return optional.value();
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
// pragma MARK: std::optional<CarrotQuestTheme>
|
|
134
|
+
/**
|
|
135
|
+
* Specialized version of `std::optional<CarrotQuestTheme>`.
|
|
136
|
+
*/
|
|
137
|
+
using std__optional_CarrotQuestTheme_ = std::optional<CarrotQuestTheme>;
|
|
138
|
+
inline std::optional<CarrotQuestTheme> create_std__optional_CarrotQuestTheme_(const CarrotQuestTheme& value) noexcept {
|
|
139
|
+
return std::optional<CarrotQuestTheme>(value);
|
|
140
|
+
}
|
|
141
|
+
inline bool has_value_std__optional_CarrotQuestTheme_(const std::optional<CarrotQuestTheme>& optional) noexcept {
|
|
142
|
+
return optional.has_value();
|
|
143
|
+
}
|
|
144
|
+
inline CarrotQuestTheme get_std__optional_CarrotQuestTheme_(const std::optional<CarrotQuestTheme>& optional) noexcept {
|
|
145
|
+
return optional.value();
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
// pragma MARK: std::optional<bool>
|
|
149
|
+
/**
|
|
150
|
+
* Specialized version of `std::optional<bool>`.
|
|
151
|
+
*/
|
|
152
|
+
using std__optional_bool_ = std::optional<bool>;
|
|
153
|
+
inline std::optional<bool> create_std__optional_bool_(const bool& value) noexcept {
|
|
154
|
+
return std::optional<bool>(value);
|
|
155
|
+
}
|
|
156
|
+
inline bool has_value_std__optional_bool_(const std::optional<bool>& optional) noexcept {
|
|
157
|
+
return optional.has_value();
|
|
158
|
+
}
|
|
159
|
+
inline bool get_std__optional_bool_(const std::optional<bool>& optional) noexcept {
|
|
160
|
+
return optional.value();
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
// pragma MARK: std::optional<CarrotQuestLogLevel>
|
|
164
|
+
/**
|
|
165
|
+
* Specialized version of `std::optional<CarrotQuestLogLevel>`.
|
|
166
|
+
*/
|
|
167
|
+
using std__optional_CarrotQuestLogLevel_ = std::optional<CarrotQuestLogLevel>;
|
|
168
|
+
inline std::optional<CarrotQuestLogLevel> create_std__optional_CarrotQuestLogLevel_(const CarrotQuestLogLevel& value) noexcept {
|
|
169
|
+
return std::optional<CarrotQuestLogLevel>(value);
|
|
170
|
+
}
|
|
171
|
+
inline bool has_value_std__optional_CarrotQuestLogLevel_(const std::optional<CarrotQuestLogLevel>& optional) noexcept {
|
|
172
|
+
return optional.has_value();
|
|
173
|
+
}
|
|
174
|
+
inline CarrotQuestLogLevel get_std__optional_CarrotQuestLogLevel_(const std::optional<CarrotQuestLogLevel>& optional) noexcept {
|
|
175
|
+
return optional.value();
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
// pragma MARK: std::optional<CarrotQuestSetupOptions>
|
|
179
|
+
/**
|
|
180
|
+
* Specialized version of `std::optional<CarrotQuestSetupOptions>`.
|
|
181
|
+
*/
|
|
182
|
+
using std__optional_CarrotQuestSetupOptions_ = std::optional<CarrotQuestSetupOptions>;
|
|
183
|
+
inline std::optional<CarrotQuestSetupOptions> create_std__optional_CarrotQuestSetupOptions_(const CarrotQuestSetupOptions& value) noexcept {
|
|
184
|
+
return std::optional<CarrotQuestSetupOptions>(value);
|
|
185
|
+
}
|
|
186
|
+
inline bool has_value_std__optional_CarrotQuestSetupOptions_(const std::optional<CarrotQuestSetupOptions>& optional) noexcept {
|
|
187
|
+
return optional.has_value();
|
|
188
|
+
}
|
|
189
|
+
inline CarrotQuestSetupOptions get_std__optional_CarrotQuestSetupOptions_(const std::optional<CarrotQuestSetupOptions>& optional) noexcept {
|
|
190
|
+
return optional.value();
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
// pragma MARK: std::shared_ptr<Promise<std::optional<std::string>>>
|
|
194
|
+
/**
|
|
195
|
+
* Specialized version of `std::shared_ptr<Promise<std::optional<std::string>>>`.
|
|
196
|
+
*/
|
|
197
|
+
using std__shared_ptr_Promise_std__optional_std__string___ = std::shared_ptr<Promise<std::optional<std::string>>>;
|
|
198
|
+
inline std::shared_ptr<Promise<std::optional<std::string>>> create_std__shared_ptr_Promise_std__optional_std__string___() noexcept {
|
|
199
|
+
return Promise<std::optional<std::string>>::create();
|
|
200
|
+
}
|
|
201
|
+
inline PromiseHolder<std::optional<std::string>> wrap_std__shared_ptr_Promise_std__optional_std__string___(std::shared_ptr<Promise<std::optional<std::string>>> promise) noexcept {
|
|
202
|
+
return PromiseHolder<std::optional<std::string>>(std::move(promise));
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
// pragma MARK: std::function<void(const std::optional<std::string>& /* result */)>
|
|
206
|
+
/**
|
|
207
|
+
* Specialized version of `std::function<void(const std::optional<std::string>&)>`.
|
|
208
|
+
*/
|
|
209
|
+
using Func_void_std__optional_std__string_ = std::function<void(const std::optional<std::string>& /* result */)>;
|
|
210
|
+
/**
|
|
211
|
+
* Wrapper class for a `std::function<void(const std::optional<std::string>& / * result * /)>`, this can be used from Swift.
|
|
212
|
+
*/
|
|
213
|
+
class Func_void_std__optional_std__string__Wrapper final {
|
|
214
|
+
public:
|
|
215
|
+
explicit Func_void_std__optional_std__string__Wrapper(std::function<void(const std::optional<std::string>& /* result */)>&& func): _function(std::make_unique<std::function<void(const std::optional<std::string>& /* result */)>>(std::move(func))) {}
|
|
216
|
+
inline void call(std::optional<std::string> result) const noexcept {
|
|
217
|
+
_function->operator()(result);
|
|
218
|
+
}
|
|
219
|
+
private:
|
|
220
|
+
std::unique_ptr<std::function<void(const std::optional<std::string>& /* result */)>> _function;
|
|
221
|
+
} SWIFT_NONCOPYABLE;
|
|
222
|
+
Func_void_std__optional_std__string_ create_Func_void_std__optional_std__string_(void* NON_NULL swiftClosureWrapper) noexcept;
|
|
223
|
+
inline Func_void_std__optional_std__string__Wrapper wrap_Func_void_std__optional_std__string_(Func_void_std__optional_std__string_ value) noexcept {
|
|
224
|
+
return Func_void_std__optional_std__string__Wrapper(std::move(value));
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
// pragma MARK: std::function<void(bool /* visible */)>
|
|
228
|
+
/**
|
|
229
|
+
* Specialized version of `std::function<void(bool)>`.
|
|
230
|
+
*/
|
|
231
|
+
using Func_void_bool = std::function<void(bool /* visible */)>;
|
|
232
|
+
/**
|
|
233
|
+
* Wrapper class for a `std::function<void(bool / * visible * /)>`, this can be used from Swift.
|
|
234
|
+
*/
|
|
235
|
+
class Func_void_bool_Wrapper final {
|
|
236
|
+
public:
|
|
237
|
+
explicit Func_void_bool_Wrapper(std::function<void(bool /* visible */)>&& func): _function(std::make_unique<std::function<void(bool /* visible */)>>(std::move(func))) {}
|
|
238
|
+
inline void call(bool visible) const noexcept {
|
|
239
|
+
_function->operator()(visible);
|
|
240
|
+
}
|
|
241
|
+
private:
|
|
242
|
+
std::unique_ptr<std::function<void(bool /* visible */)>> _function;
|
|
243
|
+
} SWIFT_NONCOPYABLE;
|
|
244
|
+
Func_void_bool create_Func_void_bool(void* NON_NULL swiftClosureWrapper) noexcept;
|
|
245
|
+
inline Func_void_bool_Wrapper wrap_Func_void_bool(Func_void_bool value) noexcept {
|
|
246
|
+
return Func_void_bool_Wrapper(std::move(value));
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
// pragma MARK: std::shared_ptr<Promise<double>>
|
|
250
|
+
/**
|
|
251
|
+
* Specialized version of `std::shared_ptr<Promise<double>>`.
|
|
252
|
+
*/
|
|
253
|
+
using std__shared_ptr_Promise_double__ = std::shared_ptr<Promise<double>>;
|
|
254
|
+
inline std::shared_ptr<Promise<double>> create_std__shared_ptr_Promise_double__() noexcept {
|
|
255
|
+
return Promise<double>::create();
|
|
256
|
+
}
|
|
257
|
+
inline PromiseHolder<double> wrap_std__shared_ptr_Promise_double__(std::shared_ptr<Promise<double>> promise) noexcept {
|
|
258
|
+
return PromiseHolder<double>(std::move(promise));
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
// pragma MARK: std::function<void(double /* result */)>
|
|
262
|
+
/**
|
|
263
|
+
* Specialized version of `std::function<void(double)>`.
|
|
264
|
+
*/
|
|
265
|
+
using Func_void_double = std::function<void(double /* result */)>;
|
|
266
|
+
/**
|
|
267
|
+
* Wrapper class for a `std::function<void(double / * result * /)>`, this can be used from Swift.
|
|
268
|
+
*/
|
|
269
|
+
class Func_void_double_Wrapper final {
|
|
270
|
+
public:
|
|
271
|
+
explicit Func_void_double_Wrapper(std::function<void(double /* result */)>&& func): _function(std::make_unique<std::function<void(double /* result */)>>(std::move(func))) {}
|
|
272
|
+
inline void call(double result) const noexcept {
|
|
273
|
+
_function->operator()(result);
|
|
274
|
+
}
|
|
275
|
+
private:
|
|
276
|
+
std::unique_ptr<std::function<void(double /* result */)>> _function;
|
|
277
|
+
} SWIFT_NONCOPYABLE;
|
|
278
|
+
Func_void_double create_Func_void_double(void* NON_NULL swiftClosureWrapper) noexcept;
|
|
279
|
+
inline Func_void_double_Wrapper wrap_Func_void_double(Func_void_double value) noexcept {
|
|
280
|
+
return Func_void_double_Wrapper(std::move(value));
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
// pragma MARK: std::optional<double>
|
|
284
|
+
/**
|
|
285
|
+
* Specialized version of `std::optional<double>`.
|
|
286
|
+
*/
|
|
287
|
+
using std__optional_double_ = std::optional<double>;
|
|
288
|
+
inline std::optional<double> create_std__optional_double_(const double& value) noexcept {
|
|
289
|
+
return std::optional<double>(value);
|
|
290
|
+
}
|
|
291
|
+
inline bool has_value_std__optional_double_(const std::optional<double>& optional) noexcept {
|
|
292
|
+
return optional.has_value();
|
|
293
|
+
}
|
|
294
|
+
inline double get_std__optional_double_(const std::optional<double>& optional) noexcept {
|
|
295
|
+
return optional.value();
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
// pragma MARK: std::shared_ptr<Promise<std::optional<double>>>
|
|
299
|
+
/**
|
|
300
|
+
* Specialized version of `std::shared_ptr<Promise<std::optional<double>>>`.
|
|
301
|
+
*/
|
|
302
|
+
using std__shared_ptr_Promise_std__optional_double___ = std::shared_ptr<Promise<std::optional<double>>>;
|
|
303
|
+
inline std::shared_ptr<Promise<std::optional<double>>> create_std__shared_ptr_Promise_std__optional_double___() noexcept {
|
|
304
|
+
return Promise<std::optional<double>>::create();
|
|
305
|
+
}
|
|
306
|
+
inline PromiseHolder<std::optional<double>> wrap_std__shared_ptr_Promise_std__optional_double___(std::shared_ptr<Promise<std::optional<double>>> promise) noexcept {
|
|
307
|
+
return PromiseHolder<std::optional<double>>(std::move(promise));
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
// pragma MARK: std::function<void(std::optional<double> /* result */)>
|
|
311
|
+
/**
|
|
312
|
+
* Specialized version of `std::function<void(std::optional<double>)>`.
|
|
313
|
+
*/
|
|
314
|
+
using Func_void_std__optional_double_ = std::function<void(std::optional<double> /* result */)>;
|
|
315
|
+
/**
|
|
316
|
+
* Wrapper class for a `std::function<void(std::optional<double> / * result * /)>`, this can be used from Swift.
|
|
317
|
+
*/
|
|
318
|
+
class Func_void_std__optional_double__Wrapper final {
|
|
319
|
+
public:
|
|
320
|
+
explicit Func_void_std__optional_double__Wrapper(std::function<void(std::optional<double> /* result */)>&& func): _function(std::make_unique<std::function<void(std::optional<double> /* result */)>>(std::move(func))) {}
|
|
321
|
+
inline void call(std::optional<double> result) const noexcept {
|
|
322
|
+
_function->operator()(result);
|
|
323
|
+
}
|
|
324
|
+
private:
|
|
325
|
+
std::unique_ptr<std::function<void(std::optional<double> /* result */)>> _function;
|
|
326
|
+
} SWIFT_NONCOPYABLE;
|
|
327
|
+
Func_void_std__optional_double_ create_Func_void_std__optional_double_(void* NON_NULL swiftClosureWrapper) noexcept;
|
|
328
|
+
inline Func_void_std__optional_double__Wrapper wrap_Func_void_std__optional_double_(Func_void_std__optional_double_ value) noexcept {
|
|
329
|
+
return Func_void_std__optional_double__Wrapper(std::move(value));
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
// pragma MARK: std::unordered_map<std::string, std::string>
|
|
333
|
+
/**
|
|
334
|
+
* Specialized version of `std::unordered_map<std::string, std::string>`.
|
|
335
|
+
*/
|
|
336
|
+
using std__unordered_map_std__string__std__string_ = std::unordered_map<std::string, std::string>;
|
|
337
|
+
inline std::unordered_map<std::string, std::string> create_std__unordered_map_std__string__std__string_(size_t size) noexcept {
|
|
338
|
+
std::unordered_map<std::string, std::string> map;
|
|
339
|
+
map.reserve(size);
|
|
340
|
+
return map;
|
|
341
|
+
}
|
|
342
|
+
inline std::vector<std::string> get_std__unordered_map_std__string__std__string__keys(const std__unordered_map_std__string__std__string_& map) noexcept {
|
|
343
|
+
std::vector<std::string> keys;
|
|
344
|
+
keys.reserve(map.size());
|
|
345
|
+
for (const auto& entry : map) {
|
|
346
|
+
keys.push_back(entry.first);
|
|
347
|
+
}
|
|
348
|
+
return keys;
|
|
349
|
+
}
|
|
350
|
+
inline std::string get_std__unordered_map_std__string__std__string__value(const std__unordered_map_std__string__std__string_& map, const std::string& key) noexcept {
|
|
351
|
+
return map.find(key)->second;
|
|
352
|
+
}
|
|
353
|
+
inline void emplace_std__unordered_map_std__string__std__string_(std__unordered_map_std__string__std__string_& map, const std::string& key, const std::string& value) noexcept {
|
|
354
|
+
map.emplace(key, value);
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
// pragma MARK: std::optional<std::unordered_map<std::string, std::string>>
|
|
358
|
+
/**
|
|
359
|
+
* Specialized version of `std::optional<std::unordered_map<std::string, std::string>>`.
|
|
360
|
+
*/
|
|
361
|
+
using std__optional_std__unordered_map_std__string__std__string__ = std::optional<std::unordered_map<std::string, std::string>>;
|
|
362
|
+
inline std::optional<std::unordered_map<std::string, std::string>> create_std__optional_std__unordered_map_std__string__std__string__(const std::unordered_map<std::string, std::string>& value) noexcept {
|
|
363
|
+
return std::optional<std::unordered_map<std::string, std::string>>(value);
|
|
364
|
+
}
|
|
365
|
+
inline bool has_value_std__optional_std__unordered_map_std__string__std__string__(const std::optional<std::unordered_map<std::string, std::string>>& optional) noexcept {
|
|
366
|
+
return optional.has_value();
|
|
367
|
+
}
|
|
368
|
+
inline std::unordered_map<std::string, std::string> get_std__optional_std__unordered_map_std__string__std__string__(const std::optional<std::unordered_map<std::string, std::string>>& optional) noexcept {
|
|
369
|
+
return optional.value();
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
// pragma MARK: std::optional<CarrotQuestPropertyOperation>
|
|
373
|
+
/**
|
|
374
|
+
* Specialized version of `std::optional<CarrotQuestPropertyOperation>`.
|
|
375
|
+
*/
|
|
376
|
+
using std__optional_CarrotQuestPropertyOperation_ = std::optional<CarrotQuestPropertyOperation>;
|
|
377
|
+
inline std::optional<CarrotQuestPropertyOperation> create_std__optional_CarrotQuestPropertyOperation_(const CarrotQuestPropertyOperation& value) noexcept {
|
|
378
|
+
return std::optional<CarrotQuestPropertyOperation>(value);
|
|
379
|
+
}
|
|
380
|
+
inline bool has_value_std__optional_CarrotQuestPropertyOperation_(const std::optional<CarrotQuestPropertyOperation>& optional) noexcept {
|
|
381
|
+
return optional.has_value();
|
|
382
|
+
}
|
|
383
|
+
inline CarrotQuestPropertyOperation get_std__optional_CarrotQuestPropertyOperation_(const std::optional<CarrotQuestPropertyOperation>& optional) noexcept {
|
|
384
|
+
return optional.value();
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
// pragma MARK: std::optional<CarrotQuestPropertyKind>
|
|
388
|
+
/**
|
|
389
|
+
* Specialized version of `std::optional<CarrotQuestPropertyKind>`.
|
|
390
|
+
*/
|
|
391
|
+
using std__optional_CarrotQuestPropertyKind_ = std::optional<CarrotQuestPropertyKind>;
|
|
392
|
+
inline std::optional<CarrotQuestPropertyKind> create_std__optional_CarrotQuestPropertyKind_(const CarrotQuestPropertyKind& value) noexcept {
|
|
393
|
+
return std::optional<CarrotQuestPropertyKind>(value);
|
|
394
|
+
}
|
|
395
|
+
inline bool has_value_std__optional_CarrotQuestPropertyKind_(const std::optional<CarrotQuestPropertyKind>& optional) noexcept {
|
|
396
|
+
return optional.has_value();
|
|
397
|
+
}
|
|
398
|
+
inline CarrotQuestPropertyKind get_std__optional_CarrotQuestPropertyKind_(const std::optional<CarrotQuestPropertyKind>& optional) noexcept {
|
|
399
|
+
return optional.value();
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
// pragma MARK: std::vector<CarrotQuestProperty>
|
|
403
|
+
/**
|
|
404
|
+
* Specialized version of `std::vector<CarrotQuestProperty>`.
|
|
405
|
+
*/
|
|
406
|
+
using std__vector_CarrotQuestProperty_ = std::vector<CarrotQuestProperty>;
|
|
407
|
+
inline std::vector<CarrotQuestProperty> create_std__vector_CarrotQuestProperty_(size_t size) noexcept {
|
|
408
|
+
std::vector<CarrotQuestProperty> vector;
|
|
409
|
+
vector.reserve(size);
|
|
410
|
+
return vector;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
// pragma MARK: std::variant<bool, std::string, double>
|
|
414
|
+
/**
|
|
415
|
+
* Wrapper struct for `std::variant<bool, std::string, double>`.
|
|
416
|
+
* std::variant cannot be used in Swift because of a Swift bug.
|
|
417
|
+
* Not even specializing it works. So we create a wrapper struct.
|
|
418
|
+
*/
|
|
419
|
+
struct std__variant_bool__std__string__double_ final {
|
|
420
|
+
std::variant<bool, std::string, double> variant;
|
|
421
|
+
std__variant_bool__std__string__double_(std::variant<bool, std::string, double> variant): variant(variant) { }
|
|
422
|
+
operator std::variant<bool, std::string, double>() const noexcept {
|
|
423
|
+
return variant;
|
|
424
|
+
}
|
|
425
|
+
inline size_t index() const noexcept {
|
|
426
|
+
return variant.index();
|
|
427
|
+
}
|
|
428
|
+
inline bool get_0() const noexcept {
|
|
429
|
+
return std::get<0>(variant);
|
|
430
|
+
}
|
|
431
|
+
inline std::string get_1() const noexcept {
|
|
432
|
+
return std::get<1>(variant);
|
|
433
|
+
}
|
|
434
|
+
inline double get_2() const noexcept {
|
|
435
|
+
return std::get<2>(variant);
|
|
436
|
+
}
|
|
437
|
+
};
|
|
438
|
+
inline std__variant_bool__std__string__double_ create_std__variant_bool__std__string__double_(bool value) noexcept {
|
|
439
|
+
return std__variant_bool__std__string__double_(value);
|
|
440
|
+
}
|
|
441
|
+
inline std__variant_bool__std__string__double_ create_std__variant_bool__std__string__double_(const std::string& value) noexcept {
|
|
442
|
+
return std__variant_bool__std__string__double_(value);
|
|
443
|
+
}
|
|
444
|
+
inline std__variant_bool__std__string__double_ create_std__variant_bool__std__string__double_(double value) noexcept {
|
|
445
|
+
return std__variant_bool__std__string__double_(value);
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
// pragma MARK: std::unordered_map<std::string, std::variant<bool, std::string, double>>
|
|
449
|
+
/**
|
|
450
|
+
* Specialized version of `std::unordered_map<std::string, std::variant<bool, std::string, double>>`.
|
|
451
|
+
*/
|
|
452
|
+
using std__unordered_map_std__string__std__variant_bool__std__string__double__ = std::unordered_map<std::string, std::variant<bool, std::string, double>>;
|
|
453
|
+
inline std::unordered_map<std::string, std::variant<bool, std::string, double>> create_std__unordered_map_std__string__std__variant_bool__std__string__double__(size_t size) noexcept {
|
|
454
|
+
std::unordered_map<std::string, std::variant<bool, std::string, double>> map;
|
|
455
|
+
map.reserve(size);
|
|
456
|
+
return map;
|
|
457
|
+
}
|
|
458
|
+
inline std::vector<std::string> get_std__unordered_map_std__string__std__variant_bool__std__string__double___keys(const std__unordered_map_std__string__std__variant_bool__std__string__double__& map) noexcept {
|
|
459
|
+
std::vector<std::string> keys;
|
|
460
|
+
keys.reserve(map.size());
|
|
461
|
+
for (const auto& entry : map) {
|
|
462
|
+
keys.push_back(entry.first);
|
|
463
|
+
}
|
|
464
|
+
return keys;
|
|
465
|
+
}
|
|
466
|
+
inline std::variant<bool, std::string, double> get_std__unordered_map_std__string__std__variant_bool__std__string__double___value(const std__unordered_map_std__string__std__variant_bool__std__string__double__& map, const std::string& key) noexcept {
|
|
467
|
+
return map.find(key)->second;
|
|
468
|
+
}
|
|
469
|
+
inline void emplace_std__unordered_map_std__string__std__variant_bool__std__string__double__(std__unordered_map_std__string__std__variant_bool__std__string__double__& map, const std::string& key, const std::variant<bool, std::string, double>& value) noexcept {
|
|
470
|
+
map.emplace(key, value);
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
// pragma MARK: std::optional<std::unordered_map<std::string, std::variant<bool, std::string, double>>>
|
|
474
|
+
/**
|
|
475
|
+
* Specialized version of `std::optional<std::unordered_map<std::string, std::variant<bool, std::string, double>>>`.
|
|
476
|
+
*/
|
|
477
|
+
using std__optional_std__unordered_map_std__string__std__variant_bool__std__string__double___ = std::optional<std::unordered_map<std::string, std::variant<bool, std::string, double>>>;
|
|
478
|
+
inline std::optional<std::unordered_map<std::string, std::variant<bool, std::string, double>>> create_std__optional_std__unordered_map_std__string__std__variant_bool__std__string__double___(const std::unordered_map<std::string, std::variant<bool, std::string, double>>& value) noexcept {
|
|
479
|
+
return std::optional<std::unordered_map<std::string, std::variant<bool, std::string, double>>>(value);
|
|
480
|
+
}
|
|
481
|
+
inline bool has_value_std__optional_std__unordered_map_std__string__std__variant_bool__std__string__double___(const std::optional<std::unordered_map<std::string, std::variant<bool, std::string, double>>>& optional) noexcept {
|
|
482
|
+
return optional.has_value();
|
|
483
|
+
}
|
|
484
|
+
inline std::unordered_map<std::string, std::variant<bool, std::string, double>> get_std__optional_std__unordered_map_std__string__std__variant_bool__std__string__double___(const std::optional<std::unordered_map<std::string, std::variant<bool, std::string, double>>>& optional) noexcept {
|
|
485
|
+
return optional.value();
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
// pragma MARK: std::shared_ptr<Promise<bool>>
|
|
489
|
+
/**
|
|
490
|
+
* Specialized version of `std::shared_ptr<Promise<bool>>`.
|
|
491
|
+
*/
|
|
492
|
+
using std__shared_ptr_Promise_bool__ = std::shared_ptr<Promise<bool>>;
|
|
493
|
+
inline std::shared_ptr<Promise<bool>> create_std__shared_ptr_Promise_bool__() noexcept {
|
|
494
|
+
return Promise<bool>::create();
|
|
495
|
+
}
|
|
496
|
+
inline PromiseHolder<bool> wrap_std__shared_ptr_Promise_bool__(std::shared_ptr<Promise<bool>> promise) noexcept {
|
|
497
|
+
return PromiseHolder<bool>(std::move(promise));
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
// pragma MARK: std::function<void(const std::string& /* url */)>
|
|
501
|
+
/**
|
|
502
|
+
* Specialized version of `std::function<void(const std::string&)>`.
|
|
503
|
+
*/
|
|
504
|
+
using Func_void_std__string = std::function<void(const std::string& /* url */)>;
|
|
505
|
+
/**
|
|
506
|
+
* Wrapper class for a `std::function<void(const std::string& / * url * /)>`, this can be used from Swift.
|
|
507
|
+
*/
|
|
508
|
+
class Func_void_std__string_Wrapper final {
|
|
509
|
+
public:
|
|
510
|
+
explicit Func_void_std__string_Wrapper(std::function<void(const std::string& /* url */)>&& func): _function(std::make_unique<std::function<void(const std::string& /* url */)>>(std::move(func))) {}
|
|
511
|
+
inline void call(std::string url) const noexcept {
|
|
512
|
+
_function->operator()(url);
|
|
513
|
+
}
|
|
514
|
+
private:
|
|
515
|
+
std::unique_ptr<std::function<void(const std::string& /* url */)>> _function;
|
|
516
|
+
} SWIFT_NONCOPYABLE;
|
|
517
|
+
Func_void_std__string create_Func_void_std__string(void* NON_NULL swiftClosureWrapper) noexcept;
|
|
518
|
+
inline Func_void_std__string_Wrapper wrap_Func_void_std__string(Func_void_std__string value) noexcept {
|
|
519
|
+
return Func_void_std__string_Wrapper(std::move(value));
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
// pragma MARK: std::function<void(const CarrotQuestLogEntry& /* entry */)>
|
|
523
|
+
/**
|
|
524
|
+
* Specialized version of `std::function<void(const CarrotQuestLogEntry&)>`.
|
|
525
|
+
*/
|
|
526
|
+
using Func_void_CarrotQuestLogEntry = std::function<void(const CarrotQuestLogEntry& /* entry */)>;
|
|
527
|
+
/**
|
|
528
|
+
* Wrapper class for a `std::function<void(const CarrotQuestLogEntry& / * entry * /)>`, this can be used from Swift.
|
|
529
|
+
*/
|
|
530
|
+
class Func_void_CarrotQuestLogEntry_Wrapper final {
|
|
531
|
+
public:
|
|
532
|
+
explicit Func_void_CarrotQuestLogEntry_Wrapper(std::function<void(const CarrotQuestLogEntry& /* entry */)>&& func): _function(std::make_unique<std::function<void(const CarrotQuestLogEntry& /* entry */)>>(std::move(func))) {}
|
|
533
|
+
inline void call(CarrotQuestLogEntry entry) const noexcept {
|
|
534
|
+
_function->operator()(entry);
|
|
535
|
+
}
|
|
536
|
+
private:
|
|
537
|
+
std::unique_ptr<std::function<void(const CarrotQuestLogEntry& /* entry */)>> _function;
|
|
538
|
+
} SWIFT_NONCOPYABLE;
|
|
539
|
+
Func_void_CarrotQuestLogEntry create_Func_void_CarrotQuestLogEntry(void* NON_NULL swiftClosureWrapper) noexcept;
|
|
540
|
+
inline Func_void_CarrotQuestLogEntry_Wrapper wrap_Func_void_CarrotQuestLogEntry(Func_void_CarrotQuestLogEntry value) noexcept {
|
|
541
|
+
return Func_void_CarrotQuestLogEntry_Wrapper(std::move(value));
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
// pragma MARK: std::shared_ptr<HybridCarrotQuestSpec>
|
|
545
|
+
/**
|
|
546
|
+
* Specialized version of `std::shared_ptr<HybridCarrotQuestSpec>`.
|
|
547
|
+
*/
|
|
548
|
+
using std__shared_ptr_HybridCarrotQuestSpec_ = std::shared_ptr<HybridCarrotQuestSpec>;
|
|
549
|
+
std::shared_ptr<HybridCarrotQuestSpec> create_std__shared_ptr_HybridCarrotQuestSpec_(void* NON_NULL swiftUnsafePointer) noexcept;
|
|
550
|
+
void* NON_NULL get_std__shared_ptr_HybridCarrotQuestSpec_(std__shared_ptr_HybridCarrotQuestSpec_ cppType);
|
|
551
|
+
|
|
552
|
+
// pragma MARK: std::weak_ptr<HybridCarrotQuestSpec>
|
|
553
|
+
using std__weak_ptr_HybridCarrotQuestSpec_ = std::weak_ptr<HybridCarrotQuestSpec>;
|
|
554
|
+
inline std__weak_ptr_HybridCarrotQuestSpec_ weakify_std__shared_ptr_HybridCarrotQuestSpec_(const std::shared_ptr<HybridCarrotQuestSpec>& strong) noexcept { return strong; }
|
|
555
|
+
|
|
556
|
+
// pragma MARK: Result<std::shared_ptr<Promise<void>>>
|
|
557
|
+
using Result_std__shared_ptr_Promise_void___ = Result<std::shared_ptr<Promise<void>>>;
|
|
558
|
+
inline Result_std__shared_ptr_Promise_void___ create_Result_std__shared_ptr_Promise_void___(const std::shared_ptr<Promise<void>>& value) noexcept {
|
|
559
|
+
return Result<std::shared_ptr<Promise<void>>>::withValue(value);
|
|
560
|
+
}
|
|
561
|
+
inline Result_std__shared_ptr_Promise_void___ create_Result_std__shared_ptr_Promise_void___(const std::exception_ptr& error) noexcept {
|
|
562
|
+
return Result<std::shared_ptr<Promise<void>>>::withError(error);
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
// pragma MARK: Result<std::string>
|
|
566
|
+
using Result_std__string_ = Result<std::string>;
|
|
567
|
+
inline Result_std__string_ create_Result_std__string_(const std::string& value) noexcept {
|
|
568
|
+
return Result<std::string>::withValue(value);
|
|
569
|
+
}
|
|
570
|
+
inline Result_std__string_ create_Result_std__string_(const std::exception_ptr& error) noexcept {
|
|
571
|
+
return Result<std::string>::withError(error);
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
// pragma MARK: Result<std::shared_ptr<Promise<std::optional<std::string>>>>
|
|
575
|
+
using Result_std__shared_ptr_Promise_std__optional_std__string____ = Result<std::shared_ptr<Promise<std::optional<std::string>>>>;
|
|
576
|
+
inline Result_std__shared_ptr_Promise_std__optional_std__string____ create_Result_std__shared_ptr_Promise_std__optional_std__string____(const std::shared_ptr<Promise<std::optional<std::string>>>& value) noexcept {
|
|
577
|
+
return Result<std::shared_ptr<Promise<std::optional<std::string>>>>::withValue(value);
|
|
578
|
+
}
|
|
579
|
+
inline Result_std__shared_ptr_Promise_std__optional_std__string____ create_Result_std__shared_ptr_Promise_std__optional_std__string____(const std::exception_ptr& error) noexcept {
|
|
580
|
+
return Result<std::shared_ptr<Promise<std::optional<std::string>>>>::withError(error);
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
// pragma MARK: Result<void>
|
|
584
|
+
using Result_void_ = Result<void>;
|
|
585
|
+
inline Result_void_ create_Result_void_() noexcept {
|
|
586
|
+
return Result<void>::withValue();
|
|
587
|
+
}
|
|
588
|
+
inline Result_void_ create_Result_void_(const std::exception_ptr& error) noexcept {
|
|
589
|
+
return Result<void>::withError(error);
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
// pragma MARK: Result<std::shared_ptr<Promise<double>>>
|
|
593
|
+
using Result_std__shared_ptr_Promise_double___ = Result<std::shared_ptr<Promise<double>>>;
|
|
594
|
+
inline Result_std__shared_ptr_Promise_double___ create_Result_std__shared_ptr_Promise_double___(const std::shared_ptr<Promise<double>>& value) noexcept {
|
|
595
|
+
return Result<std::shared_ptr<Promise<double>>>::withValue(value);
|
|
596
|
+
}
|
|
597
|
+
inline Result_std__shared_ptr_Promise_double___ create_Result_std__shared_ptr_Promise_double___(const std::exception_ptr& error) noexcept {
|
|
598
|
+
return Result<std::shared_ptr<Promise<double>>>::withError(error);
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
// pragma MARK: Result<std::shared_ptr<Promise<std::optional<double>>>>
|
|
602
|
+
using Result_std__shared_ptr_Promise_std__optional_double____ = Result<std::shared_ptr<Promise<std::optional<double>>>>;
|
|
603
|
+
inline Result_std__shared_ptr_Promise_std__optional_double____ create_Result_std__shared_ptr_Promise_std__optional_double____(const std::shared_ptr<Promise<std::optional<double>>>& value) noexcept {
|
|
604
|
+
return Result<std::shared_ptr<Promise<std::optional<double>>>>::withValue(value);
|
|
605
|
+
}
|
|
606
|
+
inline Result_std__shared_ptr_Promise_std__optional_double____ create_Result_std__shared_ptr_Promise_std__optional_double____(const std::exception_ptr& error) noexcept {
|
|
607
|
+
return Result<std::shared_ptr<Promise<std::optional<double>>>>::withError(error);
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
// pragma MARK: Result<bool>
|
|
611
|
+
using Result_bool_ = Result<bool>;
|
|
612
|
+
inline Result_bool_ create_Result_bool_(bool value) noexcept {
|
|
613
|
+
return Result<bool>::withValue(std::move(value));
|
|
614
|
+
}
|
|
615
|
+
inline Result_bool_ create_Result_bool_(const std::exception_ptr& error) noexcept {
|
|
616
|
+
return Result<bool>::withError(error);
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
// pragma MARK: Result<std::optional<std::string>>
|
|
620
|
+
using Result_std__optional_std__string__ = Result<std::optional<std::string>>;
|
|
621
|
+
inline Result_std__optional_std__string__ create_Result_std__optional_std__string__(const std::optional<std::string>& value) noexcept {
|
|
622
|
+
return Result<std::optional<std::string>>::withValue(value);
|
|
623
|
+
}
|
|
624
|
+
inline Result_std__optional_std__string__ create_Result_std__optional_std__string__(const std::exception_ptr& error) noexcept {
|
|
625
|
+
return Result<std::optional<std::string>>::withError(error);
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
// pragma MARK: Result<std::shared_ptr<Promise<bool>>>
|
|
629
|
+
using Result_std__shared_ptr_Promise_bool___ = Result<std::shared_ptr<Promise<bool>>>;
|
|
630
|
+
inline Result_std__shared_ptr_Promise_bool___ create_Result_std__shared_ptr_Promise_bool___(const std::shared_ptr<Promise<bool>>& value) noexcept {
|
|
631
|
+
return Result<std::shared_ptr<Promise<bool>>>::withValue(value);
|
|
632
|
+
}
|
|
633
|
+
inline Result_std__shared_ptr_Promise_bool___ create_Result_std__shared_ptr_Promise_bool___(const std::exception_ptr& error) noexcept {
|
|
634
|
+
return Result<std::shared_ptr<Promise<bool>>>::withError(error);
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
} // namespace margelo::nitro::carrotquest::bridge::swift
|