theConfig 10.0
Loading...
Searching...
No Matches
LibLcConfig_rb.c
Go to the documentation of this file.
1
9/* LABEL-NO */
10
12#include "misc_check_rb.h"
13
14/* LABEL-END */
15
16#include <ruby/defines.h>
17
18#define LcSetupTmpl()
19#define LcCleanupTmpl()
20
21// MARK_D ################################################################
22// -----------------------------------------------------------------------
23// documentation order
63// --------------------------------------------------------------------------------
64
65VALUE LC(LcConfig);
66
67// BEGIN-enumD - created by 'rb_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
68
72VALUE LC(LcErrorE);
74
75// END-enumD - created by 'rb_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
76
82
83// BEGIN-DOC - created by 'rb_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
84
85// doc-key: LcConfig,EnumFunc,sco,func
86#define ConfigFormatE_FromInt_doc "LcConfigFormatE LcConfig.ConfigFormatE_FromInt(value:int32)"
87#define ConfigOptionsEF_FromInt_doc "LcConfigOptionsEF LcConfig.ConfigOptionsEF_FromInt(value:int32)"
88#define ConfigTypeE_FromInt_doc "LcConfigTypeE LcConfig.ConfigTypeE_FromInt(value:int32)"
89#define ErrorE_FromInt_doc "LcErrorE LcConfig.ErrorE_FromInt(value:int32)"
90#define ErrorTypeE_FromInt_doc "LcErrorTypeE LcConfig.ErrorTypeE_FromInt(value:int32)"
91
92// doc-key: LcConfig,EnumFunc,sm_,func
93#define ConfigFormatE_ToInt_doc "int32 LcConfig.ConfigFormatE_ToInt(value:LcConfigFormatE)"
94#define ConfigFormatE_ToString_doc "string LcConfig.ConfigFormatE_ToString(value:LcConfigFormatE)"
95#define ConfigOptionsEF_ToInt_doc "int32 LcConfig.ConfigOptionsEF_ToInt(value:LcConfigOptionsEF)"
96#define ConfigOptionsEF_ToString_doc "string LcConfig.ConfigOptionsEF_ToString(value:LcConfigOptionsEF)"
97#define ConfigTypeE_ToInt_doc "int32 LcConfig.ConfigTypeE_ToInt(value:LcConfigTypeE)"
98#define ConfigTypeE_ToString_doc "string LcConfig.ConfigTypeE_ToString(value:LcConfigTypeE)"
99#define ErrorE_ToInt_doc "int32 LcConfig.ErrorE_ToInt(value:LcErrorE)"
100#define ErrorE_ToString_doc "string LcConfig.ErrorE_ToString(value:LcErrorE)"
101#define ErrorTypeE_ToInt_doc "int32 LcConfig.ErrorTypeE_ToInt(value:LcErrorTypeE)"
102#define ErrorTypeE_ToString_doc "string LcConfig.ErrorTypeE_ToString(value:LcErrorTypeE)"
103
104// doc-key: LcConfig,Setup,sm_,func
105#define Cleanup_doc "LcConfig.Cleanup()"
106#define Setup_doc "LcConfig.Setup()"
107
108// END-DOC - created by 'rb_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
109
110#define OT_SETUP_hdl_static MK_RT_UNUSED MkRtSetup_NULL; \
111 __attribute__((unused)) MK_ERR hdl = &MkERROR;
112
113/*****************************************************************************/
114/* */
115/* private */
116/* */
117/*****************************************************************************/
118
119// BEGIN-LcConfig - created by 'rb_MqC.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
120
124
125// doc-key: LcConfig,LcConfig-Enum,sco
126
128static OT_ProcRet NS(LcConfig_ConfigFormatE_FromInt) (OtClass_ARGS) {
131 MK_I32 value = 0;
134 enum LcConfigFormatE value_out;
136 OT_retObj_SET(OT_NEW_Lc_enum_OBJ(ConfigFormatE,value_out));
137 end: MK_UNUSED /* LONG JUMP on error */
139}
140
142static OT_ProcRet NS(LcConfig_ConfigOptionsEF_FromInt) (OtClass_ARGS) {
145 MK_I32 value = 0;
148 enum LcConfigOptionsEF value_out;
150 OT_retObj_SET(OT_NEW_Lc_enum_OBJ(ConfigOptionsEF,value_out));
151 end: MK_UNUSED /* LONG JUMP on error */
153}
154
156static OT_ProcRet NS(LcConfig_ConfigTypeE_FromInt) (OtClass_ARGS) {
159 MK_I32 value = 0;
162 enum LcConfigTypeE value_out;
164 OT_retObj_SET(OT_NEW_Lc_enum_OBJ(ConfigTypeE,value_out));
165 end: MK_UNUSED /* LONG JUMP on error */
167}
168
170static OT_ProcRet NS(LcConfig_ErrorE_FromInt) (OtClass_ARGS) {
173 MK_I32 value = 0;
176 enum LcErrorE value_out;
178 OT_retObj_SET(OT_NEW_Lc_enum_OBJ(ErrorE,value_out));
179 end: MK_UNUSED /* LONG JUMP on error */
181}
182
184static OT_ProcRet NS(LcConfig_ErrorTypeE_FromInt) (OtClass_ARGS) {
187 MK_I32 value = 0;
190 enum LcErrorTypeE value_out;
192 OT_retObj_SET(OT_NEW_Lc_enum_OBJ(ErrorTypeE,value_out));
193 end: MK_UNUSED /* LONG JUMP on error */
195}
196
197// doc-key: LcConfig,LcConfig-Enum,sm_
198
200static OT_ProcRet NS(LcConfig_ConfigFormatE_ToInt) (OtClass_ARGS) {
203 enum LcConfigFormatE value = 0;
207 end: MK_UNUSED /* LONG JUMP on error */
209}
210
212static OT_ProcRet NS(LcConfig_ConfigFormatE_ToString) (OtClass_ARGS) {
215 enum LcConfigFormatE value = 0;
219 end: MK_UNUSED /* LONG JUMP on error */
221}
222
224static OT_ProcRet NS(LcConfig_ConfigOptionsEF_ToInt) (OtClass_ARGS) {
227 enum LcConfigOptionsEF value = 0;
231 end: MK_UNUSED /* LONG JUMP on error */
233}
234
236static OT_ProcRet NS(LcConfig_ConfigOptionsEF_ToString) (OtClass_ARGS) {
239 enum LcConfigOptionsEF value = 0;
243 end: MK_UNUSED /* LONG JUMP on error */
245}
246
248static OT_ProcRet NS(LcConfig_ConfigTypeE_ToInt) (OtClass_ARGS) {
251 enum LcConfigTypeE value = 0;
255 end: MK_UNUSED /* LONG JUMP on error */
257}
258
260static OT_ProcRet NS(LcConfig_ConfigTypeE_ToString) (OtClass_ARGS) {
263 enum LcConfigTypeE value = 0;
267 end: MK_UNUSED /* LONG JUMP on error */
269}
270
272static OT_ProcRet NS(LcConfig_ErrorE_ToInt) (OtClass_ARGS) {
275 enum LcErrorE value = 0;
279 end: MK_UNUSED /* LONG JUMP on error */
281}
282
284static OT_ProcRet NS(LcConfig_ErrorE_ToString) (OtClass_ARGS) {
287 enum LcErrorE value = 0;
291 end: MK_UNUSED /* LONG JUMP on error */
293}
294
296static OT_ProcRet NS(LcConfig_ErrorTypeE_ToInt) (OtClass_ARGS) {
299 enum LcErrorTypeE value = 0;
303 end: MK_UNUSED /* LONG JUMP on error */
305}
306
308static OT_ProcRet NS(LcConfig_ErrorTypeE_ToString) (OtClass_ARGS) {
311 enum LcErrorTypeE value = 0;
315 end: MK_UNUSED /* LONG JUMP on error */
317}
318
320// LcConfig_Enum_RB_API
321
325
326// doc-key: LcConfig,LcConfig-Setup,sm_
327
329static OT_ProcRet NS(LcConfig_Cleanup) (OtClass_ARGS) {
333 LcCleanupTmpl ();
335 end: MK_UNUSED /* LONG JUMP on error */
337}
338
340static OT_ProcRet NS(LcConfig_Setup) (OtClass_ARGS) {
344 LcSetupTmpl ();
346 end: MK_UNUSED /* LONG JUMP on error */
348}
349
351// LcConfig_Setup_RB_API
352
353// END-LcConfig - created by 'rb_MqC.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
354
355// **************************************************************************
356
357/*****************************************************************************/
358/* */
359/* public */
360/* */
361/*****************************************************************************/
362
363void LC(LcConfig_Init) (MK_RT_ARGS_ONLY) {
364 LC(LcConfig) = rb_define_module("LcConfig");
365
366// BEGIN-CLASS - created by 'rb_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
367
368// doc-key: LcConfig,EnumFunc,sco
369OT_METH_O ( LcConfig, ConfigFormatE_FromInt, LcConfig_ConfigFormatE_FromInt )
370OT_METH_S ( LcConfig, ConfigFormatE_FromInt, LcConfig_ConfigFormatE_FromInt )
371OT_METH_O ( LcConfig, ConfigOptionsEF_FromInt, LcConfig_ConfigOptionsEF_FromInt )
372OT_METH_S ( LcConfig, ConfigOptionsEF_FromInt, LcConfig_ConfigOptionsEF_FromInt )
373OT_METH_O ( LcConfig, ConfigTypeE_FromInt, LcConfig_ConfigTypeE_FromInt )
374OT_METH_S ( LcConfig, ConfigTypeE_FromInt, LcConfig_ConfigTypeE_FromInt )
375OT_METH_O ( LcConfig, ErrorE_FromInt, LcConfig_ErrorE_FromInt )
376OT_METH_S ( LcConfig, ErrorE_FromInt, LcConfig_ErrorE_FromInt )
377OT_METH_O ( LcConfig, ErrorTypeE_FromInt, LcConfig_ErrorTypeE_FromInt )
378OT_METH_S ( LcConfig, ErrorTypeE_FromInt, LcConfig_ErrorTypeE_FromInt )
379
380// doc-key: LcConfig,EnumFunc,sm_
381OT_METH_O ( LcConfig, ConfigFormatE_ToInt, LcConfig_ConfigFormatE_ToInt )
382OT_METH_S ( LcConfig, ConfigFormatE_ToInt, LcConfig_ConfigFormatE_ToInt )
383OT_METH_O ( LcConfig, ConfigFormatE_ToString, LcConfig_ConfigFormatE_ToString )
384OT_METH_S ( LcConfig, ConfigFormatE_ToString, LcConfig_ConfigFormatE_ToString )
385OT_METH_O ( LcConfig, ConfigOptionsEF_ToInt, LcConfig_ConfigOptionsEF_ToInt )
386OT_METH_S ( LcConfig, ConfigOptionsEF_ToInt, LcConfig_ConfigOptionsEF_ToInt )
387OT_METH_O ( LcConfig, ConfigOptionsEF_ToString, LcConfig_ConfigOptionsEF_ToString )
388OT_METH_S ( LcConfig, ConfigOptionsEF_ToString, LcConfig_ConfigOptionsEF_ToString )
389OT_METH_O ( LcConfig, ConfigTypeE_ToInt, LcConfig_ConfigTypeE_ToInt )
390OT_METH_S ( LcConfig, ConfigTypeE_ToInt, LcConfig_ConfigTypeE_ToInt )
391OT_METH_O ( LcConfig, ConfigTypeE_ToString, LcConfig_ConfigTypeE_ToString )
392OT_METH_S ( LcConfig, ConfigTypeE_ToString, LcConfig_ConfigTypeE_ToString )
393OT_METH_O ( LcConfig, ErrorE_ToInt, LcConfig_ErrorE_ToInt )
394OT_METH_S ( LcConfig, ErrorE_ToInt, LcConfig_ErrorE_ToInt )
395OT_METH_O ( LcConfig, ErrorE_ToString, LcConfig_ErrorE_ToString )
396OT_METH_S ( LcConfig, ErrorE_ToString, LcConfig_ErrorE_ToString )
397OT_METH_O ( LcConfig, ErrorTypeE_ToInt, LcConfig_ErrorTypeE_ToInt )
398OT_METH_S ( LcConfig, ErrorTypeE_ToInt, LcConfig_ErrorTypeE_ToInt )
399OT_METH_O ( LcConfig, ErrorTypeE_ToString, LcConfig_ErrorTypeE_ToString )
400OT_METH_S ( LcConfig, ErrorTypeE_ToString, LcConfig_ErrorTypeE_ToString )
401
402// doc-key: LcConfig,Setup,sm_
403OT_METH_O ( LcConfig, Cleanup, LcConfig_Cleanup )
404OT_METH_S ( LcConfig, Cleanup, LcConfig_Cleanup )
405OT_METH_O ( LcConfig, Setup, LcConfig_Setup )
406OT_METH_S ( LcConfig, Setup, LcConfig_Setup )
407
408// END-CLASS - created by 'rb_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
409
410// BEGIN-OBJ - created by 'rb_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
411
412// → no data
413
414// END-OBJ - created by 'rb_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
415
416}
417
418/*****************************************************************************/
419/* */
420/* init */
421/* */
422/*****************************************************************************/
423
424
426
427 // Register system
428#ifdef HAVE_FORK
429// MkInitSysAPI(MK(fork),NULL);
430#endif
431
432 // Initialize liblcconfig
433 MkSetup();
435
436 // load "rbmkkernel" shared library
437 rb_require("rbmkkernel");
438
439 // Initialize components
440 LC(LcConfig_Init) (MK_RT_CALL_ONLY) ;
441 LC(LcConfigC_Init) (MK_RT_CALL_ONLY) ;
442 LC(LcSettingC_Init) (MK_RT_CALL_ONLY) ;
443
444 // update LAL
445 // ...
446
447 /*****************************************************************************/
448 /* */
449 /* enums */
450 /* */
451 /*****************************************************************************/
452
453 // BEGIN-enumF - created by 'rb_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
454
455 LC(LcConfigFormatE) = rb_define_class_under(LC(LcConfig), "LcConfigFormatE", MK(cEnum));
456 rb_funcall(LC(LcConfigFormatE), MK(id_enum_attr), 2, STRN2VAL("DEFAULT"), INT2NUM(0));
457 rb_funcall(LC(LcConfigFormatE), MK(id_enum_attr), 2, STRN2VAL("HEX"), INT2NUM(1));
458
459 LC(LcConfigOptionsEF) = rb_define_class_under(LC(LcConfig), "LcConfigOptionsEF", MK(cEnum));
460 rb_funcall(LC(LcConfigOptionsEF), MK(id_enum_attr), 2, STRN2VAL("NONE"), INT2NUM(0x0));
461 rb_funcall(LC(LcConfigOptionsEF), MK(id_enum_attr), 2, STRN2VAL("AUTOCONVERT"), INT2NUM(0x01));
462 rb_funcall(LC(LcConfigOptionsEF), MK(id_enum_attr), 2, STRN2VAL("SEMICOLON_SEPARATORS"), INT2NUM(0x02));
463 rb_funcall(LC(LcConfigOptionsEF), MK(id_enum_attr), 2, STRN2VAL("COLON_ASSIGNMENT_FOR_GROUPS"), INT2NUM(0x04));
464 rb_funcall(LC(LcConfigOptionsEF), MK(id_enum_attr), 2, STRN2VAL("COLON_ASSIGNMENT_FOR_NON_GROUPS"), INT2NUM(0x08));
465 rb_funcall(LC(LcConfigOptionsEF), MK(id_enum_attr), 2, STRN2VAL("OPEN_BRACE_ON_SEPARATE_LINE"), INT2NUM(0x10));
466 rb_funcall(LC(LcConfigOptionsEF), MK(id_enum_attr), 2, STRN2VAL("ALLOW_SCIENTIFIC_NOTATION"), INT2NUM(0x20));
467 rb_funcall(LC(LcConfigOptionsEF), MK(id_enum_attr), 2, STRN2VAL("FSYNC"), INT2NUM(0x40));
468 rb_funcall(LC(LcConfigOptionsEF), MK(id_enum_attr), 2, STRN2VAL("ALLOW_OVERRIDES"), INT2NUM(0x80));
469
470 LC(LcConfigTypeE) = rb_define_class_under(LC(LcConfig), "LcConfigTypeE", MK(cEnum));
471 rb_funcall(LC(LcConfigTypeE), MK(id_enum_attr), 2, STRN2VAL("NONE"), INT2NUM(0));
472 rb_funcall(LC(LcConfigTypeE), MK(id_enum_attr), 2, STRN2VAL("GROUP"), INT2NUM(1));
473 rb_funcall(LC(LcConfigTypeE), MK(id_enum_attr), 2, STRN2VAL("INT"), INT2NUM(2));
474 rb_funcall(LC(LcConfigTypeE), MK(id_enum_attr), 2, STRN2VAL("INT64"), INT2NUM(3));
475 rb_funcall(LC(LcConfigTypeE), MK(id_enum_attr), 2, STRN2VAL("FLOAT"), INT2NUM(4));
476 rb_funcall(LC(LcConfigTypeE), MK(id_enum_attr), 2, STRN2VAL("STRING"), INT2NUM(5));
477 rb_funcall(LC(LcConfigTypeE), MK(id_enum_attr), 2, STRN2VAL("BOOL"), INT2NUM(6));
478 rb_funcall(LC(LcConfigTypeE), MK(id_enum_attr), 2, STRN2VAL("ARRAY"), INT2NUM(7));
479 rb_funcall(LC(LcConfigTypeE), MK(id_enum_attr), 2, STRN2VAL("LIST"), INT2NUM(8));
480
481 LC(LcErrorE) = rb_define_class_under(LC(LcConfig), "LcErrorE", MK(cEnum));
482 rb_funcall(LC(LcErrorE), MK(id_enum_attr), 2, STRN2VAL("FALSE"), INT2NUM(0));
483 rb_funcall(LC(LcErrorE), MK(id_enum_attr), 2, STRN2VAL("TRUE"), INT2NUM(1));
484
485 LC(LcErrorTypeE) = rb_define_class_under(LC(LcConfig), "LcErrorTypeE", MK(cEnum));
486 rb_funcall(LC(LcErrorTypeE), MK(id_enum_attr), 2, STRN2VAL("NONE"), INT2NUM(0));
487 rb_funcall(LC(LcErrorTypeE), MK(id_enum_attr), 2, STRN2VAL("FILE_IO"), INT2NUM(1));
488 rb_funcall(LC(LcErrorTypeE), MK(id_enum_attr), 2, STRN2VAL("PARSE"), INT2NUM(2));
489
490 // END-enumF - created by 'rb_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
491
492}
tag: nhi1-release-250425
#define ConfigOptionsEF_FromInt_doc
#define ConfigFormatE_ToInt_doc
#define ConfigFormatE_ToString_doc
#define ConfigOptionsEF_ToString_doc
#define ErrorTypeE_FromInt_doc
#define ConfigOptionsEF_ToInt_doc
#define ErrorE_ToString_doc
#define ConfigFormatE_FromInt_doc
#define OT_SETUP_hdl_static
#define ErrorE_FromInt_doc
#define ErrorE_ToInt_doc
#define ConfigTypeE_FromInt_doc
#define ErrorTypeE_ToInt_doc
#define LcSetupTmpl()
#define LcCleanupTmpl()
#define Cleanup_doc
MK_RB_EXTERN void LibLcConfig()
#define Setup_doc
#define ConfigTypeE_ToInt_doc
#define ErrorTypeE_ToString_doc
#define ConfigTypeE_ToString_doc
#define OT_NEW_Lc_enum_OBJ(typ, i)
#define NS(n)
#define LC(n)
#define MK(n)
#define OT_SETUP_NOARG(d)
#define OT_SETUP_ONEARG(d)
#define OT_CHECK_NI4(val)
#define OT_METH_S(c, s, f)
#define OT_CHECK_REQUIRED(val)
#define OT_retObj_SET_None
#define OT_retObj_SET_I32(nat)
#define OT_METH_O(c, s, f)
#define OT_retObj_RETURN
#define OT_retObj_SET_STR(nat)
#define MK_RB_EXTERN
static library
#define OT_retObj_SET(val)
#define OT_CHECK_NOARGS
#define MkErrorC_Check(mng, PROC)
#define OT_ProcRet
#define OtClass_ARGS
#define STRN2VAL(nat)
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 …
#define MK_ERROR_FORMAT
#define MK_UNUSED
void MkSetup(void)
signed int MK_I32
#define MK_RT_CALL_ONLY
#define MkRtSetup_NULL
#define MK_RT_ARGS_ONLY
#define OT_CHECK_ENUM(ename, val)