react-native-nitro-pose-exercises 1.0.2
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/NitroPoseExercises.podspec +32 -0
- package/README.md +538 -0
- package/android/CMakeLists.txt +31 -0
- package/android/build.gradle +121 -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/nitroposeexercises/NitroPoseExercises.kt +535 -0
- package/android/src/main/java/com/margelo/nitro/nitroposeexercises/NitroPoseExercisesPackage.kt +22 -0
- package/ios/NitroPoseExercises.swift +527 -0
- package/lib/module/NitroPoseExercises.nitro.js +17 -0
- package/lib/module/NitroPoseExercises.nitro.js.map +1 -0
- package/lib/module/config/pushup.js +71 -0
- package/lib/module/config/pushup.js.map +1 -0
- package/lib/module/index.js +7 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/src/NitroPoseExercises.nitro.d.ts +97 -0
- package/lib/typescript/src/NitroPoseExercises.nitro.d.ts.map +1 -0
- package/lib/typescript/src/config/pushup.d.ts +3 -0
- package/lib/typescript/src/config/pushup.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/nitro.json +23 -0
- package/nitrogen/generated/android/c++/JAngleDefinition.hpp +69 -0
- package/nitrogen/generated/android/c++/JAngleSnapshot.hpp +61 -0
- package/nitrogen/generated/android/c++/JExerciseConfig.hpp +166 -0
- package/nitrogen/generated/android/c++/JExercisePhase.hpp +67 -0
- package/nitrogen/generated/android/c++/JExerciseType.hpp +61 -0
- package/nitrogen/generated/android/c++/JFormFeedback.hpp +67 -0
- package/nitrogen/generated/android/c++/JFormRule.hpp +79 -0
- package/nitrogen/generated/android/c++/JFormSeverity.hpp +61 -0
- package/nitrogen/generated/android/c++/JFunc_void.hpp +75 -0
- package/nitrogen/generated/android/c++/JFunc_void_ExercisePhase.hpp +77 -0
- package/nitrogen/generated/android/c++/JFunc_void_FormFeedback.hpp +80 -0
- package/nitrogen/generated/android/c++/JFunc_void_HoldProgress.hpp +77 -0
- package/nitrogen/generated/android/c++/JFunc_void_RepData.hpp +81 -0
- package/nitrogen/generated/android/c++/JFunc_void_SessionResult.hpp +85 -0
- package/nitrogen/generated/android/c++/JHoldProgress.hpp +65 -0
- package/nitrogen/generated/android/c++/JHybridNitroPoseExercisesSpec.cpp +311 -0
- package/nitrogen/generated/android/c++/JHybridNitroPoseExercisesSpec.hpp +87 -0
- package/nitrogen/generated/android/c++/JLandmark.hpp +69 -0
- package/nitrogen/generated/android/c++/JPhaseThreshold.hpp +71 -0
- package/nitrogen/generated/android/c++/JRepData.hpp +90 -0
- package/nitrogen/generated/android/c++/JSessionResult.hpp +120 -0
- package/nitrogen/generated/android/c++/JSessionStatus.hpp +67 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroposeexercises/AngleDefinition.kt +66 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroposeexercises/AngleSnapshot.kt +56 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroposeexercises/ExerciseConfig.kt +81 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroposeexercises/ExercisePhase.kt +26 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroposeexercises/ExerciseType.kt +24 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroposeexercises/FormFeedback.kt +61 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroposeexercises/FormRule.kt +76 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroposeexercises/FormSeverity.kt +24 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroposeexercises/Func_void.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroposeexercises/Func_void_ExercisePhase.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroposeexercises/Func_void_FormFeedback.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroposeexercises/Func_void_HoldProgress.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroposeexercises/Func_void_RepData.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroposeexercises/Func_void_SessionResult.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroposeexercises/HoldProgress.kt +61 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroposeexercises/HybridNitroPoseExercisesSpec.kt +196 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroposeexercises/Landmark.kt +66 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroposeexercises/PhaseThreshold.kt +66 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroposeexercises/RepData.kt +66 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroposeexercises/SessionResult.kt +76 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroposeexercises/SessionStatus.kt +26 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroposeexercises/nitroposeexercisesOnLoad.kt +35 -0
- package/nitrogen/generated/android/nitroposeexercises+autolinking.cmake +81 -0
- package/nitrogen/generated/android/nitroposeexercises+autolinking.gradle +27 -0
- package/nitrogen/generated/android/nitroposeexercisesOnLoad.cpp +66 -0
- package/nitrogen/generated/android/nitroposeexercisesOnLoad.hpp +34 -0
- package/nitrogen/generated/ios/NitroPoseExercises+autolinking.rb +62 -0
- package/nitrogen/generated/ios/NitroPoseExercises-Swift-Cxx-Bridge.cpp +100 -0
- package/nitrogen/generated/ios/NitroPoseExercises-Swift-Cxx-Bridge.hpp +449 -0
- package/nitrogen/generated/ios/NitroPoseExercises-Swift-Cxx-Umbrella.hpp +95 -0
- package/nitrogen/generated/ios/NitroPoseExercisesAutolinking.mm +33 -0
- package/nitrogen/generated/ios/NitroPoseExercisesAutolinking.swift +26 -0
- package/nitrogen/generated/ios/c++/HybridNitroPoseExercisesSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridNitroPoseExercisesSpecSwift.hpp +236 -0
- package/nitrogen/generated/ios/swift/AngleDefinition.swift +44 -0
- package/nitrogen/generated/ios/swift/AngleSnapshot.swift +34 -0
- package/nitrogen/generated/ios/swift/ExerciseConfig.swift +83 -0
- package/nitrogen/generated/ios/swift/ExercisePhase.swift +52 -0
- package/nitrogen/generated/ios/swift/ExerciseType.swift +44 -0
- package/nitrogen/generated/ios/swift/FormFeedback.swift +39 -0
- package/nitrogen/generated/ios/swift/FormRule.swift +54 -0
- package/nitrogen/generated/ios/swift/FormSeverity.swift +44 -0
- package/nitrogen/generated/ios/swift/Func_void.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_ExercisePhase.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_FormFeedback.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_HoldProgress.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_RepData.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_SessionResult.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_std__exception_ptr.swift +46 -0
- package/nitrogen/generated/ios/swift/HoldProgress.swift +39 -0
- package/nitrogen/generated/ios/swift/HybridNitroPoseExercisesSpec.swift +73 -0
- package/nitrogen/generated/ios/swift/HybridNitroPoseExercisesSpec_cxx.swift +483 -0
- package/nitrogen/generated/ios/swift/Landmark.swift +44 -0
- package/nitrogen/generated/ios/swift/PhaseThreshold.swift +44 -0
- package/nitrogen/generated/ios/swift/RepData.swift +50 -0
- package/nitrogen/generated/ios/swift/SessionResult.swift +66 -0
- package/nitrogen/generated/ios/swift/SessionStatus.swift +52 -0
- package/nitrogen/generated/shared/c++/AngleDefinition.hpp +95 -0
- package/nitrogen/generated/shared/c++/AngleSnapshot.hpp +87 -0
- package/nitrogen/generated/shared/c++/ExerciseConfig.hpp +122 -0
- package/nitrogen/generated/shared/c++/ExercisePhase.hpp +88 -0
- package/nitrogen/generated/shared/c++/ExerciseType.hpp +80 -0
- package/nitrogen/generated/shared/c++/FormFeedback.hpp +93 -0
- package/nitrogen/generated/shared/c++/FormRule.hpp +105 -0
- package/nitrogen/generated/shared/c++/FormSeverity.hpp +80 -0
- package/nitrogen/generated/shared/c++/HoldProgress.hpp +91 -0
- package/nitrogen/generated/shared/c++/HybridNitroPoseExercisesSpec.cpp +46 -0
- package/nitrogen/generated/shared/c++/HybridNitroPoseExercisesSpec.hpp +117 -0
- package/nitrogen/generated/shared/c++/Landmark.hpp +95 -0
- package/nitrogen/generated/shared/c++/PhaseThreshold.hpp +97 -0
- package/nitrogen/generated/shared/c++/RepData.hpp +97 -0
- package/nitrogen/generated/shared/c++/SessionResult.hpp +108 -0
- package/nitrogen/generated/shared/c++/SessionStatus.hpp +88 -0
- package/package.json +187 -0
- package/src/NitroPoseExercises.nitro.ts +155 -0
- package/src/config/pushup.ts +62 -0
- package/src/index.tsx +28 -0
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// NitroPoseExercises-Swift-Cxx-Bridge.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 "NitroPoseExercises-Swift-Cxx-Bridge.hpp"
|
|
9
|
+
|
|
10
|
+
// Include C++ implementation defined types
|
|
11
|
+
#include "HybridNitroPoseExercisesSpecSwift.hpp"
|
|
12
|
+
#include "NitroPoseExercises-Swift-Cxx-Umbrella.hpp"
|
|
13
|
+
#include <NitroModules/NitroDefines.hpp>
|
|
14
|
+
#include <VisionCamera/VisionCamera-Swift-Cxx-Bridge.hpp>
|
|
15
|
+
|
|
16
|
+
namespace margelo::nitro::nitroposeexercises::bridge::swift {
|
|
17
|
+
|
|
18
|
+
// pragma MARK: std::function<void()>
|
|
19
|
+
Func_void create_Func_void(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
20
|
+
auto swiftClosure = NitroPoseExercises::Func_void::fromUnsafe(swiftClosureWrapper);
|
|
21
|
+
return [swiftClosure = std::move(swiftClosure)]() mutable -> void {
|
|
22
|
+
swiftClosure.call();
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// pragma MARK: std::function<void(const std::exception_ptr& /* error */)>
|
|
27
|
+
Func_void_std__exception_ptr create_Func_void_std__exception_ptr(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
28
|
+
auto swiftClosure = NitroPoseExercises::Func_void_std__exception_ptr::fromUnsafe(swiftClosureWrapper);
|
|
29
|
+
return [swiftClosure = std::move(swiftClosure)](const std::exception_ptr& error) mutable -> void {
|
|
30
|
+
swiftClosure.call(error);
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// pragma MARK: std::shared_ptr<margelo::nitro::camera::HybridFrameSpec>
|
|
35
|
+
std::shared_ptr<margelo::nitro::camera::HybridFrameSpec> create_std__shared_ptr_margelo__nitro__camera__HybridFrameSpec_(void* NON_NULL swiftUnsafePointer) noexcept {
|
|
36
|
+
// Implemented in VisionCamera
|
|
37
|
+
return margelo::nitro::camera::bridge::swift::create_std__shared_ptr_HybridFrameSpec_(swiftUnsafePointer);
|
|
38
|
+
}
|
|
39
|
+
void* NON_NULL get_std__shared_ptr_margelo__nitro__camera__HybridFrameSpec_(std__shared_ptr_margelo__nitro__camera__HybridFrameSpec_ cppType) {
|
|
40
|
+
// Implemented in VisionCamera
|
|
41
|
+
return margelo::nitro::camera::bridge::swift::get_std__shared_ptr_HybridFrameSpec_(cppType);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// pragma MARK: std::function<void(const RepData& /* data */)>
|
|
45
|
+
Func_void_RepData create_Func_void_RepData(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
46
|
+
auto swiftClosure = NitroPoseExercises::Func_void_RepData::fromUnsafe(swiftClosureWrapper);
|
|
47
|
+
return [swiftClosure = std::move(swiftClosure)](const RepData& data) mutable -> void {
|
|
48
|
+
swiftClosure.call(data);
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// pragma MARK: std::function<void(ExercisePhase /* phase */)>
|
|
53
|
+
Func_void_ExercisePhase create_Func_void_ExercisePhase(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
54
|
+
auto swiftClosure = NitroPoseExercises::Func_void_ExercisePhase::fromUnsafe(swiftClosureWrapper);
|
|
55
|
+
return [swiftClosure = std::move(swiftClosure)](ExercisePhase phase) mutable -> void {
|
|
56
|
+
swiftClosure.call(static_cast<int>(phase));
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// pragma MARK: std::function<void(const FormFeedback& /* feedback */)>
|
|
61
|
+
Func_void_FormFeedback create_Func_void_FormFeedback(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
62
|
+
auto swiftClosure = NitroPoseExercises::Func_void_FormFeedback::fromUnsafe(swiftClosureWrapper);
|
|
63
|
+
return [swiftClosure = std::move(swiftClosure)](const FormFeedback& feedback) mutable -> void {
|
|
64
|
+
swiftClosure.call(feedback);
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// pragma MARK: std::function<void(const HoldProgress& /* progress */)>
|
|
69
|
+
Func_void_HoldProgress create_Func_void_HoldProgress(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
70
|
+
auto swiftClosure = NitroPoseExercises::Func_void_HoldProgress::fromUnsafe(swiftClosureWrapper);
|
|
71
|
+
return [swiftClosure = std::move(swiftClosure)](const HoldProgress& progress) mutable -> void {
|
|
72
|
+
swiftClosure.call(progress);
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// pragma MARK: std::function<void(const SessionResult& /* result */)>
|
|
77
|
+
Func_void_SessionResult create_Func_void_SessionResult(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
78
|
+
auto swiftClosure = NitroPoseExercises::Func_void_SessionResult::fromUnsafe(swiftClosureWrapper);
|
|
79
|
+
return [swiftClosure = std::move(swiftClosure)](const SessionResult& result) mutable -> void {
|
|
80
|
+
swiftClosure.call(result);
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// pragma MARK: std::shared_ptr<HybridNitroPoseExercisesSpec>
|
|
85
|
+
std::shared_ptr<HybridNitroPoseExercisesSpec> create_std__shared_ptr_HybridNitroPoseExercisesSpec_(void* NON_NULL swiftUnsafePointer) noexcept {
|
|
86
|
+
NitroPoseExercises::HybridNitroPoseExercisesSpec_cxx swiftPart = NitroPoseExercises::HybridNitroPoseExercisesSpec_cxx::fromUnsafe(swiftUnsafePointer);
|
|
87
|
+
return std::make_shared<margelo::nitro::nitroposeexercises::HybridNitroPoseExercisesSpecSwift>(swiftPart);
|
|
88
|
+
}
|
|
89
|
+
void* NON_NULL get_std__shared_ptr_HybridNitroPoseExercisesSpec_(std__shared_ptr_HybridNitroPoseExercisesSpec_ cppType) {
|
|
90
|
+
std::shared_ptr<margelo::nitro::nitroposeexercises::HybridNitroPoseExercisesSpecSwift> swiftWrapper = std::dynamic_pointer_cast<margelo::nitro::nitroposeexercises::HybridNitroPoseExercisesSpecSwift>(cppType);
|
|
91
|
+
#ifdef NITRO_DEBUG
|
|
92
|
+
if (swiftWrapper == nullptr) [[unlikely]] {
|
|
93
|
+
throw std::runtime_error("Class \"HybridNitroPoseExercisesSpec\" is not implemented in Swift!");
|
|
94
|
+
}
|
|
95
|
+
#endif
|
|
96
|
+
NitroPoseExercises::HybridNitroPoseExercisesSpec_cxx& swiftPart = swiftWrapper->getSwiftPart();
|
|
97
|
+
return swiftPart.toUnsafe();
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
} // namespace margelo::nitro::nitroposeexercises::bridge::swift
|
|
@@ -0,0 +1,449 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// NitroPoseExercises-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 `AngleDefinition` to properly resolve imports.
|
|
12
|
+
namespace margelo::nitro::nitroposeexercises { struct AngleDefinition; }
|
|
13
|
+
// Forward declaration of `AngleSnapshot` to properly resolve imports.
|
|
14
|
+
namespace margelo::nitro::nitroposeexercises { struct AngleSnapshot; }
|
|
15
|
+
// Forward declaration of `ExercisePhase` to properly resolve imports.
|
|
16
|
+
namespace margelo::nitro::nitroposeexercises { enum class ExercisePhase; }
|
|
17
|
+
// Forward declaration of `FormFeedback` to properly resolve imports.
|
|
18
|
+
namespace margelo::nitro::nitroposeexercises { struct FormFeedback; }
|
|
19
|
+
// Forward declaration of `FormRule` to properly resolve imports.
|
|
20
|
+
namespace margelo::nitro::nitroposeexercises { struct FormRule; }
|
|
21
|
+
// Forward declaration of `FormSeverity` to properly resolve imports.
|
|
22
|
+
namespace margelo::nitro::nitroposeexercises { enum class FormSeverity; }
|
|
23
|
+
// Forward declaration of `HoldProgress` to properly resolve imports.
|
|
24
|
+
namespace margelo::nitro::nitroposeexercises { struct HoldProgress; }
|
|
25
|
+
// Forward declaration of `HybridFrameSpec` to properly resolve imports.
|
|
26
|
+
namespace margelo::nitro::camera { class HybridFrameSpec; }
|
|
27
|
+
// Forward declaration of `HybridNitroPoseExercisesSpec` to properly resolve imports.
|
|
28
|
+
namespace margelo::nitro::nitroposeexercises { class HybridNitroPoseExercisesSpec; }
|
|
29
|
+
// Forward declaration of `Landmark` to properly resolve imports.
|
|
30
|
+
namespace margelo::nitro::nitroposeexercises { struct Landmark; }
|
|
31
|
+
// Forward declaration of `PhaseThreshold` to properly resolve imports.
|
|
32
|
+
namespace margelo::nitro::nitroposeexercises { struct PhaseThreshold; }
|
|
33
|
+
// Forward declaration of `RepData` to properly resolve imports.
|
|
34
|
+
namespace margelo::nitro::nitroposeexercises { struct RepData; }
|
|
35
|
+
// Forward declaration of `SessionResult` to properly resolve imports.
|
|
36
|
+
namespace margelo::nitro::nitroposeexercises { struct SessionResult; }
|
|
37
|
+
|
|
38
|
+
// Forward declarations of Swift defined types
|
|
39
|
+
// Forward declaration of `HybridFrameSpec_cxx` to properly resolve imports.
|
|
40
|
+
namespace VisionCamera { class HybridFrameSpec_cxx; }
|
|
41
|
+
// Forward declaration of `HybridNitroPoseExercisesSpec_cxx` to properly resolve imports.
|
|
42
|
+
namespace NitroPoseExercises { class HybridNitroPoseExercisesSpec_cxx; }
|
|
43
|
+
|
|
44
|
+
// Include C++ defined types
|
|
45
|
+
#include "AngleDefinition.hpp"
|
|
46
|
+
#include "AngleSnapshot.hpp"
|
|
47
|
+
#include "ExercisePhase.hpp"
|
|
48
|
+
#include "FormFeedback.hpp"
|
|
49
|
+
#include "FormRule.hpp"
|
|
50
|
+
#include "FormSeverity.hpp"
|
|
51
|
+
#include "HoldProgress.hpp"
|
|
52
|
+
#include "HybridNitroPoseExercisesSpec.hpp"
|
|
53
|
+
#include "Landmark.hpp"
|
|
54
|
+
#include "PhaseThreshold.hpp"
|
|
55
|
+
#include "RepData.hpp"
|
|
56
|
+
#include "SessionResult.hpp"
|
|
57
|
+
#include <NitroModules/Promise.hpp>
|
|
58
|
+
#include <NitroModules/PromiseHolder.hpp>
|
|
59
|
+
#include <NitroModules/Result.hpp>
|
|
60
|
+
#include <VisionCamera/HybridFrameSpec.hpp>
|
|
61
|
+
#include <exception>
|
|
62
|
+
#include <functional>
|
|
63
|
+
#include <memory>
|
|
64
|
+
#include <optional>
|
|
65
|
+
#include <string>
|
|
66
|
+
#include <vector>
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Contains specialized versions of C++ templated types so they can be accessed from Swift,
|
|
70
|
+
* as well as helper functions to interact with those C++ types from Swift.
|
|
71
|
+
*/
|
|
72
|
+
namespace margelo::nitro::nitroposeexercises::bridge::swift {
|
|
73
|
+
|
|
74
|
+
// pragma MARK: std::shared_ptr<Promise<void>>
|
|
75
|
+
/**
|
|
76
|
+
* Specialized version of `std::shared_ptr<Promise<void>>`.
|
|
77
|
+
*/
|
|
78
|
+
using std__shared_ptr_Promise_void__ = std::shared_ptr<Promise<void>>;
|
|
79
|
+
inline std::shared_ptr<Promise<void>> create_std__shared_ptr_Promise_void__() noexcept {
|
|
80
|
+
return Promise<void>::create();
|
|
81
|
+
}
|
|
82
|
+
inline PromiseHolder<void> wrap_std__shared_ptr_Promise_void__(std::shared_ptr<Promise<void>> promise) noexcept {
|
|
83
|
+
return PromiseHolder<void>(std::move(promise));
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// pragma MARK: std::function<void()>
|
|
87
|
+
/**
|
|
88
|
+
* Specialized version of `std::function<void()>`.
|
|
89
|
+
*/
|
|
90
|
+
using Func_void = std::function<void()>;
|
|
91
|
+
/**
|
|
92
|
+
* Wrapper class for a `std::function<void()>`, this can be used from Swift.
|
|
93
|
+
*/
|
|
94
|
+
class Func_void_Wrapper final {
|
|
95
|
+
public:
|
|
96
|
+
explicit Func_void_Wrapper(std::function<void()>&& func): _function(std::make_unique<std::function<void()>>(std::move(func))) {}
|
|
97
|
+
inline void call() const noexcept {
|
|
98
|
+
_function->operator()();
|
|
99
|
+
}
|
|
100
|
+
private:
|
|
101
|
+
std::unique_ptr<std::function<void()>> _function;
|
|
102
|
+
} SWIFT_NONCOPYABLE;
|
|
103
|
+
Func_void create_Func_void(void* NON_NULL swiftClosureWrapper) noexcept;
|
|
104
|
+
inline Func_void_Wrapper wrap_Func_void(Func_void value) noexcept {
|
|
105
|
+
return Func_void_Wrapper(std::move(value));
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
// pragma MARK: std::function<void(const std::exception_ptr& /* error */)>
|
|
109
|
+
/**
|
|
110
|
+
* Specialized version of `std::function<void(const std::exception_ptr&)>`.
|
|
111
|
+
*/
|
|
112
|
+
using Func_void_std__exception_ptr = std::function<void(const std::exception_ptr& /* error */)>;
|
|
113
|
+
/**
|
|
114
|
+
* Wrapper class for a `std::function<void(const std::exception_ptr& / * error * /)>`, this can be used from Swift.
|
|
115
|
+
*/
|
|
116
|
+
class Func_void_std__exception_ptr_Wrapper final {
|
|
117
|
+
public:
|
|
118
|
+
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))) {}
|
|
119
|
+
inline void call(std::exception_ptr error) const noexcept {
|
|
120
|
+
_function->operator()(error);
|
|
121
|
+
}
|
|
122
|
+
private:
|
|
123
|
+
std::unique_ptr<std::function<void(const std::exception_ptr& /* error */)>> _function;
|
|
124
|
+
} SWIFT_NONCOPYABLE;
|
|
125
|
+
Func_void_std__exception_ptr create_Func_void_std__exception_ptr(void* NON_NULL swiftClosureWrapper) noexcept;
|
|
126
|
+
inline Func_void_std__exception_ptr_Wrapper wrap_Func_void_std__exception_ptr(Func_void_std__exception_ptr value) noexcept {
|
|
127
|
+
return Func_void_std__exception_ptr_Wrapper(std::move(value));
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
// pragma MARK: std::vector<AngleDefinition>
|
|
131
|
+
/**
|
|
132
|
+
* Specialized version of `std::vector<AngleDefinition>`.
|
|
133
|
+
*/
|
|
134
|
+
using std__vector_AngleDefinition_ = std::vector<AngleDefinition>;
|
|
135
|
+
inline std::vector<AngleDefinition> create_std__vector_AngleDefinition_(size_t size) noexcept {
|
|
136
|
+
std::vector<AngleDefinition> vector;
|
|
137
|
+
vector.reserve(size);
|
|
138
|
+
return vector;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
// pragma MARK: std::vector<PhaseThreshold>
|
|
142
|
+
/**
|
|
143
|
+
* Specialized version of `std::vector<PhaseThreshold>`.
|
|
144
|
+
*/
|
|
145
|
+
using std__vector_PhaseThreshold_ = std::vector<PhaseThreshold>;
|
|
146
|
+
inline std::vector<PhaseThreshold> create_std__vector_PhaseThreshold_(size_t size) noexcept {
|
|
147
|
+
std::vector<PhaseThreshold> vector;
|
|
148
|
+
vector.reserve(size);
|
|
149
|
+
return vector;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
// pragma MARK: std::vector<ExercisePhase>
|
|
153
|
+
/**
|
|
154
|
+
* Specialized version of `std::vector<ExercisePhase>`.
|
|
155
|
+
*/
|
|
156
|
+
using std__vector_ExercisePhase_ = std::vector<ExercisePhase>;
|
|
157
|
+
inline std::vector<ExercisePhase> create_std__vector_ExercisePhase_(size_t size) noexcept {
|
|
158
|
+
std::vector<ExercisePhase> vector;
|
|
159
|
+
vector.reserve(size);
|
|
160
|
+
return vector;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
// pragma MARK: std::vector<FormRule>
|
|
164
|
+
/**
|
|
165
|
+
* Specialized version of `std::vector<FormRule>`.
|
|
166
|
+
*/
|
|
167
|
+
using std__vector_FormRule_ = std::vector<FormRule>;
|
|
168
|
+
inline std::vector<FormRule> create_std__vector_FormRule_(size_t size) noexcept {
|
|
169
|
+
std::vector<FormRule> vector;
|
|
170
|
+
vector.reserve(size);
|
|
171
|
+
return vector;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
// pragma MARK: std::shared_ptr<margelo::nitro::camera::HybridFrameSpec>
|
|
175
|
+
/**
|
|
176
|
+
* Specialized version of `std::shared_ptr<margelo::nitro::camera::HybridFrameSpec>`.
|
|
177
|
+
*/
|
|
178
|
+
using std__shared_ptr_margelo__nitro__camera__HybridFrameSpec_ = std::shared_ptr<margelo::nitro::camera::HybridFrameSpec>;
|
|
179
|
+
std::shared_ptr<margelo::nitro::camera::HybridFrameSpec> create_std__shared_ptr_margelo__nitro__camera__HybridFrameSpec_(void* NON_NULL swiftUnsafePointer) noexcept;
|
|
180
|
+
void* NON_NULL get_std__shared_ptr_margelo__nitro__camera__HybridFrameSpec_(std__shared_ptr_margelo__nitro__camera__HybridFrameSpec_ cppType);
|
|
181
|
+
|
|
182
|
+
// pragma MARK: std::weak_ptr<margelo::nitro::camera::HybridFrameSpec>
|
|
183
|
+
using std__weak_ptr_margelo__nitro__camera__HybridFrameSpec_ = std::weak_ptr<margelo::nitro::camera::HybridFrameSpec>;
|
|
184
|
+
inline std__weak_ptr_margelo__nitro__camera__HybridFrameSpec_ weakify_std__shared_ptr_margelo__nitro__camera__HybridFrameSpec_(const std::shared_ptr<margelo::nitro::camera::HybridFrameSpec>& strong) noexcept { return strong; }
|
|
185
|
+
|
|
186
|
+
// pragma MARK: std::vector<AngleSnapshot>
|
|
187
|
+
/**
|
|
188
|
+
* Specialized version of `std::vector<AngleSnapshot>`.
|
|
189
|
+
*/
|
|
190
|
+
using std__vector_AngleSnapshot_ = std::vector<AngleSnapshot>;
|
|
191
|
+
inline std::vector<AngleSnapshot> create_std__vector_AngleSnapshot_(size_t size) noexcept {
|
|
192
|
+
std::vector<AngleSnapshot> vector;
|
|
193
|
+
vector.reserve(size);
|
|
194
|
+
return vector;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
// pragma MARK: std::function<void(const RepData& /* data */)>
|
|
198
|
+
/**
|
|
199
|
+
* Specialized version of `std::function<void(const RepData&)>`.
|
|
200
|
+
*/
|
|
201
|
+
using Func_void_RepData = std::function<void(const RepData& /* data */)>;
|
|
202
|
+
/**
|
|
203
|
+
* Wrapper class for a `std::function<void(const RepData& / * data * /)>`, this can be used from Swift.
|
|
204
|
+
*/
|
|
205
|
+
class Func_void_RepData_Wrapper final {
|
|
206
|
+
public:
|
|
207
|
+
explicit Func_void_RepData_Wrapper(std::function<void(const RepData& /* data */)>&& func): _function(std::make_unique<std::function<void(const RepData& /* data */)>>(std::move(func))) {}
|
|
208
|
+
inline void call(RepData data) const noexcept {
|
|
209
|
+
_function->operator()(data);
|
|
210
|
+
}
|
|
211
|
+
private:
|
|
212
|
+
std::unique_ptr<std::function<void(const RepData& /* data */)>> _function;
|
|
213
|
+
} SWIFT_NONCOPYABLE;
|
|
214
|
+
Func_void_RepData create_Func_void_RepData(void* NON_NULL swiftClosureWrapper) noexcept;
|
|
215
|
+
inline Func_void_RepData_Wrapper wrap_Func_void_RepData(Func_void_RepData value) noexcept {
|
|
216
|
+
return Func_void_RepData_Wrapper(std::move(value));
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
// pragma MARK: std::optional<std::function<void(const RepData& /* data */)>>
|
|
220
|
+
/**
|
|
221
|
+
* Specialized version of `std::optional<std::function<void(const RepData& / * data * /)>>`.
|
|
222
|
+
*/
|
|
223
|
+
using std__optional_std__function_void_const_RepData_____data______ = std::optional<std::function<void(const RepData& /* data */)>>;
|
|
224
|
+
inline std::optional<std::function<void(const RepData& /* data */)>> create_std__optional_std__function_void_const_RepData_____data______(const std::function<void(const RepData& /* data */)>& value) noexcept {
|
|
225
|
+
return std::optional<std::function<void(const RepData& /* data */)>>(value);
|
|
226
|
+
}
|
|
227
|
+
inline bool has_value_std__optional_std__function_void_const_RepData_____data______(const std::optional<std::function<void(const RepData& /* data */)>>& optional) noexcept {
|
|
228
|
+
return optional.has_value();
|
|
229
|
+
}
|
|
230
|
+
inline std::function<void(const RepData& /* data */)> get_std__optional_std__function_void_const_RepData_____data______(const std::optional<std::function<void(const RepData& /* data */)>>& optional) noexcept {
|
|
231
|
+
return optional.value();
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
// pragma MARK: std::function<void(ExercisePhase /* phase */)>
|
|
235
|
+
/**
|
|
236
|
+
* Specialized version of `std::function<void(ExercisePhase)>`.
|
|
237
|
+
*/
|
|
238
|
+
using Func_void_ExercisePhase = std::function<void(ExercisePhase /* phase */)>;
|
|
239
|
+
/**
|
|
240
|
+
* Wrapper class for a `std::function<void(ExercisePhase / * phase * /)>`, this can be used from Swift.
|
|
241
|
+
*/
|
|
242
|
+
class Func_void_ExercisePhase_Wrapper final {
|
|
243
|
+
public:
|
|
244
|
+
explicit Func_void_ExercisePhase_Wrapper(std::function<void(ExercisePhase /* phase */)>&& func): _function(std::make_unique<std::function<void(ExercisePhase /* phase */)>>(std::move(func))) {}
|
|
245
|
+
inline void call(int phase) const noexcept {
|
|
246
|
+
_function->operator()(static_cast<ExercisePhase>(phase));
|
|
247
|
+
}
|
|
248
|
+
private:
|
|
249
|
+
std::unique_ptr<std::function<void(ExercisePhase /* phase */)>> _function;
|
|
250
|
+
} SWIFT_NONCOPYABLE;
|
|
251
|
+
Func_void_ExercisePhase create_Func_void_ExercisePhase(void* NON_NULL swiftClosureWrapper) noexcept;
|
|
252
|
+
inline Func_void_ExercisePhase_Wrapper wrap_Func_void_ExercisePhase(Func_void_ExercisePhase value) noexcept {
|
|
253
|
+
return Func_void_ExercisePhase_Wrapper(std::move(value));
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
// pragma MARK: std::optional<std::function<void(ExercisePhase /* phase */)>>
|
|
257
|
+
/**
|
|
258
|
+
* Specialized version of `std::optional<std::function<void(ExercisePhase / * phase * /)>>`.
|
|
259
|
+
*/
|
|
260
|
+
using std__optional_std__function_void_ExercisePhase____phase______ = std::optional<std::function<void(ExercisePhase /* phase */)>>;
|
|
261
|
+
inline std::optional<std::function<void(ExercisePhase /* phase */)>> create_std__optional_std__function_void_ExercisePhase____phase______(const std::function<void(ExercisePhase /* phase */)>& value) noexcept {
|
|
262
|
+
return std::optional<std::function<void(ExercisePhase /* phase */)>>(value);
|
|
263
|
+
}
|
|
264
|
+
inline bool has_value_std__optional_std__function_void_ExercisePhase____phase______(const std::optional<std::function<void(ExercisePhase /* phase */)>>& optional) noexcept {
|
|
265
|
+
return optional.has_value();
|
|
266
|
+
}
|
|
267
|
+
inline std::function<void(ExercisePhase /* phase */)> get_std__optional_std__function_void_ExercisePhase____phase______(const std::optional<std::function<void(ExercisePhase /* phase */)>>& optional) noexcept {
|
|
268
|
+
return optional.value();
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
// pragma MARK: std::function<void(const FormFeedback& /* feedback */)>
|
|
272
|
+
/**
|
|
273
|
+
* Specialized version of `std::function<void(const FormFeedback&)>`.
|
|
274
|
+
*/
|
|
275
|
+
using Func_void_FormFeedback = std::function<void(const FormFeedback& /* feedback */)>;
|
|
276
|
+
/**
|
|
277
|
+
* Wrapper class for a `std::function<void(const FormFeedback& / * feedback * /)>`, this can be used from Swift.
|
|
278
|
+
*/
|
|
279
|
+
class Func_void_FormFeedback_Wrapper final {
|
|
280
|
+
public:
|
|
281
|
+
explicit Func_void_FormFeedback_Wrapper(std::function<void(const FormFeedback& /* feedback */)>&& func): _function(std::make_unique<std::function<void(const FormFeedback& /* feedback */)>>(std::move(func))) {}
|
|
282
|
+
inline void call(FormFeedback feedback) const noexcept {
|
|
283
|
+
_function->operator()(feedback);
|
|
284
|
+
}
|
|
285
|
+
private:
|
|
286
|
+
std::unique_ptr<std::function<void(const FormFeedback& /* feedback */)>> _function;
|
|
287
|
+
} SWIFT_NONCOPYABLE;
|
|
288
|
+
Func_void_FormFeedback create_Func_void_FormFeedback(void* NON_NULL swiftClosureWrapper) noexcept;
|
|
289
|
+
inline Func_void_FormFeedback_Wrapper wrap_Func_void_FormFeedback(Func_void_FormFeedback value) noexcept {
|
|
290
|
+
return Func_void_FormFeedback_Wrapper(std::move(value));
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
// pragma MARK: std::optional<std::function<void(const FormFeedback& /* feedback */)>>
|
|
294
|
+
/**
|
|
295
|
+
* Specialized version of `std::optional<std::function<void(const FormFeedback& / * feedback * /)>>`.
|
|
296
|
+
*/
|
|
297
|
+
using std__optional_std__function_void_const_FormFeedback_____feedback______ = std::optional<std::function<void(const FormFeedback& /* feedback */)>>;
|
|
298
|
+
inline std::optional<std::function<void(const FormFeedback& /* feedback */)>> create_std__optional_std__function_void_const_FormFeedback_____feedback______(const std::function<void(const FormFeedback& /* feedback */)>& value) noexcept {
|
|
299
|
+
return std::optional<std::function<void(const FormFeedback& /* feedback */)>>(value);
|
|
300
|
+
}
|
|
301
|
+
inline bool has_value_std__optional_std__function_void_const_FormFeedback_____feedback______(const std::optional<std::function<void(const FormFeedback& /* feedback */)>>& optional) noexcept {
|
|
302
|
+
return optional.has_value();
|
|
303
|
+
}
|
|
304
|
+
inline std::function<void(const FormFeedback& /* feedback */)> get_std__optional_std__function_void_const_FormFeedback_____feedback______(const std::optional<std::function<void(const FormFeedback& /* feedback */)>>& optional) noexcept {
|
|
305
|
+
return optional.value();
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
// pragma MARK: std::function<void(const HoldProgress& /* progress */)>
|
|
309
|
+
/**
|
|
310
|
+
* Specialized version of `std::function<void(const HoldProgress&)>`.
|
|
311
|
+
*/
|
|
312
|
+
using Func_void_HoldProgress = std::function<void(const HoldProgress& /* progress */)>;
|
|
313
|
+
/**
|
|
314
|
+
* Wrapper class for a `std::function<void(const HoldProgress& / * progress * /)>`, this can be used from Swift.
|
|
315
|
+
*/
|
|
316
|
+
class Func_void_HoldProgress_Wrapper final {
|
|
317
|
+
public:
|
|
318
|
+
explicit Func_void_HoldProgress_Wrapper(std::function<void(const HoldProgress& /* progress */)>&& func): _function(std::make_unique<std::function<void(const HoldProgress& /* progress */)>>(std::move(func))) {}
|
|
319
|
+
inline void call(HoldProgress progress) const noexcept {
|
|
320
|
+
_function->operator()(progress);
|
|
321
|
+
}
|
|
322
|
+
private:
|
|
323
|
+
std::unique_ptr<std::function<void(const HoldProgress& /* progress */)>> _function;
|
|
324
|
+
} SWIFT_NONCOPYABLE;
|
|
325
|
+
Func_void_HoldProgress create_Func_void_HoldProgress(void* NON_NULL swiftClosureWrapper) noexcept;
|
|
326
|
+
inline Func_void_HoldProgress_Wrapper wrap_Func_void_HoldProgress(Func_void_HoldProgress value) noexcept {
|
|
327
|
+
return Func_void_HoldProgress_Wrapper(std::move(value));
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
// pragma MARK: std::optional<std::function<void(const HoldProgress& /* progress */)>>
|
|
331
|
+
/**
|
|
332
|
+
* Specialized version of `std::optional<std::function<void(const HoldProgress& / * progress * /)>>`.
|
|
333
|
+
*/
|
|
334
|
+
using std__optional_std__function_void_const_HoldProgress_____progress______ = std::optional<std::function<void(const HoldProgress& /* progress */)>>;
|
|
335
|
+
inline std::optional<std::function<void(const HoldProgress& /* progress */)>> create_std__optional_std__function_void_const_HoldProgress_____progress______(const std::function<void(const HoldProgress& /* progress */)>& value) noexcept {
|
|
336
|
+
return std::optional<std::function<void(const HoldProgress& /* progress */)>>(value);
|
|
337
|
+
}
|
|
338
|
+
inline bool has_value_std__optional_std__function_void_const_HoldProgress_____progress______(const std::optional<std::function<void(const HoldProgress& /* progress */)>>& optional) noexcept {
|
|
339
|
+
return optional.has_value();
|
|
340
|
+
}
|
|
341
|
+
inline std::function<void(const HoldProgress& /* progress */)> get_std__optional_std__function_void_const_HoldProgress_____progress______(const std::optional<std::function<void(const HoldProgress& /* progress */)>>& optional) noexcept {
|
|
342
|
+
return optional.value();
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
// pragma MARK: std::optional<std::function<void()>>
|
|
346
|
+
/**
|
|
347
|
+
* Specialized version of `std::optional<std::function<void()>>`.
|
|
348
|
+
*/
|
|
349
|
+
using std__optional_std__function_void____ = std::optional<std::function<void()>>;
|
|
350
|
+
inline std::optional<std::function<void()>> create_std__optional_std__function_void____(const std::function<void()>& value) noexcept {
|
|
351
|
+
return std::optional<std::function<void()>>(value);
|
|
352
|
+
}
|
|
353
|
+
inline bool has_value_std__optional_std__function_void____(const std::optional<std::function<void()>>& optional) noexcept {
|
|
354
|
+
return optional.has_value();
|
|
355
|
+
}
|
|
356
|
+
inline std::function<void()> get_std__optional_std__function_void____(const std::optional<std::function<void()>>& optional) noexcept {
|
|
357
|
+
return optional.value();
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
// pragma MARK: std::vector<FormFeedback>
|
|
361
|
+
/**
|
|
362
|
+
* Specialized version of `std::vector<FormFeedback>`.
|
|
363
|
+
*/
|
|
364
|
+
using std__vector_FormFeedback_ = std::vector<FormFeedback>;
|
|
365
|
+
inline std::vector<FormFeedback> create_std__vector_FormFeedback_(size_t size) noexcept {
|
|
366
|
+
std::vector<FormFeedback> vector;
|
|
367
|
+
vector.reserve(size);
|
|
368
|
+
return vector;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
// pragma MARK: std::function<void(const SessionResult& /* result */)>
|
|
372
|
+
/**
|
|
373
|
+
* Specialized version of `std::function<void(const SessionResult&)>`.
|
|
374
|
+
*/
|
|
375
|
+
using Func_void_SessionResult = std::function<void(const SessionResult& /* result */)>;
|
|
376
|
+
/**
|
|
377
|
+
* Wrapper class for a `std::function<void(const SessionResult& / * result * /)>`, this can be used from Swift.
|
|
378
|
+
*/
|
|
379
|
+
class Func_void_SessionResult_Wrapper final {
|
|
380
|
+
public:
|
|
381
|
+
explicit Func_void_SessionResult_Wrapper(std::function<void(const SessionResult& /* result */)>&& func): _function(std::make_unique<std::function<void(const SessionResult& /* result */)>>(std::move(func))) {}
|
|
382
|
+
inline void call(SessionResult result) const noexcept {
|
|
383
|
+
_function->operator()(result);
|
|
384
|
+
}
|
|
385
|
+
private:
|
|
386
|
+
std::unique_ptr<std::function<void(const SessionResult& /* result */)>> _function;
|
|
387
|
+
} SWIFT_NONCOPYABLE;
|
|
388
|
+
Func_void_SessionResult create_Func_void_SessionResult(void* NON_NULL swiftClosureWrapper) noexcept;
|
|
389
|
+
inline Func_void_SessionResult_Wrapper wrap_Func_void_SessionResult(Func_void_SessionResult value) noexcept {
|
|
390
|
+
return Func_void_SessionResult_Wrapper(std::move(value));
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
// pragma MARK: std::optional<std::function<void(const SessionResult& /* result */)>>
|
|
394
|
+
/**
|
|
395
|
+
* Specialized version of `std::optional<std::function<void(const SessionResult& / * result * /)>>`.
|
|
396
|
+
*/
|
|
397
|
+
using std__optional_std__function_void_const_SessionResult_____result______ = std::optional<std::function<void(const SessionResult& /* result */)>>;
|
|
398
|
+
inline std::optional<std::function<void(const SessionResult& /* result */)>> create_std__optional_std__function_void_const_SessionResult_____result______(const std::function<void(const SessionResult& /* result */)>& value) noexcept {
|
|
399
|
+
return std::optional<std::function<void(const SessionResult& /* result */)>>(value);
|
|
400
|
+
}
|
|
401
|
+
inline bool has_value_std__optional_std__function_void_const_SessionResult_____result______(const std::optional<std::function<void(const SessionResult& /* result */)>>& optional) noexcept {
|
|
402
|
+
return optional.has_value();
|
|
403
|
+
}
|
|
404
|
+
inline std::function<void(const SessionResult& /* result */)> get_std__optional_std__function_void_const_SessionResult_____result______(const std::optional<std::function<void(const SessionResult& /* result */)>>& optional) noexcept {
|
|
405
|
+
return optional.value();
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
// pragma MARK: std::vector<Landmark>
|
|
409
|
+
/**
|
|
410
|
+
* Specialized version of `std::vector<Landmark>`.
|
|
411
|
+
*/
|
|
412
|
+
using std__vector_Landmark_ = std::vector<Landmark>;
|
|
413
|
+
inline std::vector<Landmark> create_std__vector_Landmark_(size_t size) noexcept {
|
|
414
|
+
std::vector<Landmark> vector;
|
|
415
|
+
vector.reserve(size);
|
|
416
|
+
return vector;
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
// pragma MARK: std::shared_ptr<HybridNitroPoseExercisesSpec>
|
|
420
|
+
/**
|
|
421
|
+
* Specialized version of `std::shared_ptr<HybridNitroPoseExercisesSpec>`.
|
|
422
|
+
*/
|
|
423
|
+
using std__shared_ptr_HybridNitroPoseExercisesSpec_ = std::shared_ptr<HybridNitroPoseExercisesSpec>;
|
|
424
|
+
std::shared_ptr<HybridNitroPoseExercisesSpec> create_std__shared_ptr_HybridNitroPoseExercisesSpec_(void* NON_NULL swiftUnsafePointer) noexcept;
|
|
425
|
+
void* NON_NULL get_std__shared_ptr_HybridNitroPoseExercisesSpec_(std__shared_ptr_HybridNitroPoseExercisesSpec_ cppType);
|
|
426
|
+
|
|
427
|
+
// pragma MARK: std::weak_ptr<HybridNitroPoseExercisesSpec>
|
|
428
|
+
using std__weak_ptr_HybridNitroPoseExercisesSpec_ = std::weak_ptr<HybridNitroPoseExercisesSpec>;
|
|
429
|
+
inline std__weak_ptr_HybridNitroPoseExercisesSpec_ weakify_std__shared_ptr_HybridNitroPoseExercisesSpec_(const std::shared_ptr<HybridNitroPoseExercisesSpec>& strong) noexcept { return strong; }
|
|
430
|
+
|
|
431
|
+
// pragma MARK: Result<std::shared_ptr<Promise<void>>>
|
|
432
|
+
using Result_std__shared_ptr_Promise_void___ = Result<std::shared_ptr<Promise<void>>>;
|
|
433
|
+
inline Result_std__shared_ptr_Promise_void___ create_Result_std__shared_ptr_Promise_void___(const std::shared_ptr<Promise<void>>& value) noexcept {
|
|
434
|
+
return Result<std::shared_ptr<Promise<void>>>::withValue(value);
|
|
435
|
+
}
|
|
436
|
+
inline Result_std__shared_ptr_Promise_void___ create_Result_std__shared_ptr_Promise_void___(const std::exception_ptr& error) noexcept {
|
|
437
|
+
return Result<std::shared_ptr<Promise<void>>>::withError(error);
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
// pragma MARK: Result<void>
|
|
441
|
+
using Result_void_ = Result<void>;
|
|
442
|
+
inline Result_void_ create_Result_void_() noexcept {
|
|
443
|
+
return Result<void>::withValue();
|
|
444
|
+
}
|
|
445
|
+
inline Result_void_ create_Result_void_(const std::exception_ptr& error) noexcept {
|
|
446
|
+
return Result<void>::withError(error);
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
} // namespace margelo::nitro::nitroposeexercises::bridge::swift
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// NitroPoseExercises-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 `AngleDefinition` to properly resolve imports.
|
|
12
|
+
namespace margelo::nitro::nitroposeexercises { struct AngleDefinition; }
|
|
13
|
+
// Forward declaration of `AngleSnapshot` to properly resolve imports.
|
|
14
|
+
namespace margelo::nitro::nitroposeexercises { struct AngleSnapshot; }
|
|
15
|
+
// Forward declaration of `ExerciseConfig` to properly resolve imports.
|
|
16
|
+
namespace margelo::nitro::nitroposeexercises { struct ExerciseConfig; }
|
|
17
|
+
// Forward declaration of `ExercisePhase` to properly resolve imports.
|
|
18
|
+
namespace margelo::nitro::nitroposeexercises { enum class ExercisePhase; }
|
|
19
|
+
// Forward declaration of `ExerciseType` to properly resolve imports.
|
|
20
|
+
namespace margelo::nitro::nitroposeexercises { enum class ExerciseType; }
|
|
21
|
+
// Forward declaration of `FormFeedback` to properly resolve imports.
|
|
22
|
+
namespace margelo::nitro::nitroposeexercises { struct FormFeedback; }
|
|
23
|
+
// Forward declaration of `FormRule` to properly resolve imports.
|
|
24
|
+
namespace margelo::nitro::nitroposeexercises { struct FormRule; }
|
|
25
|
+
// Forward declaration of `FormSeverity` to properly resolve imports.
|
|
26
|
+
namespace margelo::nitro::nitroposeexercises { enum class FormSeverity; }
|
|
27
|
+
// Forward declaration of `HoldProgress` to properly resolve imports.
|
|
28
|
+
namespace margelo::nitro::nitroposeexercises { struct HoldProgress; }
|
|
29
|
+
// Forward declaration of `HybridFrameSpec` to properly resolve imports.
|
|
30
|
+
namespace margelo::nitro::camera { class HybridFrameSpec; }
|
|
31
|
+
// Forward declaration of `HybridNitroPoseExercisesSpec` to properly resolve imports.
|
|
32
|
+
namespace margelo::nitro::nitroposeexercises { class HybridNitroPoseExercisesSpec; }
|
|
33
|
+
// Forward declaration of `Landmark` to properly resolve imports.
|
|
34
|
+
namespace margelo::nitro::nitroposeexercises { struct Landmark; }
|
|
35
|
+
// Forward declaration of `PhaseThreshold` to properly resolve imports.
|
|
36
|
+
namespace margelo::nitro::nitroposeexercises { struct PhaseThreshold; }
|
|
37
|
+
// Forward declaration of `RepData` to properly resolve imports.
|
|
38
|
+
namespace margelo::nitro::nitroposeexercises { struct RepData; }
|
|
39
|
+
// Forward declaration of `SessionResult` to properly resolve imports.
|
|
40
|
+
namespace margelo::nitro::nitroposeexercises { struct SessionResult; }
|
|
41
|
+
// Forward declaration of `SessionStatus` to properly resolve imports.
|
|
42
|
+
namespace margelo::nitro::nitroposeexercises { enum class SessionStatus; }
|
|
43
|
+
|
|
44
|
+
// Include C++ defined types
|
|
45
|
+
#include "AngleDefinition.hpp"
|
|
46
|
+
#include "AngleSnapshot.hpp"
|
|
47
|
+
#include "ExerciseConfig.hpp"
|
|
48
|
+
#include "ExercisePhase.hpp"
|
|
49
|
+
#include "ExerciseType.hpp"
|
|
50
|
+
#include "FormFeedback.hpp"
|
|
51
|
+
#include "FormRule.hpp"
|
|
52
|
+
#include "FormSeverity.hpp"
|
|
53
|
+
#include "HoldProgress.hpp"
|
|
54
|
+
#include "HybridNitroPoseExercisesSpec.hpp"
|
|
55
|
+
#include "Landmark.hpp"
|
|
56
|
+
#include "PhaseThreshold.hpp"
|
|
57
|
+
#include "RepData.hpp"
|
|
58
|
+
#include "SessionResult.hpp"
|
|
59
|
+
#include "SessionStatus.hpp"
|
|
60
|
+
#include <NitroModules/Promise.hpp>
|
|
61
|
+
#include <NitroModules/Result.hpp>
|
|
62
|
+
#include <VisionCamera/HybridFrameSpec.hpp>
|
|
63
|
+
#include <exception>
|
|
64
|
+
#include <functional>
|
|
65
|
+
#include <memory>
|
|
66
|
+
#include <optional>
|
|
67
|
+
#include <string>
|
|
68
|
+
#include <vector>
|
|
69
|
+
|
|
70
|
+
// C++ helpers for Swift
|
|
71
|
+
#include "NitroPoseExercises-Swift-Cxx-Bridge.hpp"
|
|
72
|
+
|
|
73
|
+
// Common C++ types used in Swift
|
|
74
|
+
#include <NitroModules/ArrayBufferHolder.hpp>
|
|
75
|
+
#include <NitroModules/AnyMapUtils.hpp>
|
|
76
|
+
#include <NitroModules/RuntimeError.hpp>
|
|
77
|
+
#include <NitroModules/DateToChronoDate.hpp>
|
|
78
|
+
|
|
79
|
+
// Forward declarations of Swift defined types
|
|
80
|
+
// Forward declaration of `HybridFrameSpec_cxx` to properly resolve imports.
|
|
81
|
+
namespace VisionCamera { class HybridFrameSpec_cxx; }
|
|
82
|
+
// Forward declaration of `HybridNitroPoseExercisesSpec_cxx` to properly resolve imports.
|
|
83
|
+
namespace NitroPoseExercises { class HybridNitroPoseExercisesSpec_cxx; }
|
|
84
|
+
|
|
85
|
+
// Include Swift defined types
|
|
86
|
+
#if __has_include("NitroPoseExercises-Swift.h")
|
|
87
|
+
// This header is generated by Xcode/Swift on every app build.
|
|
88
|
+
// If it cannot be found, make sure the Swift module's name (= podspec name) is actually "NitroPoseExercises".
|
|
89
|
+
#include "NitroPoseExercises-Swift.h"
|
|
90
|
+
// Same as above, but used when building with frameworks (`use_frameworks`)
|
|
91
|
+
#elif __has_include(<NitroPoseExercises/NitroPoseExercises-Swift.h>)
|
|
92
|
+
#include <NitroPoseExercises/NitroPoseExercises-Swift.h>
|
|
93
|
+
#else
|
|
94
|
+
#error NitroPoseExercises's autogenerated Swift header cannot be found! Make sure the Swift module's name (= podspec name) is actually "NitroPoseExercises", and try building the app first.
|
|
95
|
+
#endif
|