-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtest.h
More file actions
114 lines (88 loc) · 4.4 KB
/
test.h
File metadata and controls
114 lines (88 loc) · 4.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
#ifndef test_h
#define test_h
#include <jni.h>
#include "test_fwd.h"
namespace test {
extern JNIEnv *getEnv();
extern void releaseEnv(JNIEnv *);
extern void PrintJObject(const char *prefix, jobject jobj);
extern void PrintJThrowable(const char *prefix, jthrowable jobj);
extern void PrintJBooleanArray(const char *prefix, jbooleanArray jobj);
extern void PrintJByteArray(const char *prefix, jbyteArray jobj);
extern void PrintJCharArray(const char *prefix, jcharArray jobj);
extern void PrintJShortArray(const char *prefix, jshortArray jobj);
extern void PrintJIntArray(const char *prefix, jintArray jobj);
extern void PrintJLongArray(const char *prefix, jlongArray jobj);
extern void PrintJFloatArray(const char *prefix, jfloatArray jobj);
extern void PrintJDoubleArray(const char *prefix, jdoubleArray jobj);
extern void DebugPrintJObject(const char *file, int lineno, const char *prefix, jobject jobj);
extern void SetDebugJ4Cpp(bool debug);
extern bool GetDebugJ4Cpp();
extern void PrintObject(const char *prefix, const ::test::java::lang::Object &objref);
extern jclass getStringClass();
extern jclass getClassClass();
extern jstring getEmptyString();
extern const char *GetStringUTFChars(jstring js, jboolean *iscopy=NULL);
extern void ReleaseStringUTFChars(jstring js, const char *utf);
extern jboolean *GetBooleanArrayElements(jbooleanArray jarray,jboolean *iscopy=NULL);
extern jbyte *GetByteArrayElements(jbyteArray jarray,jboolean *iscopy=NULL);
extern jchar *GetCharArrayElements(jcharArray jarray,jboolean *iscopy=NULL);
extern jshort *GetShortArrayElements(jshortArray jarray,jboolean *iscopy=NULL);
extern jint *GetIntArrayElements(jintArray jarray,jboolean *iscopy=NULL);
extern jlong *GetLongArrayElements(jlongArray jarray,jboolean *iscopy=NULL);
extern jfloat *GetFloatArrayElements(jfloatArray jarray,jboolean *iscopy=NULL);
extern jdouble *GetDoubleArrayElements(jdoubleArray jarray,jboolean *iscopy=NULL);
extern void ReleaseBooleanArrayElements(jbooleanArray jarray, jboolean *nativeArray, jint mode=0);
extern void ReleaseByteArrayElements(jbyteArray jarray, jbyte *nativeArray, jint mode=0);
extern void ReleaseCharArrayElements(jcharArray jarray, jchar *nativeArray, jint mode=0);
extern void ReleaseShortArrayElements(jshortArray jarray, jshort *nativeArray, jint mode=0);
extern void ReleaseIntArrayElements(jintArray jarray, jint *nativeArray, jint mode=0);
extern void ReleaseLongArrayElements(jlongArray jarray, jlong *nativeArray, jint mode=0);
extern void ReleaseFloatArrayElements(jfloatArray jarray, jfloat *nativeArray, jint mode=0);
extern void ReleaseDoubleArrayElements(jdoubleArray jarray, jdouble *nativeArray, jint mode=0);
namespace java {
namespace lang {
class Object {
public:
jobject jthis;
Object();
Object(jobject _jthis, bool copy);
Object(const Object &ref);
Object & operator=(const Object & o);
jstring toString();
~Object();
};
}
}
#include "test0.h"
#include "test1.h"
class NativeDoubleOpContext;
class NativeDoubleOp : public ::test::java::util::function::DoubleUnaryOperator {
public:
NativeDoubleOp(jobject _jthis, bool copy);
NativeDoubleOp(const NativeDoubleOp &);
static NativeDoubleOp cast(const ::test::java::lang::Object &);
NativeDoubleOpContext *context;
NativeDoubleOp();
~NativeDoubleOp();
jdouble applyAsDoubleNative(jdouble double_0);
void initContext(NativeDoubleOpContext *ctx,bool isref);
void deleteContext();
}; // end class NativeDoubleOp
class NativeRunnableContext;
class NativeRunnable : public ::test::java::lang::Runnable {
public:
NativeRunnable(jobject _jthis, bool copy);
NativeRunnable(const NativeRunnable &);
static NativeRunnable cast(const ::test::java::lang::Object &);
NativeRunnableContext *context;
NativeRunnable();
~NativeRunnable();
void runNative();
void initContext(NativeRunnableContext *ctx,bool isref);
void deleteContext();
}; // end class NativeRunnable
// end namespace test
}
// end #ifndef test_h
#endif