void rendermenu() { setscope(false); gmenu &m = *curmenu; m.refresh(); m.render(); }
/*! \brief jholder assignment operator Object takes on the widest scope of the two, local at a minimum */ jholder &operator=(jholder const &c) { jobjectRefType newtype = JNILocalRefType; if(c.m_refType == JNIGlobalRefType || m_refType == JNIGlobalRefType) newtype = JNIGlobalRefType; reset(c.get()); setscope(newtype); return *this; }
/*! \brief set an object to global scope. Has no effect if it's already global */ void setGlobal() { setscope(JNIGlobalRefType); }
/*! \brief jholder constructor from a native jni object Incoming objects already hold a local ref. */ explicit jholder(const T& obj) :m_refType(JNILocalRefType) ,m_object(obj) { setscope(JNILocalRefType); }
/*! \brief jholder copy constructor. Object is copied, scope matches the original */ jholder(jholder<T> const &c) :m_refType(JNIInvalidRefType) ,m_object(c.get()) { setscope(c.m_refType); }