theConfig 10.0
Loading...
Searching...
No Matches
LcConfigC_jv.c
Go to the documentation of this file.
1
9/* LABEL-START */
10#define META_FILE_NAME "LcConfigC_jv.c"
11
12#include "jni_h/jvlcconfig_LcConfigC.h"
13#include "LibLcConfig_private_jv.h"
14
15
16jobject NS(LcConfigC_ObjNew) (MK_RT_ARGS JNIEnv *env, LC_CFG hdl) {
17 static MkThreadLocal jobject NS_NULL = NULL;
18 return (hdl ? MK(AtomObjNew)(MK_RT_CALL env, LcConfigC_X2obj(hdl)) : MK_GET__NS_NULL(LcConfigC));
19}
20
22static jobject NS(LcConfigC_ObjCreate) (MK_RT_ARGS JNIEnv *env, LC_CFG hdl) {
23 return MK(AtomObjCreate)(MK_RT_CALL env, LcConfigC_X2obj(hdl));
24}
25
26static MK_PTR NS(LcConfigC_selfCreate) (MK_RT_ARGS MK_OBJ obj, MK_PTR envP) {
27 JNIEnv *env = (JNIEnv*) envP;
28 return (*env)->NewObject(env, NS(Class_LcConfigC), NS(MID_LcConfigC_INIT), (jlong) obj, JNI_TRUE);
29}
30
31#define ClassInit \
32
33// printTxt("init: LcConfigC");
34
35/* LABEL-END */
36
37// BEGIN-LcConfigC - created by 'jv_MqC.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
38
42
43// doc-key: LcConfigC,LcConfigC-Class-Export,sc_
44
46JNIEXPORT jobject JNICALL Java_jvlcconfig_LcConfigC_HandleResolve (JNIEnv *env, jclass class, jint netHdl) {
48 LC_CFG __retVal__L = LcConfigHandleResolve(netHdl);
49 jobject __retVal__S = LC(LcConfigC_ObjNew)(MK_RT_CALL env,__retVal__L);
50 return __retVal__S;
51}
52
53// doc-key: LcConfigC,LcConfigC-Class-Export,om_
54
55// skip class-overload: HandleGet = LcConfigHandleGet → MkObjectHandleGet
56
58// LcConfigC_Class_JV_API
59
63
64// doc-key: LcConfigC,LcConfigC-Class-Introspection,oc_
65
67JNIEXPORT jobject JNICALL Java_jvlcconfig_LcConfigC_Next (JNIEnv *env, jobject self) {
68 LC_CFG hdl = (LC_CFG)pObj2Hdl(env,"LcConfigC",self);
69 JavaErrorCheck;
70 MkRtSetup_X(hdl);
71 LC_CFG __retVal__L = LcConfigNext(hdl);
72 jobject __retVal__S = LC(LcConfigC_ObjNew)(MK_RT_CALL env,__retVal__L);
73 return __retVal__S;
74error:
75 return 0;
76}
77
79JNIEXPORT jobject JNICALL Java_jvlcconfig_LcConfigC_Prev (JNIEnv *env, jobject self) {
80 LC_CFG hdl = (LC_CFG)pObj2Hdl(env,"LcConfigC",self);
81 JavaErrorCheck;
82 MkRtSetup_X(hdl);
83 LC_CFG __retVal__L = LcConfigPrev(hdl);
84 jobject __retVal__S = LC(LcConfigC_ObjNew)(MK_RT_CALL env,__retVal__L);
85 return __retVal__S;
86error:
87 return 0;
88}
89
90// doc-key: LcConfigC,LcConfigC-Class-Introspection,sc_
91
93JNIEXPORT jobject JNICALL Java_jvlcconfig_LcConfigC_Instances (JNIEnv *env, jclass class) {
95 LC_CFG __retVal__L = LcConfigInstances();
96 jobject __retVal__S = LC(LcConfigC_ObjNew)(MK_RT_CALL env,__retVal__L);
97 return __retVal__S;
98}
99
101// LcConfigC_Class_JV_API
102
106
107// doc-key: LcConfigC,LcConfigC-Class-Misc,sc_
108
110JNIEXPORT jobject JNICALL Java_jvlcconfig_LcConfigC_GetNull (JNIEnv *env, jclass class) {
112 LC_CFG __retVal__L = LcConfigGetNull();
113 jobject __retVal__S = LC(LcConfigC_ObjNew)(MK_RT_CALL env,__retVal__L);
114 return __retVal__S;
115}
116
118// LcConfigC_Class_JV_API
119
123
124// doc-key: LcConfigC,LcConfigC-Error,om_
125
127JNIEXPORT jobject JNICALL Java_jvlcconfig_LcConfigC_ErrorType (JNIEnv *env, jobject self) {
128 LC_CFGN hdl = (LC_CFGN)pObj2Hdl(env,"LcConfigC",self);
129 JavaErrorCheck;
130 MkRtSetup_X(hdl);
131 enum LcErrorTypeE __retVal__L = LcConfigErrorType(hdl);
132 jobject __retVal__S = MK(pGetEnumFromString)(env,LC(Class_LcErrorTypeE),"Ljvlcconfig/LcErrorTypeE;",LcErrorTypeE_ToString(__retVal__L));
133 return __retVal__S;
134error:
135 return 0;
136}
137
139// LcConfigC_Error_JV_API
140
144
145// doc-key: LcConfigC,LcConfigC-Get,om_
146
148JNIEXPORT jobject JNICALL Java_jvlcconfig_LcConfigC_GetDefaultFormat (JNIEnv *env, jobject self) {
149 LC_CFGN hdl = (LC_CFGN)pObj2Hdl(env,"LcConfigC",self);
150 JavaErrorCheck;
151 MkRtSetup_X(hdl);
152 enum LcConfigFormatE __retVal__L = LcConfigGetDefaultFormat(hdl);
153 jobject __retVal__S = MK(pGetEnumFromString)(env,LC(Class_LcConfigFormatE),"Ljvlcconfig/LcConfigFormatE;",LcConfigFormatE_ToString(__retVal__L));
154 return __retVal__S;
155error:
156 return 0;
157}
158
160JNIEXPORT jshort JNICALL Java_jvlcconfig_LcConfigC_GetFloatPrecision (JNIEnv *env, jobject self) {
161 LC_CFGN hdl = (LC_CFGN)pObj2Hdl(env,"LcConfigC",self);
162 JavaErrorCheck;
163 MkRtSetup_X(hdl);
164 MK_I16 __retVal__L = LcConfigGetFloatPrecision(hdl);
165 jshort __retVal__S = __retVal__L;
166 return __retVal__S;
167error:
168 return 0;
169}
170
172JNIEXPORT jstring JNICALL Java_jvlcconfig_LcConfigC_GetIncludeDir (JNIEnv *env, jobject self) {
173 LC_CFGN hdl = (LC_CFGN)pObj2Hdl(env,"LcConfigC",self);
174 JavaErrorCheck;
175 MkRtSetup_X(hdl);
176 MK_STRN __retVal__L = LcConfigGetIncludeDir(hdl);
177 jstring __retVal__S = JC2O(env,__retVal__L);
178 return __retVal__S;
179error:
180 return 0;
181}
182
184JNIEXPORT jboolean JNICALL Java_jvlcconfig_LcConfigC_GetOption (JNIEnv *env, jobject self, jobject option) {
185 LC_CFGN hdl = (LC_CFGN)pObj2Hdl(env,"LcConfigC",self);
186 JavaErrorCheck;
187 MkRtSetup_X(hdl);
188 enum LcConfigOptionsEF option_e = MK(pGetEnumFromObj)(env, NS(Class_LcConfigOptionsEF), option);
189 JavaErrorCheck;
190 MK_BOOL __retVal__L = LcConfigGetOption(hdl, option_e);
191 jboolean __retVal__S = __retVal__L;
192 return __retVal__S;
193error:
194 return 0;
195}
196
198JNIEXPORT jobject JNICALL Java_jvlcconfig_LcConfigC_GetOptions (JNIEnv *env, jobject self) {
199 LC_CFGN hdl = (LC_CFGN)pObj2Hdl(env,"LcConfigC",self);
200 JavaErrorCheck;
201 MkRtSetup_X(hdl);
202 enum LcConfigOptionsEF __retVal__L = LcConfigGetOptions(hdl);
203 jobject __retVal__S = MK(pGetEnumFlagFromInt)(env,LC(Class_LcConfigOptionsEF),__retVal__L);
204 return __retVal__S;
205error:
206 return 0;
207}
208
210JNIEXPORT jshort JNICALL Java_jvlcconfig_LcConfigC_GetTabWidth (JNIEnv *env, jobject self) {
211 LC_CFGN hdl = (LC_CFGN)pObj2Hdl(env,"LcConfigC",self);
212 JavaErrorCheck;
213 MkRtSetup_X(hdl);
214 MK_I16 __retVal__L = LcConfigGetTabWidth(hdl);
215 jshort __retVal__S = __retVal__L;
216 return __retVal__S;
217error:
218 return 0;
219}
220
222// LcConfigC_Get_JV_API
223
227
228// doc-key: LcConfigC,LcConfigC-Lookup,oc_
229
231JNIEXPORT jobject JNICALL Java_jvlcconfig_LcConfigC_Lookup (JNIEnv *env, jobject self, jstring path) {
232 LC_CFGN hdl = (LC_CFGN)pObj2Hdl(env,"LcConfigC",self);
233 JavaErrorCheck;
234 MkRtSetup_X(hdl);
235 MK_STRN path_ptr = (path?(*env)->GetStringUTFChars(env,path,NULL):NULL);
236 JavaErrorCheck;
237 LC_CFS __retVal__L = LcConfigLookup(hdl, path_ptr);
238 jobject __retVal__S = LC(LcSettingC_ObjNew)(MK_RT_CALL env,__retVal__L);
239 if (path_ptr) (*env)->ReleaseStringUTFChars(env,path,path_ptr);
240 return __retVal__S;
241error:
242 return 0;
243}
244
245// doc-key: LcConfigC,LcConfigC-Lookup,omo
246
248JNIEXPORT jboolean JNICALL Java_jvlcconfig_LcConfigC_LookupBool (JNIEnv *env, jobject self, jstring path) {
249 LC_CFGN hdl = (LC_CFGN)pObj2Hdl(env,"LcConfigC",self);
250 JavaErrorCheck;
251 MkRtSetup_X(hdl);
252 MK_BOOL value_out;
253 MK_STRN path_ptr = (path?(*env)->GetStringUTFChars(env,path,NULL):NULL);
254 JavaErrorCheck;
255 enum MkErrorE errVal = LcConfigLookupBool(hdl, path_ptr, &value_out);
256 MkErrorC_Check(hdl, errVal)
257 jboolean __retVal__S = value_out;
258 if (path_ptr) (*env)->ReleaseStringUTFChars(env,path,path_ptr);
259 return __retVal__S;
260error:
261 return 0;
262}
263
265JNIEXPORT jdouble JNICALL Java_jvlcconfig_LcConfigC_LookupFloat (JNIEnv *env, jobject self, jstring path) {
266 LC_CFGN hdl = (LC_CFGN)pObj2Hdl(env,"LcConfigC",self);
267 JavaErrorCheck;
268 MkRtSetup_X(hdl);
269 MK_DBL value_out;
270 MK_STRN path_ptr = (path?(*env)->GetStringUTFChars(env,path,NULL):NULL);
271 JavaErrorCheck;
272 enum MkErrorE errVal = LcConfigLookupFloat(hdl, path_ptr, &value_out);
273 MkErrorC_Check(hdl, errVal)
274 jdouble __retVal__S = value_out;
275 if (path_ptr) (*env)->ReleaseStringUTFChars(env,path,path_ptr);
276 return __retVal__S;
277error:
278 return 0;
279}
280
282JNIEXPORT jint JNICALL Java_jvlcconfig_LcConfigC_LookupInt (JNIEnv *env, jobject self, jstring path) {
283 LC_CFGN hdl = (LC_CFGN)pObj2Hdl(env,"LcConfigC",self);
284 JavaErrorCheck;
285 MkRtSetup_X(hdl);
286 MK_I32 value_out;
287 MK_STRN path_ptr = (path?(*env)->GetStringUTFChars(env,path,NULL):NULL);
288 JavaErrorCheck;
289 enum MkErrorE errVal = LcConfigLookupInt(hdl, path_ptr, &value_out);
290 MkErrorC_Check(hdl, errVal)
291 jint __retVal__S = value_out;
292 if (path_ptr) (*env)->ReleaseStringUTFChars(env,path,path_ptr);
293 return __retVal__S;
294error:
295 return 0;
296}
297
299JNIEXPORT jlong JNICALL Java_jvlcconfig_LcConfigC_LookupInt64 (JNIEnv *env, jobject self, jstring path) {
300 LC_CFGN hdl = (LC_CFGN)pObj2Hdl(env,"LcConfigC",self);
301 JavaErrorCheck;
302 MkRtSetup_X(hdl);
303 MK_I64 value_out;
304 MK_STRN path_ptr = (path?(*env)->GetStringUTFChars(env,path,NULL):NULL);
305 JavaErrorCheck;
306 enum MkErrorE errVal = LcConfigLookupInt64(hdl, path_ptr, &value_out);
307 MkErrorC_Check(hdl, errVal)
308 jlong __retVal__S = value_out;
309 if (path_ptr) (*env)->ReleaseStringUTFChars(env,path,path_ptr);
310 return __retVal__S;
311error:
312 return 0;
313}
314
316JNIEXPORT jstring JNICALL Java_jvlcconfig_LcConfigC_LookupString (JNIEnv *env, jobject self, jstring path) {
317 LC_CFGN hdl = (LC_CFGN)pObj2Hdl(env,"LcConfigC",self);
318 JavaErrorCheck;
319 MkRtSetup_X(hdl);
320 MK_STRN value_out;
321 MK_STRN path_ptr = (path?(*env)->GetStringUTFChars(env,path,NULL):NULL);
322 JavaErrorCheck;
323 enum MkErrorE errVal = LcConfigLookupString(hdl, path_ptr, &value_out);
324 MkErrorC_Check(hdl, errVal)
325 jstring __retVal__S = JC2O(env,value_out);
326 if (path_ptr) (*env)->ReleaseStringUTFChars(env,path,path_ptr);
327 return __retVal__S;
328error:
329 return 0;
330}
331
333// LcConfigC_Lookup_JV_API
334
338
339// doc-key: LcConfigC,LcConfigC-Misc,oc_
340
342JNIEXPORT jobject JNICALL Java_jvlcconfig_LcConfigC_RootSetting (JNIEnv *env, jobject self) {
343 LC_CFGN hdl = (LC_CFGN)pObj2Hdl(env,"LcConfigC",self);
344 JavaErrorCheck;
345 MkRtSetup_X(hdl);
346 LC_CFS __retVal__L = LcConfigRootSetting(hdl);
347 jobject __retVal__S = LC(LcSettingC_ObjNew)(MK_RT_CALL env,__retVal__L);
348 return __retVal__S;
349error:
350 return 0;
351}
352
353// doc-key: LcConfigC,LcConfigC-Misc,om_
354
356JNIEXPORT void JNICALL Java_jvlcconfig_LcConfigC_Clear (JNIEnv *env, jobject self) {
357 LC_CFG hdl = (LC_CFG)pObj2Hdl(env,"LcConfigC",self);
358 JavaErrorCheck;
359 MkRtSetup_X(hdl);
360 LcConfigClear(hdl);
361error:
362 return;
363}
364
366JNIEXPORT void JNICALL Java_jvlcconfig_LcConfigC_Log (JNIEnv *env, jobject self, jobject fmtobj, jint debug, jstring callfunc, jint lvl) {
367 LC_CFGN hdl = (LC_CFGN)pObj2Hdl(env,"LcConfigC",self);
368 JavaErrorCheck;
369 MkRtSetup_X(hdl);
370 MK_OBJN fmtobj_hdl = (MK_OBJN)pObj2Hdl__null_allow(env,fmtobj);
371 JavaErrorCheck;
372 if (callfunc == NULL) {
373 (*env)->CallStaticVoidMethod(env,MK(Class_MkKernel),MK(MID_MkKernel_getCallerStack));
374 }
375 if (callfunc == NULL) {callfunc = MK(pGetCallerProc)(env);}
376 if (debug > (jint)(MkRuntimeDebugGet())) {return;}
377 MK_STRN callfunc_ptr = (callfunc?(*env)->GetStringUTFChars(env,callfunc,NULL):NULL);
378 JavaErrorCheck;
379 LcConfigLog(hdl, fmtobj_hdl, debug, callfunc_ptr, lvl);
380 if (callfunc_ptr) (*env)->ReleaseStringUTFChars(env,callfunc,callfunc_ptr);
381error:
382 return;
383}
384
386JNIEXPORT void JNICALL Java_jvlcconfig_LcConfigC_ReadFile (JNIEnv *env, jobject self, jstring filename) {
387 LC_CFG hdl = (LC_CFG)pObj2Hdl(env,"LcConfigC",self);
388 JavaErrorCheck;
389 MkRtSetup_X(hdl);
390 MK_STRN filename_ptr = (filename?(*env)->GetStringUTFChars(env,filename,NULL):NULL);
391 JavaErrorCheck;
392 enum MkErrorE errVal = LcConfigReadFile(hdl, filename_ptr);
393 MkErrorC_Check(hdl, errVal)
394 if (filename_ptr) (*env)->ReleaseStringUTFChars(env,filename,filename_ptr);
395error:
396 return;
397}
398
400JNIEXPORT void JNICALL Java_jvlcconfig_LcConfigC_ReadString (JNIEnv *env, jobject self, jstring str) {
401 LC_CFG hdl = (LC_CFG)pObj2Hdl(env,"LcConfigC",self);
402 JavaErrorCheck;
403 MkRtSetup_X(hdl);
404 MK_STRN str_ptr = (str?(*env)->GetStringUTFChars(env,str,NULL):NULL);
405 JavaErrorCheck;
406 enum MkErrorE errVal = LcConfigReadString(hdl, str_ptr);
407 MkErrorC_Check(hdl, errVal)
408 if (str_ptr) (*env)->ReleaseStringUTFChars(env,str,str_ptr);
409error:
410 return;
411}
412
414JNIEXPORT void JNICALL Java_jvlcconfig_LcConfigC_WriteFile (JNIEnv *env, jobject self, jstring filename) {
415 LC_CFG hdl = (LC_CFG)pObj2Hdl(env,"LcConfigC",self);
416 JavaErrorCheck;
417 MkRtSetup_X(hdl);
418 MK_STRN filename_ptr = (filename?(*env)->GetStringUTFChars(env,filename,NULL):NULL);
419 JavaErrorCheck;
420 enum MkErrorE errVal = LcConfigWriteFile(hdl, filename_ptr);
421 MkErrorC_Check(hdl, errVal)
422 if (filename_ptr) (*env)->ReleaseStringUTFChars(env,filename,filename_ptr);
423error:
424 return;
425}
426
427// doc-key: LcConfigC,LcConfigC-Misc,omo
428
430JNIEXPORT jstring JNICALL Java_jvlcconfig_LcConfigC_WriteString (JNIEnv *env, jobject self) {
431 LC_CFGN hdl = (LC_CFGN)pObj2Hdl(env,"LcConfigC",self);
432 JavaErrorCheck;
433 MkRtSetup_X(hdl);
434 MK_STRN val_out;
435 enum MkErrorE errVal = LcConfigWriteString(hdl, &val_out);
436 MkErrorC_Check(hdl, errVal)
437 jstring __retVal__S = JC2O(env,val_out);
438 return __retVal__S;
439error:
440 return 0;
441}
442
444// LcConfigC_Misc_JV_API
445
449
450// doc-key: LcConfigC,LcConfigC-Set,om_
451
453JNIEXPORT void JNICALL Java_jvlcconfig_LcConfigC_SetDefaultFormat (JNIEnv *env, jobject self, jobject format) {
454 LC_CFG hdl = (LC_CFG)pObj2Hdl(env,"LcConfigC",self);
455 JavaErrorCheck;
456 MkRtSetup_X(hdl);
457 enum LcConfigFormatE format_e = MK(pGetEnumFromObj)(env, NS(Class_LcConfigFormatE), format);
458 JavaErrorCheck;
459 LcConfigSetDefaultFormat(hdl, format_e);
460error:
461 return;
462}
463
465JNIEXPORT void JNICALL Java_jvlcconfig_LcConfigC_SetFloatPrecision (JNIEnv *env, jobject self, jshort digits) {
466 LC_CFG hdl = (LC_CFG)pObj2Hdl(env,"LcConfigC",self);
467 JavaErrorCheck;
468 MkRtSetup_X(hdl);
469 LcConfigSetFloatPrecision(hdl, digits);
470error:
471 return;
472}
473
475JNIEXPORT void JNICALL Java_jvlcconfig_LcConfigC_SetIncludeDir (JNIEnv *env, jobject self, jstring include_dir) {
476 LC_CFG hdl = (LC_CFG)pObj2Hdl(env,"LcConfigC",self);
477 JavaErrorCheck;
478 MkRtSetup_X(hdl);
479 MK_STRN include_dir_ptr = (include_dir?(*env)->GetStringUTFChars(env,include_dir,NULL):NULL);
480 JavaErrorCheck;
481 LcConfigSetIncludeDir(hdl, include_dir_ptr);
482 if (include_dir_ptr) (*env)->ReleaseStringUTFChars(env,include_dir,include_dir_ptr);
483error:
484 return;
485}
486
488JNIEXPORT void JNICALL Java_jvlcconfig_LcConfigC_SetIncludeFunc (JNIEnv *env, jobject self, jobject fConfigIncludeData) {
489 LC_CFG hdl = (LC_CFG)pObj2Hdl(env,"LcConfigC",self);
490 JavaErrorCheck;
491 MkRtSetup_X(hdl);
492 LcConfigIncludeCallF fConfigIncludeCall = NS(ConfigIncludeCall);
493 LC_CBP fConfigIncludeData_ptr = MK(ProcCreate)(MK_RT_CALL env, fConfigIncludeData, NULL, NS(MID_fConfigIncludeData), true);
494 JavaErrorCheck;
495 if (fConfigIncludeData_ptr == NULL) fConfigIncludeCall = NULL;
496 enum MkErrorE errVal = LcConfigSetIncludeFunc(hdl, fConfigIncludeCall, fConfigIncludeData_ptr, NS(ConfigIncludeFree));
497 MkErrorC_Check(hdl, errVal)
498error:
499 return;
500}
501
503JNIEXPORT void JNICALL Java_jvlcconfig_LcConfigC_SetOption (JNIEnv *env, jobject self, jobject option, jboolean flag) {
504 LC_CFG hdl = (LC_CFG)pObj2Hdl(env,"LcConfigC",self);
505 JavaErrorCheck;
506 MkRtSetup_X(hdl);
507 enum LcConfigOptionsEF option_e = MK(pGetEnumFromObj)(env, NS(Class_LcConfigOptionsEF), option);
508 JavaErrorCheck;
509 LcConfigSetOption(hdl, option_e, flag);
510error:
511 return;
512}
513
515JNIEXPORT void JNICALL Java_jvlcconfig_LcConfigC_SetOptions (JNIEnv *env, jobject self, jobject options) {
516 LC_CFG hdl = (LC_CFG)pObj2Hdl(env,"LcConfigC",self);
517 JavaErrorCheck;
518 MkRtSetup_X(hdl);
519 enum LcConfigOptionsEF options_e = MK(pGetEnumFromObj)(env, NS(Class_LcConfigOptionsEF), options);
520 JavaErrorCheck;
521 LcConfigSetOptions(hdl, options_e);
522error:
523 return;
524}
525
527JNIEXPORT void JNICALL Java_jvlcconfig_LcConfigC_SetSettingDeleteFunc (JNIEnv *env, jobject self, jobject fSettingDeleteData) {
528 LC_CFG hdl = (LC_CFG)pObj2Hdl(env,"LcConfigC",self);
529 JavaErrorCheck;
530 MkRtSetup_X(hdl);
531 LcSettingDeleteCallF fSettingDeleteCall = NS(SettingDeleteCall);
532 LC_CBP fSettingDeleteData_ptr = MK(ProcCreate)(MK_RT_CALL env, fSettingDeleteData, NULL, NS(MID_fSettingDeleteData), true);
533 JavaErrorCheck;
534 if (fSettingDeleteData_ptr == NULL) fSettingDeleteCall = NULL;
535 enum MkErrorE errVal = LcConfigSetSettingDeleteFunc(hdl, fSettingDeleteCall, fSettingDeleteData_ptr, NS(SettingDeleteFree));
536 MkErrorC_Check(hdl, errVal)
537error:
538 return;
539}
540
542JNIEXPORT void JNICALL Java_jvlcconfig_LcConfigC_SetTabWidth (JNIEnv *env, jobject self, jshort width) {
543 LC_CFG hdl = (LC_CFG)pObj2Hdl(env,"LcConfigC",self);
544 JavaErrorCheck;
545 MkRtSetup_X(hdl);
546 LcConfigSetTabWidth(hdl, width);
547error:
548 return;
549}
550
552// LcConfigC_Set_JV_API
553
557
558// doc-key: LcConfigC,LcConfigC-TOR,sCc
559
561JNIEXPORT jlong JNICALL Java_jvlcconfig_LcConfigC_CTOR (JNIEnv *env, jclass class) {
563 LC_CFG __retVal__L = LcConfigCreate(NULL, NULL);
564 if (__retVal__L == NULL) {
565 (*env)->ThrowNew(env, MK(Class_MkInitError), "LcConfigC.CTOR");
566 goto error;
567 }
568 jlong __retVal__S = (jlong)__retVal__L;
569 return __retVal__S;
570error:
571 return 0;
572}
573
575JNIEXPORT jobject JNICALL Java_jvlcconfig_LcConfigC_Create (JNIEnv *env, jclass class) {
577 LC_CFG __retVal__L = LcConfigCreate(NULL, NULL);
578 if (__retVal__L == NULL) {
579 (*env)->ThrowNew(env, MK(Class_MkInitError), "LcConfigC.Create");
580 goto error;
581 }
582 jobject __retVal__S = LC(LcConfigC_ObjCreate)(MK_RT_CALL env,__retVal__L);
583 return __retVal__S;
584error:
585 return 0;
586}
587
589// LcConfigC_TOR_JV_API
590
591// END-LcConfigC - created by 'jv_MqC.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
592
593// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
594
595void NS(LcConfigC_Init)(LC_RT_ARGS_ONLY) {
597
598 LcConfigC_TT->selfCreate = NS(LcConfigC_selfCreate) ;
599 LcConfigC_TT->selfUnlink = MK(AtomSelfUnlink) ;
600}
601
602// ====================================================================================================
603// OVERLOAD
604
607 JNIEnv *env,
608 jobject self,
609 jclass searchClass,
610 jstring fConfigIncludeDataString
611) {
612 LC_CFG hdl = (LC_CFG)pObj2Hdl(env,"LcConfigC",self);
613 JavaErrorCheck;
614 MkRtSetup_XN(hdl);
615 jmethodID meth = (*env)->GetStaticMethodID(env,MK(Class_MkKernel),"resolveCallback",
616 "(Ljava/lang/Class;Ljava/lang/Class;Ljava/lang/String;)Ljava/lang/Class;");
617 JavaErrorCheck;
618 jclass fConfigIncludeData = (*env)->CallStaticObjectMethod(env, MK(Class_MkKernel), meth, searchClass,
619 LC(Class_LcConfigIncludeIF), fConfigIncludeDataString);
620 JavaErrorCheck;
621 LC_CBP fConfigIncludeData_ptr = MK(ProcCreate)(MK_RT_CALL_NULL env, fConfigIncludeData, NULL, NS(MID_fConfigIncludeData), true);
622 JavaErrorCheck;
623 enum MkErrorE errVal = LcConfigSetIncludeFunc(hdl, NS(ConfigIncludeCall), fConfigIncludeData_ptr, NS(ConfigIncludeFree));
624 MkErrorC_Check(hdl, errVal)
625error:
626 return;
627}
JNIEXPORT void JNICALL Java_jvlcconfig_LcConfigC_SetIncludeFunc__Ljava_C_langlass_2Ljava_lang_String_2(JNIEnv *env, jobject self, jclass searchClass, jstring fConfigIncludeDataString)
Java: cfg.SetIncludeFunc(?LcConfigIncludeIF fConfigIncludeData = null?) → C-API set the __parse...
#define ClassInit
#define LC_RT_ARGS_ONLY
MK_PTRB * LC_CBP
enum MkErrorE(* LcSettingDeleteCallF)(LcSettingDeleteCallF_ARGS)
enum MkErrorE(* LcConfigIncludeCallF)(LcConfigIncludeCallF_ARGS)
static MK_ARTIFICIAL LC_CFG LcConfigC_ObjNew(config_t *hdl)
return Programming-Language-Micro-Kernel (PLMK) instance from native hdl …
const struct LcConfigS * LC_CFGN
class-shortcut for const struct LcConfigS *, all const shortcut using the XX_YYYC syntax (only for pu...
struct LcConfigS * LC_CFG
class-shortcut for struct LcConfigS *, all shortcut using the XX_YYY syntax (only for public API) …
#define LcConfigInstances()
static LC_CFG LcConfigPrev(LC_CFG const cfg)
get previous instance from linked-list of LcConfigS type
static LC_CFG LcConfigC_ObjCreate(config_t *hdl)
return Programming-Language-Micro-Kernel (PLMK) instance from native hdl …
static LC_CFG LcConfigNext(LC_CFG const cfg)
get next instance from linked-list of LcConfigS type
static LC_CFG LcConfigGetNull(void)
Null-Slot - return a LcConfigC typed NULL instance …
#define LcConfigHandleResolve(...)
#define LcConfigC_X2obj(x)
__thread MK_TYP LcConfigC_TT
class as MkTypeDefS-class-type …
JNIEXPORT jobject JNICALL Java_jvlcconfig_LcConfigC_Next(JNIEnv *env, jobject self)
Java: LcConfigC cfg.Next() → C-API get next instance from linked-list of LcConfigS type
JNIEXPORT jobject JNICALL Java_jvlcconfig_LcConfigC_Prev(JNIEnv *env, jobject self)
Java: LcConfigC cfg.Prev() → C-API get previous instance from linked-list of LcConfigS type
JNIEXPORT jobject JNICALL Java_jvlcconfig_LcConfigC_GetNull(JNIEnv *env, jclass class)
Java: [static] LcConfigC LcConfigC.GetNull() → C-API Null-Slot - return a LcConfigC typed NULL i...
JNIEXPORT jobject JNICALL Java_jvlcconfig_LcConfigC_Instances(JNIEnv *env, jclass class)
Java: [static] LcConfigC LcConfigC.Instances() → C-API get head-instance from linked-list of LcC...
JNIEXPORT jobject JNICALL Java_jvlcconfig_LcConfigC_HandleResolve(JNIEnv *env, jclass class, jint netHdl)
Java: [static] LcConfigC LcConfigC.HandleResolve(int netHdl) → C-API Handle-Resolve-Slot - retur...
static enum LcErrorTypeE LcConfigErrorType(LC_CFGN config)
This function, which is implemented as a macro, returns the type of error that occurred during the la...
JNIEXPORT jobject JNICALL Java_jvlcconfig_LcConfigC_ErrorType(JNIEnv *env, jobject self)
Java: LcErrorTypeE config.ErrorType() → C-API This function, which is implemented as a macro,...
static enum LcConfigFormatE LcConfigGetDefaultFormat(LC_CFGN config)
These functions, which are implemented as macros, get and set the default external format for setting...
static MK_I16 LcConfigGetTabWidth(LC_CFGN config)
These functions, which are implemented as macros, get and set the tab width for the configuration con...
static MK_BOOL LcConfigGetOption(LC_CFGN config, enum LcConfigOptionsEF option)
Since v1.7 These functions get and set the given option of the configuration config …
static MK_I16 LcConfigGetFloatPrecision(LC_CFGN config)
Since v1.6 These functions get and set the number of decimal digits to output after the radix charact...
static enum LcConfigOptionsEF LcConfigGetOptions(LC_CFGN config)
These functions get and set the options for the configuration config …
static MK_STRN LcConfigGetIncludeDir(LC_CFGN config)
ConfigSetIncludeDir specifies the include directory, include_dir, relative to which the files specifi...
JNIEXPORT jstring JNICALL Java_jvlcconfig_LcConfigC_GetIncludeDir(JNIEnv *env, jobject self)
Java: String config.GetIncludeDir() → C-API ConfigSetIncludeDir specifies the include directory...
JNIEXPORT jboolean JNICALL Java_jvlcconfig_LcConfigC_GetOption(JNIEnv *env, jobject self, jobject option)
Java: boolean config.GetOption(LcConfigOptionsEF option) → C-API Since v1.7 These functions get...
JNIEXPORT jobject JNICALL Java_jvlcconfig_LcConfigC_GetOptions(JNIEnv *env, jobject self)
Java: LcConfigOptionsEF config.GetOptions() → C-API These functions get and set the options for...
JNIEXPORT jshort JNICALL Java_jvlcconfig_LcConfigC_GetTabWidth(JNIEnv *env, jobject self)
Java: short config.GetTabWidth() → C-API These functions, which are implemented as macros,...
JNIEXPORT jshort JNICALL Java_jvlcconfig_LcConfigC_GetFloatPrecision(JNIEnv *env, jobject self)
Java: short config.GetFloatPrecision() → C-API Since v1.6 These functions get and set the numbe...
JNIEXPORT jobject JNICALL Java_jvlcconfig_LcConfigC_GetDefaultFormat(JNIEnv *env, jobject self)
Java: LcConfigFormatE config.GetDefaultFormat() → C-API These functions, which are implemented ...
static enum MkErrorE LcConfigLookupFloat(LC_CFGN config, MK_STRN path, MK_DBL *value_out)
These functions look up the value of the setting in the configuration config specified by the path pa...
static enum MkErrorE LcConfigLookupBool(LC_CFGN config, MK_STRN path, MK_BOOL *value_out)
These functions look up the value of the setting in the configuration config specified by the path pa...
static enum MkErrorE LcConfigLookupString(LC_CFGN config, MK_STRN path, MK_STRN *value_out)
These functions look up the value of the setting in the configuration config specified by the path pa...
static enum MkErrorE LcConfigLookupInt(LC_CFGN config, MK_STRN path, MK_I32 *value_out)
These functions look up the value of the setting in the configuration config specified by the path pa...
static enum MkErrorE LcConfigLookupInt64(LC_CFGN config, MK_STRN path, MK_I64 *value_out)
These functions look up the value of the setting in the configuration config specified by the path pa...
static LC_CFS LcConfigLookup(LC_CFGN config, MK_STRN path)
This function locates the setting in the configuration config specified by the path path …
JNIEXPORT jint JNICALL Java_jvlcconfig_LcConfigC_LookupInt(JNIEnv *env, jobject self, jstring path)
Java: int config.LookupInt(String path) → C-API These functions look up the value of the settin...
JNIEXPORT jdouble JNICALL Java_jvlcconfig_LcConfigC_LookupFloat(JNIEnv *env, jobject self, jstring path)
Java: double config.LookupFloat(String path) → C-API These functions look up the value of the s...
JNIEXPORT jstring JNICALL Java_jvlcconfig_LcConfigC_LookupString(JNIEnv *env, jobject self, jstring path)
Java: String config.LookupString(String path) → C-API These functions look up the value of the ...
JNIEXPORT jobject JNICALL Java_jvlcconfig_LcConfigC_Lookup(JNIEnv *env, jobject self, jstring path)
Java: LcSettingC config.Lookup(String path) → C-API This function locates the setting in the co...
JNIEXPORT jlong JNICALL Java_jvlcconfig_LcConfigC_LookupInt64(JNIEnv *env, jobject self, jstring path)
Java: long config.LookupInt64(String path) → C-API These functions look up the value of the set...
JNIEXPORT jboolean JNICALL Java_jvlcconfig_LcConfigC_LookupBool(JNIEnv *env, jobject self, jstring path)
Java: boolean config.LookupBool(String path) → C-API These functions look up the value of the s...
static enum MkErrorE LcConfigWriteFile(LC_CFG config, MK_STRN filename)
This function writes the configuration config to the file named filename …
#define LcConfigWriteString(...)
static LC_CFS LcConfigRootSetting(LC_CFGN config)
This function, which is implemented as a macro, returns the root setting for the configuration config...
#define LcConfigLog(...)
static void LcConfigClear(LC_CFG config)
Since v1.7 This function clears the configuration config …
static enum MkErrorE LcConfigReadFile(LC_CFG config, MK_STRN filename)
This function reads and parses a configuration from the file named filename into the configuration ob...
static enum MkErrorE LcConfigReadString(LC_CFG config, MK_STRN str)
This function reads and parses a configuration from the string str into the configuration object conf...
JNIEXPORT void JNICALL Java_jvlcconfig_LcConfigC_ReadString(JNIEnv *env, jobject self, jstring str)
Java: config.ReadString(String str) → C-API This function reads and parses a configuration from...
JNIEXPORT jstring JNICALL Java_jvlcconfig_LcConfigC_WriteString(JNIEnv *env, jobject self)
Java: String cfg.WriteString() → C-API read the entire configuration cfg into the string val_ou...
JNIEXPORT void JNICALL Java_jvlcconfig_LcConfigC_ReadFile(JNIEnv *env, jobject self, jstring filename)
Java: config.ReadFile(String filename) → C-API This function reads and parses a configuration f...
JNIEXPORT void JNICALL Java_jvlcconfig_LcConfigC_Log(JNIEnv *env, jobject self, jobject fmtobj, jint debug, jstring callfunc, jint lvl)
Java: cfg.Log(?MkObjectC fmtobj = null?, ?int debug = 0?, ?String callfunc = null?...
JNIEXPORT void JNICALL Java_jvlcconfig_LcConfigC_WriteFile(JNIEnv *env, jobject self, jstring filename)
Java: config.WriteFile(String filename) → C-API This function writes the configuration config t...
JNIEXPORT void JNICALL Java_jvlcconfig_LcConfigC_Clear(JNIEnv *env, jobject self)
Java: config.Clear() → C-API Since v1.7 This function clears the configuration config …
JNIEXPORT jobject JNICALL Java_jvlcconfig_LcConfigC_RootSetting(JNIEnv *env, jobject self)
Java: LcSettingC config.RootSetting() → C-API This function, which is implemented as a macro,...
static void LcConfigSetTabWidth(LC_CFG config, MK_I16 width)
These functions, which are implemented as macros, get and set the tab width for the configuration con...
static void LcConfigSetFloatPrecision(LC_CFG config, MK_I16 digits)
Since v1.6 These functions get and set the number of decimal digits to output after the radix charact...
#define LcConfigSetSettingDeleteFunc(...)
static void LcConfigSetOptions(LC_CFG config, enum LcConfigOptionsEF options)
These functions get and set the options for the configuration config …
static void LcConfigSetOption(LC_CFG config, enum LcConfigOptionsEF option, MK_BOOL flag)
Since v1.7 These functions get and set the given option of the configuration config …
static void LcConfigSetIncludeDir(LC_CFG config, MK_STRN include_dir)
ConfigSetIncludeDir specifies the include directory, include_dir, relative to which the files specifi...
#define LcConfigSetIncludeFunc(...)
static void LcConfigSetDefaultFormat(LC_CFG config, enum LcConfigFormatE format)
These functions, which are implemented as macros, get and set the default external format for setting...
JNIEXPORT void JNICALL Java_jvlcconfig_LcConfigC_SetIncludeDir(JNIEnv *env, jobject self, jstring include_dir)
Java: config.SetIncludeDir(String include_dir) → C-API ConfigSetIncludeDir specifies the includ...
JNIEXPORT void JNICALL Java_jvlcconfig_LcConfigC_SetDefaultFormat(JNIEnv *env, jobject self, jobject format)
Java: config.SetDefaultFormat(LcConfigFormatE format) → C-API These functions,...
JNIEXPORT void JNICALL Java_jvlcconfig_LcConfigC_SetSettingDeleteFunc(JNIEnv *env, jobject self, jobject fSettingDeleteData)
Java: cfg.SetSettingDeleteFunc(?LcSettingDeleteIF fSettingDeleteData = null?) → C-API set the c...
JNIEXPORT void JNICALL Java_jvlcconfig_LcConfigC_SetIncludeFunc(JNIEnv *env, jobject self, jobject fConfigIncludeData)
Java: cfg.SetIncludeFunc(?LcConfigIncludeIF fConfigIncludeData = null?) → C-API set the __parse...
JNIEXPORT void JNICALL Java_jvlcconfig_LcConfigC_SetOptions(JNIEnv *env, jobject self, jobject options)
Java: config.SetOptions(LcConfigOptionsEF options) → C-API These functions get and set the opti...
JNIEXPORT void JNICALL Java_jvlcconfig_LcConfigC_SetFloatPrecision(JNIEnv *env, jobject self, jshort digits)
Java: config.SetFloatPrecision(short digits) → C-API Since v1.6 These functions get and set the...
JNIEXPORT void JNICALL Java_jvlcconfig_LcConfigC_SetOption(JNIEnv *env, jobject self, jobject option, jboolean flag)
Java: config.SetOption(LcConfigOptionsEF option, boolean flag) → C-API Since v1....
JNIEXPORT void JNICALL Java_jvlcconfig_LcConfigC_SetTabWidth(JNIEnv *env, jobject self, jshort width)
Java: config.SetTabWidth(short width) → C-API These functions, which are implemented as macros,...
static LC_CFG LcConfigCreate(MK_TYP type, config_t *nat)
create a LcConfigC instance …
JNIEXPORT jlong JNICALL Java_jvlcconfig_LcConfigC_CTOR(JNIEnv *env, jclass class)
Java: [constructor,static] LcConfigC LcConfigC.Create() → C-API create a LcConfigC instance …
JNIEXPORT jobject JNICALL Java_jvlcconfig_LcConfigC_Create(JNIEnv *env, jclass class)
Java: [constructor,static] LcConfigC LcConfigC.Create() → C-API create a LcConfigC instance …
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
MK_STRN LcErrorTypeE_ToString(enum LcErrorTypeE value)
return the LcErrorTypeE as string …
LcErrorTypeE
error types
Definition LcEnum_lc.h:228
MK_STRN LcConfigFormatE_ToString(enum LcConfigFormatE value)
return the LcConfigFormatE as string …
static MK_ARTIFICIAL LC_CFS LcSettingC_ObjNew(config_setting_t *hdl)
return Programming-Language-Micro-Kernel (PLMK) instance from native hdl …
#define MK_UNUSED
MkErrorE
MK_PTRB * MK_PTR
const MK_STRB * MK_STRN
signed long long MK_I64
bool MK_BOOL
signed short int MK_I16
double MK_DBL
signed int MK_I32
const struct MkObjectS * MK_OBJN
static MK_I32 MkRuntimeDebugGet(void)
#define MK_RT_CALL_NULL
#define MkThreadLocal
#define MkRtSetup_XN(x)
#define MK_RT_CALL
#define MkRtSetup_X(x)
#define MK_RT_ARGS
#define MkRtSetup_NULL
Struct to represent the data from the LcConfigC …
Struct to represent the data from the LcSettingC …
MkSelfUnlinkF selfUnlink
MkSelfCreateF selfCreate