javalcconfig 9.0
Loading...
Searching...
No Matches
LcConfigC_java.c
Go to the documentation of this file.
1
12/* VAR-START */
13#define NHI1_FILE_NAME "LcConfigC_java.c"
14
15#include "jni_h/javamsgque_lcconfig_LcConfigC.h"
16#include "LibLcConfig_java.h"
17
18jobject NS(LcConfigC_ObjNew) (MK_RT_ARGS JNIEnv *env, LC_CFG hdl) {
19 return MK(MkObjectC_atomObjNew)(MK_RT_CALL env, (MK_OBJ)hdl);
20}
21
22__attribute__((unused))
23static jobject NS(LcConfigC_ObjCreate) (MK_RT_ARGS JNIEnv *env, LC_CFG hdl) {
24 return MK(MkObjectC_atomObjCreate)(MK_RT_CALL env, (MK_OBJ)hdl);
25}
26
27static MK_PTR NS(LcConfigC_selfCreate) (MK_RT_ARGS MK_OBJ obj, MK_PTR envP) {
28 JNIEnv *env = (JNIEnv*) envP;
29 return (*env)->NewObject(env, NS(Class_LcConfigC), NS(MID_LcConfigC_INIT), (jlong) obj, JNI_TRUE);
30}
31
32static void NS(LcConfigC_selfDelete) (MK_RT_ARGS MK_PTR ptr, MK_PTR envP) {
33 if (!envP) return;
34 JNIEnv *env = (JNIEnv*) envP;
35 jobject self = (jobject) ptr;
36 (*env)->CallObjectMethod(env, self, NS(MID_LcConfigC_EXIT));
37}
38
39/* VAR-END */
40
42JNIEXPORT void JNICALL Java_javamsgque_lcconfig_LcConfigC_SetIncludeFunc__Ljava_lang_Class_2Ljava_lang_String_2 (JNIEnv *env, jobject self, jclass searchClass, jstring fConfigIncludeDataString) {
43 LC_CFG hdl = (LC_CFG)pObj2Hdl(env,self);
44 JavaErrorCheck
45 MkRtSetup_XN(hdl);
46 jmethodID meth = (*env)->GetStaticMethodID(env,MK(Class_MkKernel),"resolveCallback",
47 "(Ljava/lang/Class;Ljava/lang/Class;Ljava/lang/String;)Ljava/lang/Class;");
48 JavaErrorCheck
49 jclass fConfigIncludeData = (*env)->CallStaticObjectMethod(env, MK(Class_MkKernel), meth, searchClass,
50 LC(Class_LcConfigIncludeCB), fConfigIncludeDataString);
51 JavaErrorCheck
52 LC_CBP fConfigIncludeData_ptr = MK(ProcCreate)(MK_RT_CALL_NULL env, fConfigIncludeData, NULL, NS(MID_fConfigIncludeData), true);
53 JavaErrorCheck
54 enum MkErrorE errVal = LcConfigSetIncludeFunc(hdl, NS(LcConfigIncludeCall), fConfigIncludeData_ptr, NS(LcConfigIncludeFree));
55 MkErrorC_Check(hdl, errVal)
56error:
57 return;
58}
59
60
61// BEGIN-LcConfigC - created by 'jv_MqC.tcl -i NHI1_HOME/theConfig/liblcconfig/.liblcconfig.meta' - DO NOT change
62
66
67// doc-key: LcConfigC,LcConfigC-Error,om_
68
70JNIEXPORT jobject JNICALL Java_javamsgque_lcconfig_LcConfigC_ErrorType (JNIEnv *env, jobject self) {
71 LC_CFGN hdl = (LC_CFGN)pObj2Hdl(env,self);
72 JavaErrorCheck
73 MkRtSetup_X(hdl);
74 enum LcErrorTypeE __retVal__L = LcConfigErrorType(hdl);
75 jobject __retVal__S = MK(pGetEnumFromInt)(env,LC(Class_LcErrorTypeE),"(I)Ljavamsgque/lcconfig/LcErrorTypeE;",__retVal__L);
76 return __retVal__S;
77error:
78 return 0;
79}
80
82
86
87// doc-key: LcConfigC,LcConfigC-Get,om_
88
90JNIEXPORT jobject JNICALL Java_javamsgque_lcconfig_LcConfigC_GetDefaultFormat (JNIEnv *env, jobject self) {
91 LC_CFGN hdl = (LC_CFGN)pObj2Hdl(env,self);
92 JavaErrorCheck
93 MkRtSetup_X(hdl);
94 enum LcConfigFormatE __retVal__L = LcConfigGetDefaultFormat(hdl);
95 jobject __retVal__S = MK(pGetEnumFromInt)(env,LC(Class_LcConfigFormatE),"(I)Ljavamsgque/lcconfig/LcConfigFormatE;",__retVal__L);
96 return __retVal__S;
97error:
98 return 0;
99}
100
102JNIEXPORT jshort JNICALL Java_javamsgque_lcconfig_LcConfigC_GetFloatPrecision (JNIEnv *env, jobject self) {
103 LC_CFGN hdl = (LC_CFGN)pObj2Hdl(env,self);
104 JavaErrorCheck
105 MkRtSetup_X(hdl);
106 MK_SRT __retVal__L = LcConfigGetFloatPrecision(hdl);
107 jshort __retVal__S = __retVal__L;
108 return __retVal__S;
109error:
110 return 0;
111}
112
114JNIEXPORT jstring JNICALL Java_javamsgque_lcconfig_LcConfigC_GetIncludeDir (JNIEnv *env, jobject self) {
115 LC_CFGN hdl = (LC_CFGN)pObj2Hdl(env,self);
116 JavaErrorCheck
117 MkRtSetup_X(hdl);
118 MK_STRN __retVal__L = LcConfigGetIncludeDir(hdl);
119 jstring __retVal__S = JC2O(env,__retVal__L);
120 return __retVal__S;
121error:
122 return 0;
123}
124
126JNIEXPORT jboolean JNICALL Java_javamsgque_lcconfig_LcConfigC_GetOption (JNIEnv *env, jobject self, jobject option) {
127 LC_CFGN hdl = (LC_CFGN)pObj2Hdl(env,self);
128 JavaErrorCheck
129 MkRtSetup_X(hdl);
130 enum LcConfigOptionsEF option_e = MK(pGetEnumFromObj)(env, NS(Class_LcConfigOptionsEF), option);
131 JavaErrorCheck
132 MK_BOOL __retVal__L = LcConfigGetOption(hdl, option_e);
133 jboolean __retVal__S = __retVal__L;
134 return __retVal__S;
135error:
136 return 0;
137}
138
140JNIEXPORT jobject JNICALL Java_javamsgque_lcconfig_LcConfigC_GetOptions (JNIEnv *env, jobject self) {
141 LC_CFGN hdl = (LC_CFGN)pObj2Hdl(env,self);
142 JavaErrorCheck
143 MkRtSetup_X(hdl);
144 enum LcConfigOptionsEF __retVal__L = LcConfigGetOptions(hdl);
145 jobject __retVal__S = MK(pGetEnumFlagFromInt)(env,LC(Class_LcConfigOptionsEF),__retVal__L);
146 return __retVal__S;
147error:
148 return 0;
149}
150
152JNIEXPORT jshort JNICALL Java_javamsgque_lcconfig_LcConfigC_GetTabWidth (JNIEnv *env, jobject self) {
153 LC_CFGN hdl = (LC_CFGN)pObj2Hdl(env,self);
154 JavaErrorCheck
155 MkRtSetup_X(hdl);
156 MK_SRT __retVal__L = LcConfigGetTabWidth(hdl);
157 jshort __retVal__S = __retVal__L;
158 return __retVal__S;
159error:
160 return 0;
161}
162
164
168
169// doc-key: LcConfigC,LcConfigC-Introspection,oc_
170
172JNIEXPORT jobject JNICALL Java_javamsgque_lcconfig_LcConfigC_Next (JNIEnv *env, jobject self) {
173 LC_CFG hdl = (LC_CFG)pObj2Hdl(env,self);
174 JavaErrorCheck
175 MkRtSetup_X(hdl);
176 LC_CFG __retVal__L = LcConfigNext(hdl);
177 jobject __retVal__S = LC(LcConfigC_ObjNew)(MK_RT_CALL env,__retVal__L);
178 return __retVal__S;
179error:
180 return 0;
181}
182
184JNIEXPORT jobject JNICALL Java_javamsgque_lcconfig_LcConfigC_Prev (JNIEnv *env, jobject self) {
185 LC_CFG hdl = (LC_CFG)pObj2Hdl(env,self);
186 JavaErrorCheck
187 MkRtSetup_X(hdl);
188 LC_CFG __retVal__L = LcConfigPrev(hdl);
189 jobject __retVal__S = LC(LcConfigC_ObjNew)(MK_RT_CALL env,__retVal__L);
190 return __retVal__S;
191error:
192 return 0;
193}
194
195
196// doc-key: LcConfigC,LcConfigC-Introspection,sc_
197
199JNIEXPORT jobject JNICALL Java_javamsgque_lcconfig_LcConfigC_Instances (JNIEnv *env, jclass class) {
201 LC_CFG __retVal__L = LcConfigInstances();
202 jobject __retVal__S = LC(LcConfigC_ObjNew)(MK_RT_CALL env,__retVal__L);
203 return __retVal__S;
204}
205
207
211
212// doc-key: LcConfigC,LcConfigC-Lookup,oc_
213
215JNIEXPORT jobject JNICALL Java_javamsgque_lcconfig_LcConfigC_Lookup (JNIEnv *env, jobject self, jstring path) {
216 LC_CFGN hdl = (LC_CFGN)pObj2Hdl(env,self);
217 JavaErrorCheck
218 MkRtSetup_X(hdl);
219 MK_STRN path_ptr = (path?(*env)->GetStringUTFChars(env,path,NULL):NULL);
220 JavaErrorCheck
221 LC_CFS __retVal__L = LcConfigLookup(hdl, path_ptr);
222 if (__retVal__L == NULL) {
223 (*env)->ThrowNew(env, MK(Class_MkInitError), "LcConfigC.Lookup");
224 goto error;
225 }
226 jobject __retVal__S = LC(LcSettingC_ObjNew)(MK_RT_CALL env,__retVal__L);
227 if (path_ptr) (*env)->ReleaseStringUTFChars(env,path,path_ptr);
228 return __retVal__S;
229error:
230 return 0;
231}
232
233
234// doc-key: LcConfigC,LcConfigC-Lookup,omo
235
237JNIEXPORT jboolean JNICALL Java_javamsgque_lcconfig_LcConfigC_LookupBool (JNIEnv *env, jobject self, jstring path) {
238 LC_CFGN hdl = (LC_CFGN)pObj2Hdl(env,self);
239 JavaErrorCheck
240 MkRtSetup_X(hdl);
241 MK_BOOL value_out;
242 MK_STRN path_ptr = (path?(*env)->GetStringUTFChars(env,path,NULL):NULL);
243 JavaErrorCheck
244 enum MkErrorE errVal = LcConfigLookupBool(hdl, path_ptr, &value_out);
245 MkErrorC_Check(hdl, errVal)
246 jboolean __retVal__S = value_out;
247 if (path_ptr) (*env)->ReleaseStringUTFChars(env,path,path_ptr);
248 return __retVal__S;
249error:
250 return 0;
251}
252
254JNIEXPORT jdouble JNICALL Java_javamsgque_lcconfig_LcConfigC_LookupFloat (JNIEnv *env, jobject self, jstring path) {
255 LC_CFGN hdl = (LC_CFGN)pObj2Hdl(env,self);
256 JavaErrorCheck
257 MkRtSetup_X(hdl);
258 MK_DBL value_out;
259 MK_STRN path_ptr = (path?(*env)->GetStringUTFChars(env,path,NULL):NULL);
260 JavaErrorCheck
261 enum MkErrorE errVal = LcConfigLookupFloat(hdl, path_ptr, &value_out);
262 MkErrorC_Check(hdl, errVal)
263 jdouble __retVal__S = value_out;
264 if (path_ptr) (*env)->ReleaseStringUTFChars(env,path,path_ptr);
265 return __retVal__S;
266error:
267 return 0;
268}
269
271JNIEXPORT jint JNICALL Java_javamsgque_lcconfig_LcConfigC_LookupInt (JNIEnv *env, jobject self, jstring path) {
272 LC_CFGN hdl = (LC_CFGN)pObj2Hdl(env,self);
273 JavaErrorCheck
274 MkRtSetup_X(hdl);
275 MK_INT value_out;
276 MK_STRN path_ptr = (path?(*env)->GetStringUTFChars(env,path,NULL):NULL);
277 JavaErrorCheck
278 enum MkErrorE errVal = LcConfigLookupInt(hdl, path_ptr, &value_out);
279 MkErrorC_Check(hdl, errVal)
280 jint __retVal__S = value_out;
281 if (path_ptr) (*env)->ReleaseStringUTFChars(env,path,path_ptr);
282 return __retVal__S;
283error:
284 return 0;
285}
286
288JNIEXPORT jlong JNICALL Java_javamsgque_lcconfig_LcConfigC_LookupInt64 (JNIEnv *env, jobject self, jstring path) {
289 LC_CFGN hdl = (LC_CFGN)pObj2Hdl(env,self);
290 JavaErrorCheck
291 MkRtSetup_X(hdl);
292 MK_WID value_out;
293 MK_STRN path_ptr = (path?(*env)->GetStringUTFChars(env,path,NULL):NULL);
294 JavaErrorCheck
295 enum MkErrorE errVal = LcConfigLookupInt64(hdl, path_ptr, &value_out);
296 MkErrorC_Check(hdl, errVal)
297 jlong __retVal__S = value_out;
298 if (path_ptr) (*env)->ReleaseStringUTFChars(env,path,path_ptr);
299 return __retVal__S;
300error:
301 return 0;
302}
303
305JNIEXPORT jstring JNICALL Java_javamsgque_lcconfig_LcConfigC_LookupString (JNIEnv *env, jobject self, jstring path) {
306 LC_CFGN hdl = (LC_CFGN)pObj2Hdl(env,self);
307 JavaErrorCheck
308 MkRtSetup_X(hdl);
309 MK_STRN value_out;
310 MK_STRN path_ptr = (path?(*env)->GetStringUTFChars(env,path,NULL):NULL);
311 JavaErrorCheck
312 enum MkErrorE errVal = LcConfigLookupString(hdl, path_ptr, &value_out);
313 MkErrorC_Check(hdl, errVal)
314 jstring __retVal__S = JC2O(env,value_out);
315 if (path_ptr) (*env)->ReleaseStringUTFChars(env,path,path_ptr);
316 return __retVal__S;
317error:
318 return 0;
319}
320
322
326
327// doc-key: LcConfigC,LcConfigC-Misc,oc_
328
330JNIEXPORT jobject JNICALL Java_javamsgque_lcconfig_LcConfigC_RootSetting (JNIEnv *env, jobject self) {
331 LC_CFGN hdl = (LC_CFGN)pObj2Hdl(env,self);
332 JavaErrorCheck
333 MkRtSetup_X(hdl);
334 LC_CFS __retVal__L = LcConfigRootSetting(hdl);
335 jobject __retVal__S = LC(LcSettingC_ObjNew)(MK_RT_CALL env,__retVal__L);
336 return __retVal__S;
337error:
338 return 0;
339}
340
341
342// doc-key: LcConfigC,LcConfigC-Misc,om_
343
345JNIEXPORT void JNICALL Java_javamsgque_lcconfig_LcConfigC_Clear (JNIEnv *env, jobject self) {
346 LC_CFG hdl = (LC_CFG)pObj2Hdl(env,self);
347 JavaErrorCheck
348 MkRtSetup_X(hdl);
349 LcConfigClear(hdl);
350error:
351 return;
352}
353
355JNIEXPORT void JNICALL Java_javamsgque_lcconfig_LcConfigC_Log (JNIEnv *env, jobject self, jobject fmtobj, jint debug, jstring callfunc, jint lvl) {
356 LC_CFGN hdl = (LC_CFGN)pObj2Hdl(env,self);
357 JavaErrorCheck
358 MkRtSetup_X(hdl);
359 MK_OBJN fmtobj_hdl = (MK_OBJN)pObj2Hdl(env,fmtobj);
360 JavaErrorCheck
361 if (callfunc == NULL) {
362 (*env)->CallStaticVoidMethod(env,MK(Class_MkKernel),MK(MID_MkKernel_getCallerStack));
363 }
364 if (callfunc == NULL) {callfunc = MK(pGetCallerProc)(env);}
365 if (debug > (jint)(MkRuntimeGetDebug())) {return;}
366 MK_STRN callfunc_ptr = (callfunc?(*env)->GetStringUTFChars(env,callfunc,NULL):NULL);
367 JavaErrorCheck
368 LcConfigLog(hdl, fmtobj_hdl, debug, callfunc_ptr, lvl);
369 if (callfunc_ptr) (*env)->ReleaseStringUTFChars(env,callfunc,callfunc_ptr);
370error:
371 return;
372}
373
375JNIEXPORT void JNICALL Java_javamsgque_lcconfig_LcConfigC_ReadFile (JNIEnv *env, jobject self, jstring filename) {
376 LC_CFG hdl = (LC_CFG)pObj2Hdl(env,self);
377 JavaErrorCheck
378 MkRtSetup_X(hdl);
379 MK_STRN filename_ptr = (filename?(*env)->GetStringUTFChars(env,filename,NULL):NULL);
380 JavaErrorCheck
381 enum MkErrorE errVal = LcConfigReadFile(hdl, filename_ptr);
382 MkErrorC_Check(hdl, errVal)
383 if (filename_ptr) (*env)->ReleaseStringUTFChars(env,filename,filename_ptr);
384error:
385 return;
386}
387
389JNIEXPORT void JNICALL Java_javamsgque_lcconfig_LcConfigC_ReadString (JNIEnv *env, jobject self, jstring str) {
390 LC_CFG hdl = (LC_CFG)pObj2Hdl(env,self);
391 JavaErrorCheck
392 MkRtSetup_X(hdl);
393 MK_STRN str_ptr = (str?(*env)->GetStringUTFChars(env,str,NULL):NULL);
394 JavaErrorCheck
395 enum MkErrorE errVal = LcConfigReadString(hdl, str_ptr);
396 MkErrorC_Check(hdl, errVal)
397 if (str_ptr) (*env)->ReleaseStringUTFChars(env,str,str_ptr);
398error:
399 return;
400}
401
403JNIEXPORT void JNICALL Java_javamsgque_lcconfig_LcConfigC_WriteFile (JNIEnv *env, jobject self, jstring filename) {
404 LC_CFG hdl = (LC_CFG)pObj2Hdl(env,self);
405 JavaErrorCheck
406 MkRtSetup_X(hdl);
407 MK_STRN filename_ptr = (filename?(*env)->GetStringUTFChars(env,filename,NULL):NULL);
408 JavaErrorCheck
409 enum MkErrorE errVal = LcConfigWriteFile(hdl, filename_ptr);
410 MkErrorC_Check(hdl, errVal)
411 if (filename_ptr) (*env)->ReleaseStringUTFChars(env,filename,filename_ptr);
412error:
413 return;
414}
415
416
417// doc-key: LcConfigC,LcConfigC-Misc,omo
418
420JNIEXPORT jstring JNICALL Java_javamsgque_lcconfig_LcConfigC_WriteString (JNIEnv *env, jobject self) {
421 LC_CFGN hdl = (LC_CFGN)pObj2Hdl(env,self);
422 JavaErrorCheck
423 MkRtSetup_X(hdl);
424 MK_STRN val_out;
425 enum MkErrorE errVal = LcConfigWriteString(hdl, &val_out);
426 MkErrorC_Check(hdl, errVal)
427 jstring __retVal__S = JC2O(env,val_out);
428 return __retVal__S;
429error:
430 return 0;
431}
432
434
438
439// doc-key: LcConfigC,LcConfigC-Set,om_
440
442JNIEXPORT void JNICALL Java_javamsgque_lcconfig_LcConfigC_SetDefaultFormat (JNIEnv *env, jobject self, jobject format) {
443 LC_CFG hdl = (LC_CFG)pObj2Hdl(env,self);
444 JavaErrorCheck
445 MkRtSetup_X(hdl);
446 enum LcConfigFormatE format_e = MK(pGetEnumFromObj)(env, NS(Class_LcConfigFormatE), format);
447 JavaErrorCheck
448 LcConfigSetDefaultFormat(hdl, format_e);
449error:
450 return;
451}
452
454JNIEXPORT void JNICALL Java_javamsgque_lcconfig_LcConfigC_SetFloatPrecision (JNIEnv *env, jobject self, jshort digits) {
455 LC_CFG hdl = (LC_CFG)pObj2Hdl(env,self);
456 JavaErrorCheck
457 MkRtSetup_X(hdl);
458 LcConfigSetFloatPrecision(hdl, digits);
459error:
460 return;
461}
462
464JNIEXPORT void JNICALL Java_javamsgque_lcconfig_LcConfigC_SetIncludeDir (JNIEnv *env, jobject self, jstring include_dir) {
465 LC_CFG hdl = (LC_CFG)pObj2Hdl(env,self);
466 JavaErrorCheck
467 MkRtSetup_X(hdl);
468 MK_STRN include_dir_ptr = (include_dir?(*env)->GetStringUTFChars(env,include_dir,NULL):NULL);
469 JavaErrorCheck
470 LcConfigSetIncludeDir(hdl, include_dir_ptr);
471 if (include_dir_ptr) (*env)->ReleaseStringUTFChars(env,include_dir,include_dir_ptr);
472error:
473 return;
474}
475
477JNIEXPORT void JNICALL Java_javamsgque_lcconfig_LcConfigC_SetIncludeFunc (JNIEnv *env, jobject self, jobject fConfigIncludeData) {
478 LC_CFG hdl = (LC_CFG)pObj2Hdl(env,self);
479 JavaErrorCheck
480 MkRtSetup_X(hdl);
481 LC_CBP fConfigIncludeData_ptr = MK(ProcCreate)(MK_RT_CALL env, fConfigIncludeData, NULL, NS(MID_fConfigIncludeData), true);
482 JavaErrorCheck
483 enum MkErrorE errVal = LcConfigSetIncludeFunc(hdl, NS(LcConfigIncludeCall), fConfigIncludeData_ptr, NS(LcConfigIncludeFree));
484 MkErrorC_Check(hdl, errVal)
485error:
486 return;
487}
488
490JNIEXPORT void JNICALL Java_javamsgque_lcconfig_LcConfigC_SetOption (JNIEnv *env, jobject self, jobject option, jboolean flag) {
491 LC_CFG hdl = (LC_CFG)pObj2Hdl(env,self);
492 JavaErrorCheck
493 MkRtSetup_X(hdl);
494 enum LcConfigOptionsEF option_e = MK(pGetEnumFromObj)(env, NS(Class_LcConfigOptionsEF), option);
495 JavaErrorCheck
496 LcConfigSetOption(hdl, option_e, flag);
497error:
498 return;
499}
500
502JNIEXPORT void JNICALL Java_javamsgque_lcconfig_LcConfigC_SetOptions (JNIEnv *env, jobject self, jobject options) {
503 LC_CFG hdl = (LC_CFG)pObj2Hdl(env,self);
504 JavaErrorCheck
505 MkRtSetup_X(hdl);
506 enum LcConfigOptionsEF options_e = MK(pGetEnumFromObj)(env, NS(Class_LcConfigOptionsEF), options);
507 JavaErrorCheck
508 LcConfigSetOptions(hdl, options_e);
509error:
510 return;
511}
512
514JNIEXPORT void JNICALL Java_javamsgque_lcconfig_LcConfigC_SetSettingDeleteFunc (JNIEnv *env, jobject self, jobject fSettingDeleteData) {
515 LC_CFG hdl = (LC_CFG)pObj2Hdl(env,self);
516 JavaErrorCheck
517 MkRtSetup_X(hdl);
518 LC_CBP fSettingDeleteData_ptr = MK(ProcCreate)(MK_RT_CALL env, fSettingDeleteData, NULL, NS(MID_fSettingDeleteData), true);
519 JavaErrorCheck
520 enum MkErrorE errVal = LcConfigSetSettingDeleteFunc(hdl, NS(LcSettingDeleteCall), fSettingDeleteData_ptr, NS(LcSettingDeleteFree));
521 MkErrorC_Check(hdl, errVal)
522error:
523 return;
524}
525
527JNIEXPORT void JNICALL Java_javamsgque_lcconfig_LcConfigC_SetTabWidth (JNIEnv *env, jobject self, jshort width) {
528 LC_CFG hdl = (LC_CFG)pObj2Hdl(env,self);
529 JavaErrorCheck
530 MkRtSetup_X(hdl);
531 LcConfigSetTabWidth(hdl, width);
532error:
533 return;
534}
535
537
541
542// doc-key: LcConfigC,LcConfigC-TOR,sCc
543
545JNIEXPORT jlong JNICALL Java_javamsgque_lcconfig_LcConfigC_CTOR (JNIEnv *env, jclass class) {
547 LC_CFG __retVal__L = LcConfigCreate(NULL, NULL);
548 if (__retVal__L == NULL) {
549 (*env)->ThrowNew(env, MK(Class_MkInitError), "LcConfigC.CTOR");
550 goto error;
551 }
552 jlong __retVal__S = (jlong)__retVal__L;
553 return __retVal__S;
554error:
555 return 0;
556}
557
559JNIEXPORT jobject JNICALL Java_javamsgque_lcconfig_LcConfigC_Create (JNIEnv *env, jclass class) {
561 LC_CFG __retVal__L = LcConfigCreate(NULL, NULL);
562 if (__retVal__L == NULL) {
563 (*env)->ThrowNew(env, MK(Class_MkInitError), "LcConfigC.Create");
564 goto error;
565 }
566 jobject __retVal__S = LC(LcConfigC_ObjCreate)(MK_RT_CALL env,__retVal__L);
567 return __retVal__S;
568error:
569 return 0;
570}
571
572
573// doc-key: LcConfigC,LcConfigC-TOR,sc_
574
576JNIEXPORT jobject JNICALL Java_javamsgque_lcconfig_LcConfigC_FromHandle (JNIEnv *env, jclass class, jlong exporthdl) {
578 LC_CFG __retVal__L = LcConfigFromHandle(exporthdl);
579 if (__retVal__L == NULL) {
580 (*env)->ThrowNew(env, MK(Class_MkInitError), "LcConfigC.FromHandle");
581 goto error;
582 }
583 jobject __retVal__S = LC(LcConfigC_ObjNew)(MK_RT_CALL env,__retVal__L);
584 return __retVal__S;
585error:
586 return 0;
587}
588
590// END-LcConfigC - created by 'jv_MqC.tcl -i NHI1_HOME/theConfig/liblcconfig/.liblcconfig.meta' - DO NOT change
591
592// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
593
594void NS(LcConfigC_Init)(MK_RT_ARGS_ONLY) {
595 LcConfigC_TT->selfCreate = NS(LcConfigC_selfCreate) ;
596 LcConfigC_TT->selfDelete = NS(LcConfigC_selfDelete) ;
597 LcConfigC_TT->selfUnlink = MK(MkObjectC_atomSelfUnlink) ;
598}
599
JNIEXPORT void JNICALL Java_javamsgque_lcconfig_LcConfigC_SetIncludeFunc__Ljava_lang_Class_2Ljava_lang_String_2(JNIEnv *env, jobject self, jclass searchClass, jstring fConfigIncludeDataString)
Java: cfg.SetIncludeFunc(LcConfigIncludeCB fConfigIncludeData) → C-API
enum MkErrorE LcConfigIncludeCall(LcConfigIncludeCallF_ARGS)
void LcConfigIncludeFree(LcConfigIncludeFreeF_ARGS)
MK_PTRB * LC_CBP
MkThreadLocal MK_TYP LcConfigC_TT
instance-type as specific-instance-type …
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) …
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_javamsgque_lcconfig_LcConfigC_ErrorType(JNIEnv *env, jobject self)
Java: LcErrorTypeE config.ErrorType() → C-API This function, which is implemented as a macro,...
MK_SRT LcConfigGetTabWidth(LC_CFGN config)
These functions, which are implemented as macros, get and set the tab width for the configuration con...
MK_STRN LcConfigGetIncludeDir(LC_CFGN config)
ConfigSetIncludeDir specifies the include directory, include_dir, relative to which the files specifi...
enum LcConfigOptionsEF LcConfigGetOptions(LC_CFGN config)
These functions get and set the options for the configuration config …
MK_SRT LcConfigGetFloatPrecision(LC_CFGN config)
Since v1.6 These functions get and set the number of decimal digits to output after the radix charact...
MK_BOOL LcConfigGetOption(LC_CFGN config, enum LcConfigOptionsEF option)
Since v1.7 These functions get and set the given option of the configuration config …
enum LcConfigFormatE LcConfigGetDefaultFormat(LC_CFGN config)
These functions, which are implemented as macros, get and set the default external format for setting...
JNIEXPORT jobject JNICALL Java_javamsgque_lcconfig_LcConfigC_GetOptions(JNIEnv *env, jobject self)
Java: LcConfigOptionsEF config.GetOptions() → C-API These functions get and set the options for t...
JNIEXPORT jstring JNICALL Java_javamsgque_lcconfig_LcConfigC_GetIncludeDir(JNIEnv *env, jobject self)
Java: String config.GetIncludeDir() → C-API ConfigSetIncludeDir specifies the include directory,...
JNIEXPORT jboolean JNICALL Java_javamsgque_lcconfig_LcConfigC_GetOption(JNIEnv *env, jobject self, jobject option)
Java: boolean config.GetOption(LcConfigOptionsEF option) → C-API Since v1.7 These functions get a...
JNIEXPORT jshort JNICALL Java_javamsgque_lcconfig_LcConfigC_GetFloatPrecision(JNIEnv *env, jobject self)
Java: short config.GetFloatPrecision() → C-API Since v1.6 These functions get and set the number ...
JNIEXPORT jobject JNICALL Java_javamsgque_lcconfig_LcConfigC_GetDefaultFormat(JNIEnv *env, jobject self)
Java: LcConfigFormatE config.GetDefaultFormat() → C-API These functions, which are implemented as...
JNIEXPORT jshort JNICALL Java_javamsgque_lcconfig_LcConfigC_GetTabWidth(JNIEnv *env, jobject self)
Java: short config.GetTabWidth() → C-API These functions, which are implemented as macros,...
LC_CFG LcConfigPrev(LC_CFG const cfg)
get previous instance from linked-list of LcConfigS type
LC_CFG LcConfigNext(LC_CFG const cfg)
get next instance from linked-list of LcConfigS type
LC_CFG LcConfigInstances(void)
get head-instance from linked-list of LcConfigS type …
JNIEXPORT jobject JNICALL Java_javamsgque_lcconfig_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_javamsgque_lcconfig_LcConfigC_Instances(JNIEnv *env, jclass class)
Java: [static] LcConfigC LcConfigC.Instances() → C-API get head-instance from linked-list of LcCo...
JNIEXPORT jobject JNICALL Java_javamsgque_lcconfig_LcConfigC_Prev(JNIEnv *env, jobject self)
Java: LcConfigC cfg.Prev() → C-API get previous instance from linked-list of LcConfigS type
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...
enum MkErrorE LcConfigLookupInt64(LC_CFGN config, MK_STRN path, MK_WID *value_out)
These functions look up the value of the setting in the configuration config specified by the path pa...
enum MkErrorE LcConfigLookupInt(LC_CFGN config, MK_STRN path, MK_INT *value_out)
These functions look up the value of the setting in the configuration config specified by the path pa...
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...
LC_CFS LcConfigLookup(LC_CFGN config, MK_STRN path)
This function locates the setting in the configuration config specified by the path path …
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...
JNIEXPORT jstring JNICALL Java_javamsgque_lcconfig_LcConfigC_LookupString(JNIEnv *env, jobject self, jstring path)
Java: String config.LookupString(String path) → C-API These functions look up the value of the se...
JNIEXPORT jdouble JNICALL Java_javamsgque_lcconfig_LcConfigC_LookupFloat(JNIEnv *env, jobject self, jstring path)
Java: double config.LookupFloat(String path) → C-API These functions look up the value of the set...
JNIEXPORT jboolean JNICALL Java_javamsgque_lcconfig_LcConfigC_LookupBool(JNIEnv *env, jobject self, jstring path)
Java: boolean config.LookupBool(String path) → C-API These functions look up the value of the set...
JNIEXPORT jobject JNICALL Java_javamsgque_lcconfig_LcConfigC_Lookup(JNIEnv *env, jobject self, jstring path)
Java: LcSettingC config.Lookup(String path) → C-API This function locates the setting in the conf...
JNIEXPORT jint JNICALL Java_javamsgque_lcconfig_LcConfigC_LookupInt(JNIEnv *env, jobject self, jstring path)
Java: int config.LookupInt(String path) → C-API These functions look up the value of the setting ...
JNIEXPORT jlong JNICALL Java_javamsgque_lcconfig_LcConfigC_LookupInt64(JNIEnv *env, jobject self, jstring path)
Java: long config.LookupInt64(String path) → C-API These functions look up the value of the setti...
enum MkErrorE LcConfigWriteFile(LC_CFG config, MK_STRN filename)
This function writes the configuration config to the file named filename …
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...
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...
LC_CFS LcConfigRootSetting(LC_CFGN config)
This function, which is implemented as a macro, returns the root setting for the configuration config...
void LcConfigClear(LC_CFG config)
Since v1.7 This function clears the configuration config …
JNIEXPORT jobject JNICALL Java_javamsgque_lcconfig_LcConfigC_RootSetting(JNIEnv *env, jobject self)
Java: LcSettingC config.RootSetting() → C-API This function, which is implemented as a macro,...
JNIEXPORT void JNICALL Java_javamsgque_lcconfig_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_javamsgque_lcconfig_LcConfigC_WriteFile(JNIEnv *env, jobject self, jstring filename)
Java: config.WriteFile(String filename) → C-API This function writes the configuration config to ...
JNIEXPORT void JNICALL Java_javamsgque_lcconfig_LcConfigC_ReadString(JNIEnv *env, jobject self, jstring str)
Java: config.ReadString(String str) → C-API This function reads and parses a configuration from t...
JNIEXPORT void JNICALL Java_javamsgque_lcconfig_LcConfigC_ReadFile(JNIEnv *env, jobject self, jstring filename)
Java: config.ReadFile(String filename) → C-API This function reads and parses a configuration fro...
JNIEXPORT jstring JNICALL Java_javamsgque_lcconfig_LcConfigC_WriteString(JNIEnv *env, jobject self)
Java: String cfg.WriteString() → C-API read the entire configuration cfg into the string val_out ...
JNIEXPORT void JNICALL Java_javamsgque_lcconfig_LcConfigC_Clear(JNIEnv *env, jobject self)
Java: config.Clear() → C-API Since v1.7 This function clears the configuration config …
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 …
void LcConfigSetIncludeDir(LC_CFG config, MK_STRN include_dir)
ConfigSetIncludeDir specifies the include directory, include_dir, relative to which the files specifi...
void LcConfigSetOptions(LC_CFG config, enum LcConfigOptionsEF options)
These functions get and set the options for the configuration config …
void LcConfigSetTabWidth(LC_CFG config, MK_SRT width)
These functions, which are implemented as macros, get and set the tab width for the configuration con...
void LcConfigSetDefaultFormat(LC_CFG config, enum LcConfigFormatE format)
These functions, which are implemented as macros, get and set the default external format for setting...
void LcConfigSetFloatPrecision(LC_CFG config, MK_SRT digits)
Since v1.6 These functions get and set the number of decimal digits to output after the radix charact...
JNIEXPORT void JNICALL Java_javamsgque_lcconfig_LcConfigC_SetDefaultFormat(JNIEnv *env, jobject self, jobject format)
Java: config.SetDefaultFormat(LcConfigFormatE format) → C-API These functions,...
JNIEXPORT void JNICALL Java_javamsgque_lcconfig_LcConfigC_SetIncludeDir(JNIEnv *env, jobject self, jstring include_dir)
Java: config.SetIncludeDir(String include_dir) → C-API ConfigSetIncludeDir specifies the include ...
JNIEXPORT void JNICALL Java_javamsgque_lcconfig_LcConfigC_SetSettingDeleteFunc(JNIEnv *env, jobject self, jobject fSettingDeleteData)
Java: cfg.SetSettingDeleteFunc(LcSettingDeleteCB fSettingDeleteData) → C-API callback called on d...
JNIEXPORT void JNICALL Java_javamsgque_lcconfig_LcConfigC_SetTabWidth(JNIEnv *env, jobject self, jshort width)
Java: config.SetTabWidth(short width) → C-API These functions, which are implemented as macros,...
JNIEXPORT void JNICALL Java_javamsgque_lcconfig_LcConfigC_SetIncludeFunc(JNIEnv *env, jobject self, jobject fConfigIncludeData)
Java: cfg.SetIncludeFunc(LcConfigIncludeCB fConfigIncludeData) → C-API
JNIEXPORT void JNICALL Java_javamsgque_lcconfig_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_javamsgque_lcconfig_LcConfigC_SetOptions(JNIEnv *env, jobject self, jobject options)
Java: config.SetOptions(LcConfigOptionsEF options) → C-API These functions get and set the option...
JNIEXPORT void JNICALL Java_javamsgque_lcconfig_LcConfigC_SetFloatPrecision(JNIEnv *env, jobject self, jshort digits)
Java: config.SetFloatPrecision(short digits) → C-API Since v1.6 These functions get and set the n...
LC_CFG LcConfigFromHandle(MK_LONG const exporthdl)
return a LcConfigC from exporthdl…
LC_CFG LcConfigC_ObjNew(config_t *hdl)
return Programming-Language-Micro-Kernel instance from hdl …
LC_CFG LcConfigCreate(MK_TYP type, config_t *nat)
create a LcConfigC instance …
JNIEXPORT jlong JNICALL Java_javamsgque_lcconfig_LcConfigC_CTOR(JNIEnv *env, jclass class)
Java: [constructor] LcConfigC.Create() → C-API create a LcConfigC instance …
JNIEXPORT jobject JNICALL Java_javamsgque_lcconfig_LcConfigC_FromHandle(JNIEnv *env, jclass class, jlong exporthdl)
Java: [static] LcConfigC LcConfigC.FromHandle(long exporthdl) → C-API return a LcConfigC from exp...
JNIEXPORT jobject JNICALL Java_javamsgque_lcconfig_LcConfigC_Create(JNIEnv *env, jclass class)
Java: [constructor] LcConfigC.Create() → C-API create a LcConfigC instance …
LcConfigFormatE
set the format of a LcSettingC …
LcConfigOptionsEF
configuration options for config-file-layout
LcErrorTypeE
LC_CFS LcSettingC_ObjNew(config_setting_t *hdl)
return Programming-Language-Micro-Kernel instance from hdl …
MkErrorE
MK_PTRB * MK_PTR
const MK_STRB * MK_STRN
bool MK_BOOL
int64_t MK_WID
signed short MK_SRT
double MK_DBL
signed int MK_INT
MK_INT MkRuntimeGetDebug(void)
#define MK_RT_CALL_NULL
#define MkRtSetup_XN(x)
#define MK_RT_CALL
#define MkRtSetup_X(x)
#define MK_RT_ARGS
#define MkRtSetup_NULL
#define MK_RT_ARGS_ONLY
Class to represent a the entire configuration of the of the libconfig library …
Class to represent a configuration-setting of the of the libconfig library …
MkSelfUnlinkF selfUnlink
MkSelfDeleteF selfDelete
MkSelfCreateF selfCreate