JniReturnValue.hpp 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /*
  2. * Author: Patrick-Christopher Mattulat
  3. * Company: Lynar Studios
  4. * E-Mail: webmaster@lynarstudios.com
  5. * Created: 2023-04-08
  6. * Changed: 2023-04-11
  7. *
  8. * */
  9. #ifndef LS_STD_JNI_RETURN_VALUE_HPP
  10. #define LS_STD_JNI_RETURN_VALUE_HPP
  11. #include <jni.h>
  12. #include <ls-std/os/dynamic-goal.hpp>
  13. namespace ls::std::core::experimental
  14. {
  15. class LS_STD_DYNAMIC_GOAL JniReturnValue
  16. {
  17. public:
  18. JniReturnValue();
  19. ~JniReturnValue();
  20. [[nodiscard]] jboolean getBooleanValue() const;
  21. [[nodiscard]] jbyte getByteValue() const;
  22. [[nodiscard]] jchar getCharValue() const;
  23. [[nodiscard]] jdouble getDoubleValue() const;
  24. [[nodiscard]] jfloat getFloatValue() const;
  25. [[nodiscard]] jint getIntegerValue() const;
  26. [[nodiscard]] jlong getLongValue() const;
  27. [[nodiscard]] jshort getShortValue() const;
  28. void setBooleanValue(jboolean _booleanValue);
  29. void setByteValue(jbyte _byteValue);
  30. void setCharValue(jchar _charValue);
  31. void setDoubleValue(jdouble _doubleValue);
  32. void setFloatValue(jfloat _floatValue);
  33. void setIntegerValue(jint _integerValue);
  34. void setLongValue(jlong _longValue);
  35. void setShortValue(jshort _shortValue);
  36. private:
  37. jboolean booleanValue{};
  38. jbyte byteValue{};
  39. jchar charValue{};
  40. jdouble doubleValue{};
  41. jfloat floatValue{};
  42. jint integerValue{};
  43. jlong longValue{};
  44. jshort shortValue{};
  45. };
  46. }
  47. #endif