28 #define JNIMETHOD(R,N,C,O) JNIEXPORT R JNICALL C##_##O
33 #define BEATMUP_ENTER LOG_I("Entering %s : %d", __FILE__, __LINE__)
39 #define BEATMUP_CATCH(expr) try expr catch (std::exception& ex) { $pool.rethrowToJava(jenv, ex); }
42 #define BEATMUP_OBJ(type,ptr,handle) \
43 type* ptr = $pool.getObject<type>(jenv, handle)
45 #define BEATMUP_STRING(var) \
46 const char* javaChar = jenv->GetStringUTFChars(var, 0); \
47 const std::string var##Str(javaChar); \
48 jenv->ReleaseStringUTFChars(var, javaChar)
51 #define BEATMUP_OBJ_OR_NULL(t,p,h) BEATMUP_OBJ(t,p,h)
54 #define BEATMUP_REFERENCE(jobj,obj) $pool.addJavaReference(jenv, jobj, obj)
57 #define BEATMUP_DELETE_REFERENCE(obj) if (obj) $pool.removeJavaReference(jenv, obj)
Handles all Java binding-related static data.
BeatmupJavaObjectPool $pool