Direct-BT
2.3.1
Direct-BT - Direct Bluetooth Programming.
|
Go to the documentation of this file.
26 #ifndef JAU_JAVA_UPLINK_HPP_
27 #define JAU_JAVA_UPLINK_HPP_
47 virtual std::string
toString() const noexcept {
return "JavaAnon[???]"; }
50 virtual void clear() noexcept = 0;
59 std::shared_ptr<JavaAnon> javaObjectRef;
66 std::
string javaObjectToString() const noexcept {
67 if(
nullptr == javaObjectRef ) {
68 return "JavaAnon[null]";
69 }
else if( 0 == javaObjectRef.use_count() ) {
70 return "JavaAnon[empty]";
72 return javaObjectRef->toString();
75 std::shared_ptr<JavaAnon>
getJavaObject() noexcept {
return javaObjectRef; }
78 void setJavaObject(std::shared_ptr<JavaAnon> objRef) noexcept { javaObjectRef = objRef; }
85 if(
nullptr != javaObjectRef ) {
86 javaObjectRef->clear();
96 javaObjectRef =
nullptr;
virtual ~JavaUplink() noexcept
void setJavaObject(std::shared_ptr< JavaAnon > objRef) noexcept
Assigns a new shared JavaAnon reference, replaced item might be deleted via JNI from dtor.
std::shared_ptr< JavaAnon > getJavaObject() noexcept
virtual std::string toString() const noexcept
virtual ~JavaAnon() noexcept
void clearJavaObject() noexcept
Clears the java reference, i.e.
virtual std::string toString() const noexcept
Pure virtual JavaAnon, hiding Java JNI details from API, to be implemented by JNI module.
void setJavaObject() noexcept
Resets the shared JavaAnon reference, the replaced item might be deleted via JNI from dtor.
std::string to_hexstring(value_type const &v) noexcept
Produce a lower-case hexadecimal string representation of the given pointer.
Sharing the anonymous Java object (JavaAnon), i.e.
virtual void clear() noexcept=0
Clears the java reference, i.e.
virtual void checkValid() const
Throws an IllegalStateException if isValid() == false.
virtual std::string get_java_class() const noexcept=0