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,79 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JFormRule.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#include <fbjni/fbjni.h>
|
|
11
|
+
#include "FormRule.hpp"
|
|
12
|
+
|
|
13
|
+
#include "FormSeverity.hpp"
|
|
14
|
+
#include "JFormSeverity.hpp"
|
|
15
|
+
#include <string>
|
|
16
|
+
|
|
17
|
+
namespace margelo::nitro::nitroposeexercises {
|
|
18
|
+
|
|
19
|
+
using namespace facebook;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* The C++ JNI bridge between the C++ struct "FormRule" and the the Kotlin data class "FormRule".
|
|
23
|
+
*/
|
|
24
|
+
struct JFormRule final: public jni::JavaClass<JFormRule> {
|
|
25
|
+
public:
|
|
26
|
+
static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/nitroposeexercises/FormRule;";
|
|
27
|
+
|
|
28
|
+
public:
|
|
29
|
+
/**
|
|
30
|
+
* Convert this Java/Kotlin-based struct to the C++ struct FormRule by copying all values to C++.
|
|
31
|
+
*/
|
|
32
|
+
[[maybe_unused]]
|
|
33
|
+
[[nodiscard]]
|
|
34
|
+
FormRule toCpp() const {
|
|
35
|
+
static const auto clazz = javaClassStatic();
|
|
36
|
+
static const auto fieldName = clazz->getField<jni::JString>("name");
|
|
37
|
+
jni::local_ref<jni::JString> name = this->getFieldValue(fieldName);
|
|
38
|
+
static const auto fieldMessage = clazz->getField<jni::JString>("message");
|
|
39
|
+
jni::local_ref<jni::JString> message = this->getFieldValue(fieldMessage);
|
|
40
|
+
static const auto fieldSeverity = clazz->getField<JFormSeverity>("severity");
|
|
41
|
+
jni::local_ref<JFormSeverity> severity = this->getFieldValue(fieldSeverity);
|
|
42
|
+
static const auto fieldAngleName = clazz->getField<jni::JString>("angleName");
|
|
43
|
+
jni::local_ref<jni::JString> angleName = this->getFieldValue(fieldAngleName);
|
|
44
|
+
static const auto fieldMinAngle = clazz->getField<double>("minAngle");
|
|
45
|
+
double minAngle = this->getFieldValue(fieldMinAngle);
|
|
46
|
+
static const auto fieldMaxAngle = clazz->getField<double>("maxAngle");
|
|
47
|
+
double maxAngle = this->getFieldValue(fieldMaxAngle);
|
|
48
|
+
return FormRule(
|
|
49
|
+
name->toStdString(),
|
|
50
|
+
message->toStdString(),
|
|
51
|
+
severity->toCpp(),
|
|
52
|
+
angleName->toStdString(),
|
|
53
|
+
minAngle,
|
|
54
|
+
maxAngle
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
public:
|
|
59
|
+
/**
|
|
60
|
+
* Create a Java/Kotlin-based struct by copying all values from the given C++ struct to Java.
|
|
61
|
+
*/
|
|
62
|
+
[[maybe_unused]]
|
|
63
|
+
static jni::local_ref<JFormRule::javaobject> fromCpp(const FormRule& value) {
|
|
64
|
+
using JSignature = JFormRule(jni::alias_ref<jni::JString>, jni::alias_ref<jni::JString>, jni::alias_ref<JFormSeverity>, jni::alias_ref<jni::JString>, double, double);
|
|
65
|
+
static const auto clazz = javaClassStatic();
|
|
66
|
+
static const auto create = clazz->getStaticMethod<JSignature>("fromCpp");
|
|
67
|
+
return create(
|
|
68
|
+
clazz,
|
|
69
|
+
jni::make_jstring(value.name),
|
|
70
|
+
jni::make_jstring(value.message),
|
|
71
|
+
JFormSeverity::fromCpp(value.severity),
|
|
72
|
+
jni::make_jstring(value.angleName),
|
|
73
|
+
value.minAngle,
|
|
74
|
+
value.maxAngle
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
} // namespace margelo::nitro::nitroposeexercises
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JFormSeverity.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#include <fbjni/fbjni.h>
|
|
11
|
+
#include "FormSeverity.hpp"
|
|
12
|
+
|
|
13
|
+
namespace margelo::nitro::nitroposeexercises {
|
|
14
|
+
|
|
15
|
+
using namespace facebook;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* The C++ JNI bridge between the C++ enum "FormSeverity" and the the Kotlin enum "FormSeverity".
|
|
19
|
+
*/
|
|
20
|
+
struct JFormSeverity final: public jni::JavaClass<JFormSeverity> {
|
|
21
|
+
public:
|
|
22
|
+
static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/nitroposeexercises/FormSeverity;";
|
|
23
|
+
|
|
24
|
+
public:
|
|
25
|
+
/**
|
|
26
|
+
* Convert this Java/Kotlin-based enum to the C++ enum FormSeverity.
|
|
27
|
+
*/
|
|
28
|
+
[[maybe_unused]]
|
|
29
|
+
[[nodiscard]]
|
|
30
|
+
FormSeverity toCpp() const {
|
|
31
|
+
static const auto clazz = javaClassStatic();
|
|
32
|
+
static const auto fieldOrdinal = clazz->getField<int>("value");
|
|
33
|
+
int ordinal = this->getFieldValue(fieldOrdinal);
|
|
34
|
+
return static_cast<FormSeverity>(ordinal);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
public:
|
|
38
|
+
/**
|
|
39
|
+
* Create a Java/Kotlin-based enum with the given C++ enum's value.
|
|
40
|
+
*/
|
|
41
|
+
[[maybe_unused]]
|
|
42
|
+
static jni::alias_ref<JFormSeverity> fromCpp(FormSeverity value) {
|
|
43
|
+
static const auto clazz = javaClassStatic();
|
|
44
|
+
switch (value) {
|
|
45
|
+
case FormSeverity::INFO:
|
|
46
|
+
static const auto fieldINFO = clazz->getStaticField<JFormSeverity>("INFO");
|
|
47
|
+
return clazz->getStaticFieldValue(fieldINFO);
|
|
48
|
+
case FormSeverity::WARNING:
|
|
49
|
+
static const auto fieldWARNING = clazz->getStaticField<JFormSeverity>("WARNING");
|
|
50
|
+
return clazz->getStaticFieldValue(fieldWARNING);
|
|
51
|
+
case FormSeverity::ERROR:
|
|
52
|
+
static const auto fieldERROR = clazz->getStaticField<JFormSeverity>("ERROR");
|
|
53
|
+
return clazz->getStaticFieldValue(fieldERROR);
|
|
54
|
+
default:
|
|
55
|
+
std::string stringValue = std::to_string(static_cast<int>(value));
|
|
56
|
+
throw std::invalid_argument("Invalid enum value (" + stringValue + "!");
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
} // namespace margelo::nitro::nitroposeexercises
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JFunc_void.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#include <fbjni/fbjni.h>
|
|
11
|
+
#include <functional>
|
|
12
|
+
|
|
13
|
+
#include <functional>
|
|
14
|
+
#include <NitroModules/JNICallable.hpp>
|
|
15
|
+
|
|
16
|
+
namespace margelo::nitro::nitroposeexercises {
|
|
17
|
+
|
|
18
|
+
using namespace facebook;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Represents the Java/Kotlin callback `() -> Unit`.
|
|
22
|
+
* This can be passed around between C++ and Java/Kotlin.
|
|
23
|
+
*/
|
|
24
|
+
struct JFunc_void: public jni::JavaClass<JFunc_void> {
|
|
25
|
+
public:
|
|
26
|
+
static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/nitroposeexercises/Func_void;";
|
|
27
|
+
|
|
28
|
+
public:
|
|
29
|
+
/**
|
|
30
|
+
* Invokes the function this `JFunc_void` instance holds through JNI.
|
|
31
|
+
*/
|
|
32
|
+
void invoke() const {
|
|
33
|
+
static const auto method = javaClassStatic()->getMethod<void()>("invoke");
|
|
34
|
+
method(self());
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* An implementation of Func_void that is backed by a C++ implementation (using `std::function<...>`)
|
|
40
|
+
*/
|
|
41
|
+
class JFunc_void_cxx final: public jni::HybridClass<JFunc_void_cxx, JFunc_void> {
|
|
42
|
+
public:
|
|
43
|
+
static jni::local_ref<JFunc_void::javaobject> fromCpp(const std::function<void()>& func) {
|
|
44
|
+
return JFunc_void_cxx::newObjectCxxArgs(func);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
public:
|
|
48
|
+
/**
|
|
49
|
+
* Invokes the C++ `std::function<...>` this `JFunc_void_cxx` instance holds.
|
|
50
|
+
*/
|
|
51
|
+
void invoke_cxx() {
|
|
52
|
+
_func();
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
public:
|
|
56
|
+
[[nodiscard]]
|
|
57
|
+
inline const std::function<void()>& getFunction() const {
|
|
58
|
+
return _func;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
public:
|
|
62
|
+
static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/nitroposeexercises/Func_void_cxx;";
|
|
63
|
+
static void registerNatives() {
|
|
64
|
+
registerHybrid({makeNativeMethod("invoke_cxx", JFunc_void_cxx::invoke_cxx)});
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
private:
|
|
68
|
+
explicit JFunc_void_cxx(const std::function<void()>& func): _func(func) { }
|
|
69
|
+
|
|
70
|
+
private:
|
|
71
|
+
friend HybridBase;
|
|
72
|
+
std::function<void()> _func;
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
} // namespace margelo::nitro::nitroposeexercises
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JFunc_void_ExercisePhase.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#include <fbjni/fbjni.h>
|
|
11
|
+
#include <functional>
|
|
12
|
+
|
|
13
|
+
#include "ExercisePhase.hpp"
|
|
14
|
+
#include <functional>
|
|
15
|
+
#include <NitroModules/JNICallable.hpp>
|
|
16
|
+
#include "JExercisePhase.hpp"
|
|
17
|
+
|
|
18
|
+
namespace margelo::nitro::nitroposeexercises {
|
|
19
|
+
|
|
20
|
+
using namespace facebook;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Represents the Java/Kotlin callback `(phase: ExercisePhase) -> Unit`.
|
|
24
|
+
* This can be passed around between C++ and Java/Kotlin.
|
|
25
|
+
*/
|
|
26
|
+
struct JFunc_void_ExercisePhase: public jni::JavaClass<JFunc_void_ExercisePhase> {
|
|
27
|
+
public:
|
|
28
|
+
static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/nitroposeexercises/Func_void_ExercisePhase;";
|
|
29
|
+
|
|
30
|
+
public:
|
|
31
|
+
/**
|
|
32
|
+
* Invokes the function this `JFunc_void_ExercisePhase` instance holds through JNI.
|
|
33
|
+
*/
|
|
34
|
+
void invoke(ExercisePhase phase) const {
|
|
35
|
+
static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<JExercisePhase> /* phase */)>("invoke");
|
|
36
|
+
method(self(), JExercisePhase::fromCpp(phase));
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* An implementation of Func_void_ExercisePhase that is backed by a C++ implementation (using `std::function<...>`)
|
|
42
|
+
*/
|
|
43
|
+
class JFunc_void_ExercisePhase_cxx final: public jni::HybridClass<JFunc_void_ExercisePhase_cxx, JFunc_void_ExercisePhase> {
|
|
44
|
+
public:
|
|
45
|
+
static jni::local_ref<JFunc_void_ExercisePhase::javaobject> fromCpp(const std::function<void(ExercisePhase /* phase */)>& func) {
|
|
46
|
+
return JFunc_void_ExercisePhase_cxx::newObjectCxxArgs(func);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
public:
|
|
50
|
+
/**
|
|
51
|
+
* Invokes the C++ `std::function<...>` this `JFunc_void_ExercisePhase_cxx` instance holds.
|
|
52
|
+
*/
|
|
53
|
+
void invoke_cxx(jni::alias_ref<JExercisePhase> phase) {
|
|
54
|
+
_func(phase->toCpp());
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
public:
|
|
58
|
+
[[nodiscard]]
|
|
59
|
+
inline const std::function<void(ExercisePhase /* phase */)>& getFunction() const {
|
|
60
|
+
return _func;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
public:
|
|
64
|
+
static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/nitroposeexercises/Func_void_ExercisePhase_cxx;";
|
|
65
|
+
static void registerNatives() {
|
|
66
|
+
registerHybrid({makeNativeMethod("invoke_cxx", JFunc_void_ExercisePhase_cxx::invoke_cxx)});
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
private:
|
|
70
|
+
explicit JFunc_void_ExercisePhase_cxx(const std::function<void(ExercisePhase /* phase */)>& func): _func(func) { }
|
|
71
|
+
|
|
72
|
+
private:
|
|
73
|
+
friend HybridBase;
|
|
74
|
+
std::function<void(ExercisePhase /* phase */)> _func;
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
} // namespace margelo::nitro::nitroposeexercises
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JFunc_void_FormFeedback.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#include <fbjni/fbjni.h>
|
|
11
|
+
#include <functional>
|
|
12
|
+
|
|
13
|
+
#include "FormFeedback.hpp"
|
|
14
|
+
#include <functional>
|
|
15
|
+
#include <NitroModules/JNICallable.hpp>
|
|
16
|
+
#include "JFormFeedback.hpp"
|
|
17
|
+
#include <string>
|
|
18
|
+
#include "FormSeverity.hpp"
|
|
19
|
+
#include "JFormSeverity.hpp"
|
|
20
|
+
|
|
21
|
+
namespace margelo::nitro::nitroposeexercises {
|
|
22
|
+
|
|
23
|
+
using namespace facebook;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Represents the Java/Kotlin callback `(feedback: FormFeedback) -> Unit`.
|
|
27
|
+
* This can be passed around between C++ and Java/Kotlin.
|
|
28
|
+
*/
|
|
29
|
+
struct JFunc_void_FormFeedback: public jni::JavaClass<JFunc_void_FormFeedback> {
|
|
30
|
+
public:
|
|
31
|
+
static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/nitroposeexercises/Func_void_FormFeedback;";
|
|
32
|
+
|
|
33
|
+
public:
|
|
34
|
+
/**
|
|
35
|
+
* Invokes the function this `JFunc_void_FormFeedback` instance holds through JNI.
|
|
36
|
+
*/
|
|
37
|
+
void invoke(const FormFeedback& feedback) const {
|
|
38
|
+
static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<JFormFeedback> /* feedback */)>("invoke");
|
|
39
|
+
method(self(), JFormFeedback::fromCpp(feedback));
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* An implementation of Func_void_FormFeedback that is backed by a C++ implementation (using `std::function<...>`)
|
|
45
|
+
*/
|
|
46
|
+
class JFunc_void_FormFeedback_cxx final: public jni::HybridClass<JFunc_void_FormFeedback_cxx, JFunc_void_FormFeedback> {
|
|
47
|
+
public:
|
|
48
|
+
static jni::local_ref<JFunc_void_FormFeedback::javaobject> fromCpp(const std::function<void(const FormFeedback& /* feedback */)>& func) {
|
|
49
|
+
return JFunc_void_FormFeedback_cxx::newObjectCxxArgs(func);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
public:
|
|
53
|
+
/**
|
|
54
|
+
* Invokes the C++ `std::function<...>` this `JFunc_void_FormFeedback_cxx` instance holds.
|
|
55
|
+
*/
|
|
56
|
+
void invoke_cxx(jni::alias_ref<JFormFeedback> feedback) {
|
|
57
|
+
_func(feedback->toCpp());
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
public:
|
|
61
|
+
[[nodiscard]]
|
|
62
|
+
inline const std::function<void(const FormFeedback& /* feedback */)>& getFunction() const {
|
|
63
|
+
return _func;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
public:
|
|
67
|
+
static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/nitroposeexercises/Func_void_FormFeedback_cxx;";
|
|
68
|
+
static void registerNatives() {
|
|
69
|
+
registerHybrid({makeNativeMethod("invoke_cxx", JFunc_void_FormFeedback_cxx::invoke_cxx)});
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
private:
|
|
73
|
+
explicit JFunc_void_FormFeedback_cxx(const std::function<void(const FormFeedback& /* feedback */)>& func): _func(func) { }
|
|
74
|
+
|
|
75
|
+
private:
|
|
76
|
+
friend HybridBase;
|
|
77
|
+
std::function<void(const FormFeedback& /* feedback */)> _func;
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
} // namespace margelo::nitro::nitroposeexercises
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JFunc_void_HoldProgress.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#include <fbjni/fbjni.h>
|
|
11
|
+
#include <functional>
|
|
12
|
+
|
|
13
|
+
#include "HoldProgress.hpp"
|
|
14
|
+
#include <functional>
|
|
15
|
+
#include <NitroModules/JNICallable.hpp>
|
|
16
|
+
#include "JHoldProgress.hpp"
|
|
17
|
+
|
|
18
|
+
namespace margelo::nitro::nitroposeexercises {
|
|
19
|
+
|
|
20
|
+
using namespace facebook;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Represents the Java/Kotlin callback `(progress: HoldProgress) -> Unit`.
|
|
24
|
+
* This can be passed around between C++ and Java/Kotlin.
|
|
25
|
+
*/
|
|
26
|
+
struct JFunc_void_HoldProgress: public jni::JavaClass<JFunc_void_HoldProgress> {
|
|
27
|
+
public:
|
|
28
|
+
static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/nitroposeexercises/Func_void_HoldProgress;";
|
|
29
|
+
|
|
30
|
+
public:
|
|
31
|
+
/**
|
|
32
|
+
* Invokes the function this `JFunc_void_HoldProgress` instance holds through JNI.
|
|
33
|
+
*/
|
|
34
|
+
void invoke(const HoldProgress& progress) const {
|
|
35
|
+
static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<JHoldProgress> /* progress */)>("invoke");
|
|
36
|
+
method(self(), JHoldProgress::fromCpp(progress));
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* An implementation of Func_void_HoldProgress that is backed by a C++ implementation (using `std::function<...>`)
|
|
42
|
+
*/
|
|
43
|
+
class JFunc_void_HoldProgress_cxx final: public jni::HybridClass<JFunc_void_HoldProgress_cxx, JFunc_void_HoldProgress> {
|
|
44
|
+
public:
|
|
45
|
+
static jni::local_ref<JFunc_void_HoldProgress::javaobject> fromCpp(const std::function<void(const HoldProgress& /* progress */)>& func) {
|
|
46
|
+
return JFunc_void_HoldProgress_cxx::newObjectCxxArgs(func);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
public:
|
|
50
|
+
/**
|
|
51
|
+
* Invokes the C++ `std::function<...>` this `JFunc_void_HoldProgress_cxx` instance holds.
|
|
52
|
+
*/
|
|
53
|
+
void invoke_cxx(jni::alias_ref<JHoldProgress> progress) {
|
|
54
|
+
_func(progress->toCpp());
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
public:
|
|
58
|
+
[[nodiscard]]
|
|
59
|
+
inline const std::function<void(const HoldProgress& /* progress */)>& getFunction() const {
|
|
60
|
+
return _func;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
public:
|
|
64
|
+
static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/nitroposeexercises/Func_void_HoldProgress_cxx;";
|
|
65
|
+
static void registerNatives() {
|
|
66
|
+
registerHybrid({makeNativeMethod("invoke_cxx", JFunc_void_HoldProgress_cxx::invoke_cxx)});
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
private:
|
|
70
|
+
explicit JFunc_void_HoldProgress_cxx(const std::function<void(const HoldProgress& /* progress */)>& func): _func(func) { }
|
|
71
|
+
|
|
72
|
+
private:
|
|
73
|
+
friend HybridBase;
|
|
74
|
+
std::function<void(const HoldProgress& /* progress */)> _func;
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
} // namespace margelo::nitro::nitroposeexercises
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JFunc_void_RepData.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#include <fbjni/fbjni.h>
|
|
11
|
+
#include <functional>
|
|
12
|
+
|
|
13
|
+
#include "RepData.hpp"
|
|
14
|
+
#include <functional>
|
|
15
|
+
#include <NitroModules/JNICallable.hpp>
|
|
16
|
+
#include "JRepData.hpp"
|
|
17
|
+
#include "AngleSnapshot.hpp"
|
|
18
|
+
#include <vector>
|
|
19
|
+
#include "JAngleSnapshot.hpp"
|
|
20
|
+
#include <string>
|
|
21
|
+
|
|
22
|
+
namespace margelo::nitro::nitroposeexercises {
|
|
23
|
+
|
|
24
|
+
using namespace facebook;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Represents the Java/Kotlin callback `(data: RepData) -> Unit`.
|
|
28
|
+
* This can be passed around between C++ and Java/Kotlin.
|
|
29
|
+
*/
|
|
30
|
+
struct JFunc_void_RepData: public jni::JavaClass<JFunc_void_RepData> {
|
|
31
|
+
public:
|
|
32
|
+
static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/nitroposeexercises/Func_void_RepData;";
|
|
33
|
+
|
|
34
|
+
public:
|
|
35
|
+
/**
|
|
36
|
+
* Invokes the function this `JFunc_void_RepData` instance holds through JNI.
|
|
37
|
+
*/
|
|
38
|
+
void invoke(const RepData& data) const {
|
|
39
|
+
static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<JRepData> /* data */)>("invoke");
|
|
40
|
+
method(self(), JRepData::fromCpp(data));
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* An implementation of Func_void_RepData that is backed by a C++ implementation (using `std::function<...>`)
|
|
46
|
+
*/
|
|
47
|
+
class JFunc_void_RepData_cxx final: public jni::HybridClass<JFunc_void_RepData_cxx, JFunc_void_RepData> {
|
|
48
|
+
public:
|
|
49
|
+
static jni::local_ref<JFunc_void_RepData::javaobject> fromCpp(const std::function<void(const RepData& /* data */)>& func) {
|
|
50
|
+
return JFunc_void_RepData_cxx::newObjectCxxArgs(func);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
public:
|
|
54
|
+
/**
|
|
55
|
+
* Invokes the C++ `std::function<...>` this `JFunc_void_RepData_cxx` instance holds.
|
|
56
|
+
*/
|
|
57
|
+
void invoke_cxx(jni::alias_ref<JRepData> data) {
|
|
58
|
+
_func(data->toCpp());
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
public:
|
|
62
|
+
[[nodiscard]]
|
|
63
|
+
inline const std::function<void(const RepData& /* data */)>& getFunction() const {
|
|
64
|
+
return _func;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
public:
|
|
68
|
+
static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/nitroposeexercises/Func_void_RepData_cxx;";
|
|
69
|
+
static void registerNatives() {
|
|
70
|
+
registerHybrid({makeNativeMethod("invoke_cxx", JFunc_void_RepData_cxx::invoke_cxx)});
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
private:
|
|
74
|
+
explicit JFunc_void_RepData_cxx(const std::function<void(const RepData& /* data */)>& func): _func(func) { }
|
|
75
|
+
|
|
76
|
+
private:
|
|
77
|
+
friend HybridBase;
|
|
78
|
+
std::function<void(const RepData& /* data */)> _func;
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
} // namespace margelo::nitro::nitroposeexercises
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JFunc_void_SessionResult.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#include <fbjni/fbjni.h>
|
|
11
|
+
#include <functional>
|
|
12
|
+
|
|
13
|
+
#include "SessionResult.hpp"
|
|
14
|
+
#include <functional>
|
|
15
|
+
#include <NitroModules/JNICallable.hpp>
|
|
16
|
+
#include "JSessionResult.hpp"
|
|
17
|
+
#include "FormFeedback.hpp"
|
|
18
|
+
#include <vector>
|
|
19
|
+
#include "JFormFeedback.hpp"
|
|
20
|
+
#include <string>
|
|
21
|
+
#include "FormSeverity.hpp"
|
|
22
|
+
#include "JFormSeverity.hpp"
|
|
23
|
+
#include "AngleSnapshot.hpp"
|
|
24
|
+
#include "JAngleSnapshot.hpp"
|
|
25
|
+
|
|
26
|
+
namespace margelo::nitro::nitroposeexercises {
|
|
27
|
+
|
|
28
|
+
using namespace facebook;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Represents the Java/Kotlin callback `(result: SessionResult) -> Unit`.
|
|
32
|
+
* This can be passed around between C++ and Java/Kotlin.
|
|
33
|
+
*/
|
|
34
|
+
struct JFunc_void_SessionResult: public jni::JavaClass<JFunc_void_SessionResult> {
|
|
35
|
+
public:
|
|
36
|
+
static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/nitroposeexercises/Func_void_SessionResult;";
|
|
37
|
+
|
|
38
|
+
public:
|
|
39
|
+
/**
|
|
40
|
+
* Invokes the function this `JFunc_void_SessionResult` instance holds through JNI.
|
|
41
|
+
*/
|
|
42
|
+
void invoke(const SessionResult& result) const {
|
|
43
|
+
static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<JSessionResult> /* result */)>("invoke");
|
|
44
|
+
method(self(), JSessionResult::fromCpp(result));
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* An implementation of Func_void_SessionResult that is backed by a C++ implementation (using `std::function<...>`)
|
|
50
|
+
*/
|
|
51
|
+
class JFunc_void_SessionResult_cxx final: public jni::HybridClass<JFunc_void_SessionResult_cxx, JFunc_void_SessionResult> {
|
|
52
|
+
public:
|
|
53
|
+
static jni::local_ref<JFunc_void_SessionResult::javaobject> fromCpp(const std::function<void(const SessionResult& /* result */)>& func) {
|
|
54
|
+
return JFunc_void_SessionResult_cxx::newObjectCxxArgs(func);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
public:
|
|
58
|
+
/**
|
|
59
|
+
* Invokes the C++ `std::function<...>` this `JFunc_void_SessionResult_cxx` instance holds.
|
|
60
|
+
*/
|
|
61
|
+
void invoke_cxx(jni::alias_ref<JSessionResult> result) {
|
|
62
|
+
_func(result->toCpp());
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
public:
|
|
66
|
+
[[nodiscard]]
|
|
67
|
+
inline const std::function<void(const SessionResult& /* result */)>& getFunction() const {
|
|
68
|
+
return _func;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
public:
|
|
72
|
+
static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/nitroposeexercises/Func_void_SessionResult_cxx;";
|
|
73
|
+
static void registerNatives() {
|
|
74
|
+
registerHybrid({makeNativeMethod("invoke_cxx", JFunc_void_SessionResult_cxx::invoke_cxx)});
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
private:
|
|
78
|
+
explicit JFunc_void_SessionResult_cxx(const std::function<void(const SessionResult& /* result */)>& func): _func(func) { }
|
|
79
|
+
|
|
80
|
+
private:
|
|
81
|
+
friend HybridBase;
|
|
82
|
+
std::function<void(const SessionResult& /* result */)> _func;
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
} // namespace margelo::nitro::nitroposeexercises
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JHoldProgress.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#include <fbjni/fbjni.h>
|
|
11
|
+
#include "HoldProgress.hpp"
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
namespace margelo::nitro::nitroposeexercises {
|
|
16
|
+
|
|
17
|
+
using namespace facebook;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* The C++ JNI bridge between the C++ struct "HoldProgress" and the the Kotlin data class "HoldProgress".
|
|
21
|
+
*/
|
|
22
|
+
struct JHoldProgress final: public jni::JavaClass<JHoldProgress> {
|
|
23
|
+
public:
|
|
24
|
+
static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/nitroposeexercises/HoldProgress;";
|
|
25
|
+
|
|
26
|
+
public:
|
|
27
|
+
/**
|
|
28
|
+
* Convert this Java/Kotlin-based struct to the C++ struct HoldProgress by copying all values to C++.
|
|
29
|
+
*/
|
|
30
|
+
[[maybe_unused]]
|
|
31
|
+
[[nodiscard]]
|
|
32
|
+
HoldProgress toCpp() const {
|
|
33
|
+
static const auto clazz = javaClassStatic();
|
|
34
|
+
static const auto fieldElapsedMs = clazz->getField<double>("elapsedMs");
|
|
35
|
+
double elapsedMs = this->getFieldValue(fieldElapsedMs);
|
|
36
|
+
static const auto fieldTargetMs = clazz->getField<double>("targetMs");
|
|
37
|
+
double targetMs = this->getFieldValue(fieldTargetMs);
|
|
38
|
+
static const auto fieldStability = clazz->getField<double>("stability");
|
|
39
|
+
double stability = this->getFieldValue(fieldStability);
|
|
40
|
+
return HoldProgress(
|
|
41
|
+
elapsedMs,
|
|
42
|
+
targetMs,
|
|
43
|
+
stability
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
public:
|
|
48
|
+
/**
|
|
49
|
+
* Create a Java/Kotlin-based struct by copying all values from the given C++ struct to Java.
|
|
50
|
+
*/
|
|
51
|
+
[[maybe_unused]]
|
|
52
|
+
static jni::local_ref<JHoldProgress::javaobject> fromCpp(const HoldProgress& value) {
|
|
53
|
+
using JSignature = JHoldProgress(double, double, double);
|
|
54
|
+
static const auto clazz = javaClassStatic();
|
|
55
|
+
static const auto create = clazz->getStaticMethod<JSignature>("fromCpp");
|
|
56
|
+
return create(
|
|
57
|
+
clazz,
|
|
58
|
+
value.elapsedMs,
|
|
59
|
+
value.targetMs,
|
|
60
|
+
value.stability
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
} // namespace margelo::nitro::nitroposeexercises
|