123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- /*
- * Author: Patrick-Christopher Mattulat
- * Company: Lynar Studios
- * E-Mail: webmaster@lynarstudios.com
- * Created: 2023-04-07
- * Changed: 2024-09-11
- *
- * */
- #ifndef LS_STD_JNI_CLASS_PARAMETER_HPP
- #define LS_STD_JNI_CLASS_PARAMETER_HPP
- #include <jni.h>
- #include <ls-std/core/interface/IJniApi.hpp>
- #include <ls-std/os/dynamic-goal.hpp>
- #include <memory>
- #include <string>
- /*
- * @doc: class(name: 'JniClassParameter', package: 'core')
- * @doc: core.JniClassParameter.description('This class holds important information for the usage of the Java Native Interface (JNI), like Java environment or a specific Java object.')
- * */
- namespace ls::std::core::experimental
- {
- class LS_STD_DYNAMIC_GOAL JniClassParameter
- {
- public:
- JniClassParameter();
- ~JniClassParameter();
- [[nodiscard]] JNIEnv *getJavaEnvironment();
- [[nodiscard]] jobject getJavaObject();
- [[nodiscard]] ::std::shared_ptr<ls::std::core::experimental::interface_type::IJniApi> getJniApi() const;
- void setJavaEnvironment(JNIEnv *_environment);
- void setJavaObject(jobject _javaObject);
- void setJniApi(const ::std::shared_ptr<ls::std::core::experimental::interface_type::IJniApi> &_jniApi);
- private:
- JNIEnv *environment{};
- jobject javaObject{};
- ::std::shared_ptr<ls::std::core::experimental::interface_type::IJniApi> jniApi{};
- };
- }
- #endif
|