theConfig 10.0
Loading...
Searching...
No Matches
LibLcConfig_jv.c
Go to the documentation of this file.
1
9/* LABEL-NO */
10
11#include "jni_h/jvlcconfig_LcConfig.h"
12#include "LibLcConfig_private_jv.h"
13
17
18#define defDebug0
19#define defClass(v,n) jclass v;
20#define defOAtr(v,c,n,s) jfieldID v;
21#define defSAtr(v,c,n,s) jfieldID v;
22#define defOMth(v,c,n,s) jmethodID v;
23#define defSMth(v,c,n,s) jmethodID v;
24
25#include "LcDefs_jv.h"
26
27#undef defDebug0
28#undef defClass
29#undef defOAtr
30#undef defSAtr
31#undef defOMth
32#undef defSMth
33
35//mk_dbg_color_ln(MK_COLOR_BLUE,"%s","call");
36 // BEGIN-INIT - created by 'jv_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
37
38 NS(LcConfigC_Init) (LC_RT_CALL_ONLY) ;
39 NS(LcSettingC_Init) (LC_RT_CALL_ONLY) ;
40
41 // END-INIT - created by 'jv_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
42}
43
45
46#define LcCleanupTmpl()
47#define LcSetupTmpl()
48
49JNIEXPORT jint JNICALL
50JNI_OnLoad(JavaVM *jvm, void *reserved)
51{
52 JNIEnv *env;
53
54 JavaErrorCheck0 ((*jvm)->GetEnv(jvm, (void*) &env, JNI_VERSION_1_6));
55
56 // init "LibLcConfig"
57 LcSetup();
59
60 JavaErrorCheck0 ((*env)->EnsureLocalCapacity(env, 50));
61
62 MK_UNUSED jclass cls;
63 #define check(v,c) if ((v=(c))==NULL) return JNI_ERR
64#define defClass(v,n) check(cls, (*env)->FindClass(env, n));\
65 JavaErrorCheck; \
66 check(v, (*env)->NewGlobalRef(env, cls)); \
67 JavaErrorCheck;
68#define defOAtr(v,c,n,s) check(v, (*env)->GetFieldID(env,c,n,s)); \
69 JavaErrorCheck;
70#define defSAtr(v,c,n,s) check(v, (*env)->GetStaticFieldID(env,c,n,s)); \
71 JavaErrorCheck;
72#define defOMth(v,c,n,s) check(v, (*env)->GetMethodID(env,c,n,s)); \
73 JavaErrorCheck;
74#define defSMth(v,c,n,s) check(v, (*env)->GetStaticMethodID(env,c,n,s)); \
75 JavaErrorCheck;
76#define defDebug0 MA
77
78#include "LcDefs_jv.h"
79
80#undef defDebug0
81#undef defClass
82#undef defOAtr
83#undef defSAtr
84#undef defOMth
85#undef defSMth
86
87 // class specific initialization
89
90 return JNI_VERSION_1_6;
91error:
92 return JNI_ERR; /* JNI version not supported */
93}
94
95JNIEXPORT void JNICALL
96JNI_OnUnload(JavaVM *jvm, void *reserved)
97{
98 MK_UNUSED JNIEnv *env;
99 void *val;
100 if ((*jvm)->GetEnv(jvm, &val, JNI_VERSION_1_6)) {
101 return;
102 }
103
105
106 // cleanup global variables
107 env = (JNIEnv*) val;
108
109#define defDebug0
110#define defClass(v,n) (*env)->DeleteGlobalRef(env, v);
111#define defOAtr(v,c,n,s)
112#define defSAtr(v,c,n,s)
113#define defOMth(v,c,n,s)
114#define defSMth(v,c,n,s)
115
116#include "LcDefs_jv.h"
117
118#undef defDebug0
119#undef defClass
120#undef defOAtr
121#undef defSAtr
122#undef defOMth
123#undef defSMth
124
126
127 LcCleanup();
128
129 return;
130}
131
132// BEGIN-LcConfig - created by 'jv_MqC.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
133
137
138// doc-key: LcConfig,LcConfig-Enum,sco
139
141JNIEXPORT jobject JNICALL Java_jvlcconfig_LcConfig_ConfigFormatE_1FromInt (JNIEnv *env, jclass class, jint value) {
143 enum LcConfigFormatE value_out;
144 enum MkErrorE errVal = LcConfigFormatE_FromInt(value, &value_out);
145 MkErrorC_Check(NULL, errVal)
146 jobject __retVal__S = MK(pGetEnumFromString)(env,LC(Class_LcConfigFormatE),"Ljvlcconfig/LcConfigFormatE;",LcConfigFormatE_ToString(value_out));
147 return __retVal__S;
148error:
149 return 0;
150}
151
153JNIEXPORT jobject JNICALL Java_jvlcconfig_LcConfig_ConfigOptionsEF_1FromInt (JNIEnv *env, jclass class, jint value) {
155 enum LcConfigOptionsEF value_out;
156 enum MkErrorE errVal = LcConfigOptionsEF_FromInt(value, &value_out);
157 MkErrorC_Check(NULL, errVal)
158 jobject __retVal__S = MK(pGetEnumFlagFromInt)(env,LC(Class_LcConfigOptionsEF),value_out);
159 return __retVal__S;
160error:
161 return 0;
162}
163
165JNIEXPORT jobject JNICALL Java_jvlcconfig_LcConfig_ConfigTypeE_1FromInt (JNIEnv *env, jclass class, jint value) {
167 enum LcConfigTypeE value_out;
168 enum MkErrorE errVal = LcConfigTypeE_FromInt(value, &value_out);
169 MkErrorC_Check(NULL, errVal)
170 jobject __retVal__S = MK(pGetEnumFromString)(env,LC(Class_LcConfigTypeE),"Ljvlcconfig/LcConfigTypeE;",LcConfigTypeE_ToString(value_out));
171 return __retVal__S;
172error:
173 return 0;
174}
175
177JNIEXPORT jobject JNICALL Java_jvlcconfig_LcConfig_ErrorE_1FromInt (JNIEnv *env, jclass class, jint value) {
179 enum LcErrorE value_out;
180 enum MkErrorE errVal = LcErrorE_FromInt(value, &value_out);
181 MkErrorC_Check(NULL, errVal)
182 jobject __retVal__S = MK(pGetEnumFromString)(env,LC(Class_LcErrorE),"Ljvlcconfig/LcErrorE;",LcErrorE_ToString(value_out));
183 return __retVal__S;
184error:
185 return 0;
186}
187
189JNIEXPORT jobject JNICALL Java_jvlcconfig_LcConfig_ErrorTypeE_1FromInt (JNIEnv *env, jclass class, jint value) {
191 enum LcErrorTypeE value_out;
192 enum MkErrorE errVal = LcErrorTypeE_FromInt(value, &value_out);
193 MkErrorC_Check(NULL, errVal)
194 jobject __retVal__S = MK(pGetEnumFromString)(env,LC(Class_LcErrorTypeE),"Ljvlcconfig/LcErrorTypeE;",LcErrorTypeE_ToString(value_out));
195 return __retVal__S;
196error:
197 return 0;
198}
199
200// doc-key: LcConfig,LcConfig-Enum,sm_
201
203JNIEXPORT jint JNICALL Java_jvlcconfig_LcConfig_ConfigFormatE_1ToInt (JNIEnv *env, jclass class, jobject value) {
205 enum LcConfigFormatE value_e = MK(pGetEnumFromObj)(env, NS(Class_LcConfigFormatE), value);
206 JavaErrorCheck;
207 MK_I32 __retVal__L = LcConfigFormatE_ToInt(value_e);
208 jint __retVal__S = __retVal__L;
209 return __retVal__S;
210error:
211 return 0;
212}
213
215JNIEXPORT jstring JNICALL Java_jvlcconfig_LcConfig_ConfigFormatE_1ToString (JNIEnv *env, jclass class, jobject value) {
217 enum LcConfigFormatE value_e = MK(pGetEnumFromObj)(env, NS(Class_LcConfigFormatE), value);
218 JavaErrorCheck;
219 MK_STRN __retVal__L = LcConfigFormatE_ToString(value_e);
220 jstring __retVal__S = JC2O(env,__retVal__L);
221 return __retVal__S;
222error:
223 return 0;
224}
225
227JNIEXPORT jint JNICALL Java_jvlcconfig_LcConfig_ConfigOptionsEF_1ToInt (JNIEnv *env, jclass class, jobject value) {
229 enum LcConfigOptionsEF value_e = MK(pGetEnumFromObj)(env, NS(Class_LcConfigOptionsEF), value);
230 JavaErrorCheck;
231 MK_I32 __retVal__L = LcConfigOptionsEF_ToInt(value_e);
232 jint __retVal__S = __retVal__L;
233 return __retVal__S;
234error:
235 return 0;
236}
237
239JNIEXPORT jstring JNICALL Java_jvlcconfig_LcConfig_ConfigOptionsEF_1ToString (JNIEnv *env, jclass class, jobject value) {
241 enum LcConfigOptionsEF value_e = MK(pGetEnumFromObj)(env, NS(Class_LcConfigOptionsEF), value);
242 JavaErrorCheck;
243 MK_STRN __retVal__L = LcConfigOptionsEF_ToString(value_e);
244 jstring __retVal__S = JC2O(env,__retVal__L);
245 return __retVal__S;
246error:
247 return 0;
248}
249
251JNIEXPORT jint JNICALL Java_jvlcconfig_LcConfig_ConfigTypeE_1ToInt (JNIEnv *env, jclass class, jobject value) {
253 enum LcConfigTypeE value_e = MK(pGetEnumFromObj)(env, NS(Class_LcConfigTypeE), value);
254 JavaErrorCheck;
255 MK_I32 __retVal__L = LcConfigTypeE_ToInt(value_e);
256 jint __retVal__S = __retVal__L;
257 return __retVal__S;
258error:
259 return 0;
260}
261
263JNIEXPORT jstring JNICALL Java_jvlcconfig_LcConfig_ConfigTypeE_1ToString (JNIEnv *env, jclass class, jobject value) {
265 enum LcConfigTypeE value_e = MK(pGetEnumFromObj)(env, NS(Class_LcConfigTypeE), value);
266 JavaErrorCheck;
267 MK_STRN __retVal__L = LcConfigTypeE_ToString(value_e);
268 jstring __retVal__S = JC2O(env,__retVal__L);
269 return __retVal__S;
270error:
271 return 0;
272}
273
275JNIEXPORT jint JNICALL Java_jvlcconfig_LcConfig_ErrorE_1ToInt (JNIEnv *env, jclass class, jobject value) {
277 enum LcErrorE value_e = MK(pGetEnumFromObj)(env, NS(Class_LcErrorE), value);
278 JavaErrorCheck;
279 MK_I32 __retVal__L = LcErrorE_ToInt(value_e);
280 jint __retVal__S = __retVal__L;
281 return __retVal__S;
282error:
283 return 0;
284}
285
287JNIEXPORT jstring JNICALL Java_jvlcconfig_LcConfig_ErrorE_1ToString (JNIEnv *env, jclass class, jobject value) {
289 enum LcErrorE value_e = MK(pGetEnumFromObj)(env, NS(Class_LcErrorE), value);
290 JavaErrorCheck;
291 MK_STRN __retVal__L = LcErrorE_ToString(value_e);
292 jstring __retVal__S = JC2O(env,__retVal__L);
293 return __retVal__S;
294error:
295 return 0;
296}
297
299JNIEXPORT jint JNICALL Java_jvlcconfig_LcConfig_ErrorTypeE_1ToInt (JNIEnv *env, jclass class, jobject value) {
301 enum LcErrorTypeE value_e = MK(pGetEnumFromObj)(env, NS(Class_LcErrorTypeE), value);
302 JavaErrorCheck;
303 MK_I32 __retVal__L = LcErrorTypeE_ToInt(value_e);
304 jint __retVal__S = __retVal__L;
305 return __retVal__S;
306error:
307 return 0;
308}
309
311JNIEXPORT jstring JNICALL Java_jvlcconfig_LcConfig_ErrorTypeE_1ToString (JNIEnv *env, jclass class, jobject value) {
313 enum LcErrorTypeE value_e = MK(pGetEnumFromObj)(env, NS(Class_LcErrorTypeE), value);
314 JavaErrorCheck;
315 MK_STRN __retVal__L = LcErrorTypeE_ToString(value_e);
316 jstring __retVal__S = JC2O(env,__retVal__L);
317 return __retVal__S;
318error:
319 return 0;
320}
321
323// LcConfig_Enum_JV_API
324
328
329// doc-key: LcConfig,LcConfig-Setup,sm_
330
332JNIEXPORT void JNICALL Java_jvlcconfig_LcConfig_Cleanup (JNIEnv *env, jclass class) {
335}
336
338JNIEXPORT void JNICALL Setup (JNIEnv *env, jclass class) {
340 LcSetupTmpl();
341}
342
344// LcConfig_Setup_JV_API
345
346// END-LcConfig - created by 'jv_MqC.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
tag: nhi1-release-250425
jfieldID jfieldID_List
jclass jclass_List
static struct MkRuntimeCallbackS sLcRuntimeCallback
#define LcSetupTmpl()
#define LcCleanupTmpl()
jmethodID jmethodID_List
#define LC_RT_CALL_ONLY
static MK_I32 LcConfigTypeE_ToInt(enum LcConfigTypeE value)
return the LcConfigTypeE as integer …
Definition LcEnum_lc.h:110
MK_STRN LcErrorE_ToString(enum LcErrorE value)
return the LcErrorE as string …
static MK_I32 LcErrorE_ToInt(enum LcErrorE value)
return the LcErrorE as integer …
Definition LcEnum_lc.h:205
LcErrorE
Signals an error and is used as the return value of a function …
Definition LcEnum_lc.h:188
static MK_I32 LcErrorTypeE_ToInt(enum LcErrorTypeE value)
return the LcErrorTypeE as integer …
Definition LcEnum_lc.h:246
enum MkErrorE LcConfigFormatE_FromInt(MK_I32 const value, enum LcConfigFormatE *value_out)
return the LcConfigFormatE from integer …
static MK_I32 LcConfigOptionsEF_ToInt(enum LcConfigOptionsEF value)
return the LcConfigOptionsEF as integer …
Definition LcEnum_lc.h:166
LcConfigFormatE
set the format of a LcSettingC …
Definition LcEnum_lc.h:30
LcConfigOptionsEF
define the configuration-option of a LcConfigC …
Definition LcEnum_lc.h:134
static MK_I32 LcConfigFormatE_ToInt(enum LcConfigFormatE value)
return the LcConfigFormatE as integer …
Definition LcEnum_lc.h:55
MK_STRN LcConfigTypeE_ToString(enum LcConfigTypeE value)
return the LcConfigTypeE as string …
enum MkErrorE LcErrorTypeE_FromInt(MK_I32 const value, enum LcErrorTypeE *value_out)
return the LcErrorTypeE from integer …
MK_STRN LcErrorTypeE_ToString(enum LcErrorTypeE value)
return the LcErrorTypeE as string …
LcErrorTypeE
error types
Definition LcEnum_lc.h:228
MK_STRN LcConfigOptionsEF_ToString(enum LcConfigOptionsEF value)
return the LcConfigOptionsEF as string …
LcConfigTypeE
define the data-type of a LcSettingC …
Definition LcEnum_lc.h:78
enum MkErrorE LcConfigOptionsEF_FromInt(MK_I32 const value, enum LcConfigOptionsEF *value_out)
return the LcConfigOptionsEF from integer …
enum MkErrorE LcErrorE_FromInt(MK_I32 const value, enum LcErrorE *value_out)
return the LcErrorE from integer …
enum MkErrorE LcConfigTypeE_FromInt(MK_I32 const value, enum LcConfigTypeE *value_out)
return the LcConfigTypeE from integer …
MK_STRN LcConfigFormatE_ToString(enum LcConfigFormatE value)
return the LcConfigFormatE as string …
JNIEXPORT jint JNICALL Java_jvlcconfig_LcConfig_ConfigTypeE_1ToInt(JNIEnv *env, jclass class, jobject value)
Java: [static] int ConfigTypeE_ToInt(LcConfigTypeE value) → C-API return the LcConfigTypeE as in...
JNIEXPORT jstring JNICALL Java_jvlcconfig_LcConfig_ConfigOptionsEF_1ToString(JNIEnv *env, jclass class, jobject value)
Java: [static] String ConfigOptionsEF_ToString(LcConfigOptionsEF value) → C-API return the LcCon...
JNIEXPORT jobject JNICALL Java_jvlcconfig_LcConfig_ErrorTypeE_1FromInt(JNIEnv *env, jclass class, jint value)
Java: [static] LcErrorTypeE ErrorTypeE_FromInt(int value) → C-API return the LcErrorTypeE from i...
JNIEXPORT jstring JNICALL Java_jvlcconfig_LcConfig_ErrorE_1ToString(JNIEnv *env, jclass class, jobject value)
Java: [static] String ErrorE_ToString(LcErrorE value) → C-API return the LcErrorE as string …
JNIEXPORT jobject JNICALL Java_jvlcconfig_LcConfig_ErrorE_1FromInt(JNIEnv *env, jclass class, jint value)
Java: [static] LcErrorE ErrorE_FromInt(int value) → C-API return the LcErrorE from integer …
JNIEXPORT jint JNICALL Java_jvlcconfig_LcConfig_ConfigFormatE_1ToInt(JNIEnv *env, jclass class, jobject value)
Java: [static] int ConfigFormatE_ToInt(LcConfigFormatE value) → C-API return the LcConfigFormatE...
JNIEXPORT jstring JNICALL Java_jvlcconfig_LcConfig_ConfigFormatE_1ToString(JNIEnv *env, jclass class, jobject value)
Java: [static] String ConfigFormatE_ToString(LcConfigFormatE value) → C-API return the LcConfigF...
JNIEXPORT jobject JNICALL Java_jvlcconfig_LcConfig_ConfigFormatE_1FromInt(JNIEnv *env, jclass class, jint value)
Java: [static] LcConfigFormatE ConfigFormatE_FromInt(int value) → C-API return the LcConfigForma...
JNIEXPORT jstring JNICALL Java_jvlcconfig_LcConfig_ErrorTypeE_1ToString(JNIEnv *env, jclass class, jobject value)
Java: [static] String ErrorTypeE_ToString(LcErrorTypeE value) → C-API return the LcErrorTypeE as...
JNIEXPORT jobject JNICALL Java_jvlcconfig_LcConfig_ConfigTypeE_1FromInt(JNIEnv *env, jclass class, jint value)
Java: [static] LcConfigTypeE ConfigTypeE_FromInt(int value) → C-API return the LcConfigTypeE fro...
JNIEXPORT jint JNICALL Java_jvlcconfig_LcConfig_ErrorE_1ToInt(JNIEnv *env, jclass class, jobject value)
Java: [static] int ErrorE_ToInt(LcErrorE value) → C-API return the LcErrorE as integer …
JNIEXPORT jint JNICALL Java_jvlcconfig_LcConfig_ConfigOptionsEF_1ToInt(JNIEnv *env, jclass class, jobject value)
Java: [static] int ConfigOptionsEF_ToInt(LcConfigOptionsEF value) → C-API return the LcConfigOpt...
JNIEXPORT jstring JNICALL Java_jvlcconfig_LcConfig_ConfigTypeE_1ToString(JNIEnv *env, jclass class, jobject value)
Java: [static] String ConfigTypeE_ToString(LcConfigTypeE value) → C-API return the LcConfigTypeE...
JNIEXPORT jobject JNICALL Java_jvlcconfig_LcConfig_ConfigOptionsEF_1FromInt(JNIEnv *env, jclass class, jint value)
Java: [static] LcConfigOptionsEF ConfigOptionsEF_FromInt(int value) → C-API return the LcConfigO...
JNIEXPORT jint JNICALL Java_jvlcconfig_LcConfig_ErrorTypeE_1ToInt(JNIEnv *env, jclass class, jobject value)
Java: [static] int ErrorTypeE_ToInt(LcErrorTypeE value) → C-API return the LcErrorTypeE as integ...
void LcSetup(void)
setup jvlcconfig internal memory …
void LcCleanup(void)
cleanup jvlcconfig internal memory …
JNIEXPORT void JNICALL Java_jvlcconfig_LcConfig_Cleanup(JNIEnv *env, jclass class)
Java: [static] Cleanup() → C-API cleanup jvlcconfig internal memory …
JNIEXPORT void JNICALL Setup(JNIEnv *env, jclass class)
Java: [static] Setup() → C-API setup jvlcconfig internal memory …
#define MK_UNUSED
MkErrorE
const MK_STRB * MK_STRN
signed int MK_I32
size_t MkRuntimeCallbackAdd(MK_RT mkrt, MkRuntimeCallbackS *cbdata, MkRuntimeInitF rt_callback, MK_STRN ident)
void MkRuntimeCallbackDel(MK_RT mkrt, MkRuntimeCallbackS *cbdata)
#define MK_RT_CALL
#define MkRtSetup_NULL
#define MK_RT_ARGS_ONLY