JniClassParameter.hpp 982 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. * Author: Patrick-Christopher Mattulat
  3. * Company: Lynar Studios
  4. * E-Mail: webmaster@lynarstudios.com
  5. * Created: 2023-04-07
  6. * Changed: 2023-04-07
  7. *
  8. * */
  9. #ifndef LS_STD_JNI_CLASS_PARAMETER_HPP
  10. #define LS_STD_JNI_CLASS_PARAMETER_HPP
  11. #include <jni.h>
  12. #include <ls-std/core/interface/IJniApi.hpp>
  13. #include <ls-std/os/dynamic-goal.hpp>
  14. #include <memory>
  15. #include <string>
  16. namespace ls::std::core
  17. {
  18. class LS_STD_DYNAMIC_GOAL JniClassParameter
  19. {
  20. public:
  21. JniClassParameter();
  22. ~JniClassParameter();
  23. [[nodiscard]] JNIEnv *getJavaEnvironment();
  24. [[nodiscard]] ::std::shared_ptr<ls::std::core::interface_type::IJniApi> getJniApi();
  25. void setJavaEnvironment(JNIEnv *_environment);
  26. void setJniApi(const ::std::shared_ptr<ls::std::core::interface_type::IJniApi> &_jniApi);
  27. private:
  28. JNIEnv *environment{};
  29. ::std::shared_ptr<ls::std::core::interface_type::IJniApi> jniApi{};
  30. };
  31. }
  32. #endif