More director changes from Scott Michel - no more director code in normal wrappers plus other changes for classes in an inheritance chain
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5109 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
37dec531ee
commit
7b1bedc0fd
2 changed files with 323 additions and 260 deletions
|
|
@ -22,10 +22,6 @@ private:
|
|||
protected:
|
||||
/* pointer to the wrapped java object */
|
||||
jobject __self;
|
||||
/* ricochet flag: Prevent user from shooting themselves in the
|
||||
foot by detecting recursive upcall */
|
||||
bool __ricochet;
|
||||
|
||||
/* Acquire Java VM environment from Java VM */
|
||||
JNIEnv *__acquire_jenv() const {
|
||||
JNIEnv *env;
|
||||
|
|
@ -36,15 +32,14 @@ protected:
|
|||
|
||||
public:
|
||||
/* the default constructor should not be called */
|
||||
__DIRECTOR__() : __jvm(NULL), __self(NULL), __ricochet(false) {
|
||||
__DIRECTOR__() : __jvm(NULL), __self(NULL) {
|
||||
assert(0);
|
||||
}
|
||||
|
||||
/* Default constructor */
|
||||
__DIRECTOR__(JNIEnv *jenv):
|
||||
__jvm((JavaVM *) NULL),
|
||||
__self(NULL),
|
||||
__ricochet(false)
|
||||
__self(NULL)
|
||||
{
|
||||
/* Acquire the Java VM pointer */
|
||||
jenv->GetJavaVM(&__jvm);
|
||||
|
|
@ -71,22 +66,6 @@ public:
|
|||
/* return a pointer to the wrapped java object */
|
||||
inline jobject __get_self() const
|
||||
{ return __self; }
|
||||
|
||||
/* Get ricochet flag, resetting it on the way out */
|
||||
inline bool __get_ricochet()
|
||||
{
|
||||
bool __r = __ricochet;
|
||||
__ricochet = false;
|
||||
return __r;
|
||||
}
|
||||
|
||||
/* Set the ricochet flag */
|
||||
inline void __set_ricochet()
|
||||
{ __ricochet = true; }
|
||||
|
||||
/* Clear the ricochet flag */
|
||||
inline void __clear_ricochet()
|
||||
{ __ricochet = false; }
|
||||
};
|
||||
|
||||
#endif /* __cplusplus */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue