theConfig 10.0
Loading...
Searching...
No Matches
LibLcConfig_tcl.c
Go to the documentation of this file.
1
9/* LABEL-NO */
10
11#define META_FILE_NAME "LibLcConfig_tcl.c"
12#define VER TCL_OO_METHOD_VERSION_CURRENT
13
15
16#undef OtClass_ARGS
17#define OtClass_ARGS OBJCMD_ARGS
18
19#define OT_SETUP_hdl_static \
20 int __skip=1;\
21 /* printAry2("cmd",objc,objv); */ \
22 __attribute__((unused)) MK_RT mkrt = MkRT; \
23 __attribute__((unused)) MK_ERR hdl = &MkERROR;
24
25/* LABEL-END */
26
27//#include <limits.h>
28//#include <float.h>
29
30#define LcSetupTmpl()
31#define LcCleanupTmpl()
32
33// MARK_D ################################################################
34// -----------------------------------------------------------------------
35// documentation order
75// --------------------------------------------------------------------------------
76
77// BEGIN-DOC - created by 'tcl_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
78
79// doc-key: LcConfig,EnumFunc,sco,func
80#define ConfigFormatE_FromInt_doc "LcConfigFormatE [LcConfig ConfigFormatE_FromInt value:int32]"
81#define ConfigOptionsEF_FromInt_doc "LcConfigOptionsEF [LcConfig ConfigOptionsEF_FromInt value:int32]"
82#define ConfigTypeE_FromInt_doc "LcConfigTypeE [LcConfig ConfigTypeE_FromInt value:int32]"
83#define ErrorE_FromInt_doc "LcErrorE [LcConfig ErrorE_FromInt value:int32]"
84#define ErrorTypeE_FromInt_doc "LcErrorTypeE [LcConfig ErrorTypeE_FromInt value:int32]"
85
86// doc-key: LcConfig,EnumFunc,sm_,func
87#define ConfigFormatE_ToInt_doc "int32 [LcConfig ConfigFormatE_ToInt value:LcConfigFormatE]"
88#define ConfigFormatE_ToString_doc "string [LcConfig ConfigFormatE_ToString value:LcConfigFormatE]"
89#define ConfigOptionsEF_ToInt_doc "int32 [LcConfig ConfigOptionsEF_ToInt value:LcConfigOptionsEF]"
90#define ConfigOptionsEF_ToString_doc "string [LcConfig ConfigOptionsEF_ToString value:LcConfigOptionsEF]"
91#define ConfigTypeE_ToInt_doc "int32 [LcConfig ConfigTypeE_ToInt value:LcConfigTypeE]"
92#define ConfigTypeE_ToString_doc "string [LcConfig ConfigTypeE_ToString value:LcConfigTypeE]"
93#define ErrorE_ToInt_doc "int32 [LcConfig ErrorE_ToInt value:LcErrorE]"
94#define ErrorE_ToString_doc "string [LcConfig ErrorE_ToString value:LcErrorE]"
95#define ErrorTypeE_ToInt_doc "int32 [LcConfig ErrorTypeE_ToInt value:LcErrorTypeE]"
96#define ErrorTypeE_ToString_doc "string [LcConfig ErrorTypeE_ToString value:LcErrorTypeE]"
97
98// doc-key: LcConfig,Setup,sm_,func
99#define Cleanup_doc "LcConfig Cleanup"
100#define Setup_doc "LcConfig Setup"
101
102// END-DOC - created by 'tcl_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
103
104
105/*****************************************************************************/
106/* */
107/* helper */
108/* */
109/*****************************************************************************/
110
111// BEGIN-Enum-ToString - created by 'tcl_MqC.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
112
117
119{
120 switch (type) {
121 case CONFIG_FORMAT_DEFAULT : return ot_fixstrobj("DEFAULT") ;
122 case CONFIG_FORMAT_HEX : return ot_fixstrobj("HEX" ) ;
123 }
124 return ot_fixstrobj("NOTHING");
125}
126
128{
129 if (type == CONFIG_OPTION_NONE) {
130 return ot_fixstrobj("NONE");
131 } else {
132 OT_OBJ_T tmpO = Tcl_NewObj();
133 if (mk_bit_compare(type,CONFIG_OPTION_AUTOCONVERT )) ot_enum_append(tmpO,"AUTOCONVERT" ) ;
134 if (mk_bit_compare(type,CONFIG_OPTION_SEMICOLON_SEPARATORS )) ot_enum_append(tmpO,"SEMICOLON_SEPARATORS" ) ;
135 if (mk_bit_compare(type,CONFIG_OPTION_COLON_ASSIGNMENT_FOR_GROUPS )) ot_enum_append(tmpO,"COLON_ASSIGNMENT_FOR_GROUPS" ) ;
136 if (mk_bit_compare(type,CONFIG_OPTION_COLON_ASSIGNMENT_FOR_NON_GROUPS)) ot_enum_append(tmpO,"COLON_ASSIGNMENT_FOR_NON_GROUPS") ;
137 if (mk_bit_compare(type,CONFIG_OPTION_OPEN_BRACE_ON_SEPARATE_LINE )) ot_enum_append(tmpO,"OPEN_BRACE_ON_SEPARATE_LINE" ) ;
138 if (mk_bit_compare(type,CONFIG_OPTION_ALLOW_SCIENTIFIC_NOTATION )) ot_enum_append(tmpO,"ALLOW_SCIENTIFIC_NOTATION" ) ;
139 if (mk_bit_compare(type,CONFIG_OPTION_FSYNC )) ot_enum_append(tmpO,"FSYNC" ) ;
140 if (mk_bit_compare(type,CONFIG_OPTION_ALLOW_OVERRIDES )) ot_enum_append(tmpO,"ALLOW_OVERRIDES" ) ;
141 return tmpO;
142 }
143}
144
146{
147 switch (type) {
148 case CONFIG_TYPE_NONE : return ot_fixstrobj("NONE" ) ;
149 case CONFIG_TYPE_GROUP : return ot_fixstrobj("GROUP" ) ;
150 case CONFIG_TYPE_INT : return ot_fixstrobj("INT" ) ;
151 case CONFIG_TYPE_INT64 : return ot_fixstrobj("INT64" ) ;
152 case CONFIG_TYPE_FLOAT : return ot_fixstrobj("FLOAT" ) ;
153 case CONFIG_TYPE_STRING : return ot_fixstrobj("STRING") ;
154 case CONFIG_TYPE_BOOL : return ot_fixstrobj("BOOL" ) ;
155 case CONFIG_TYPE_ARRAY : return ot_fixstrobj("ARRAY" ) ;
156 case CONFIG_TYPE_LIST : return ot_fixstrobj("LIST" ) ;
157 }
158 return ot_fixstrobj("NOTHING");
159}
160
162{
163 switch (type) {
164 case CONFIG_FALSE : return ot_fixstrobj("FALSE") ;
165 case CONFIG_TRUE : return ot_fixstrobj("TRUE" ) ;
166 }
167 return ot_fixstrobj("NOTHING");
168}
169
171{
172 switch (type) {
173 case CONFIG_ERRROR_NONE : return ot_fixstrobj("NONE" ) ;
174 case CONFIG_ERRROR_FILE_IO : return ot_fixstrobj("FILE_IO") ;
175 case CONFIG_ERRROR_PARSE : return ot_fixstrobj("PARSE" ) ;
176 }
177 return ot_fixstrobj("NOTHING");
178}
181
182// END-Enum-ToString - created by 'tcl_MqC.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
183
184// BEGIN-enum - created by 'tcl_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
185
190
191int LC(Get_LcConfigFormatE_FromObj) (MK_RT_ARGS OT_ENV_T interp, OT_OBJ_T enumE, enum LcConfigFormatE *ret) {
192 const static struct LookupEnumE keys[] = {
193 { "HEX" , CONFIG_FORMAT_HEX },
194 { "DEFAULT" , CONFIG_FORMAT_DEFAULT },
195 { "FORMAT_HEX" , CONFIG_FORMAT_HEX },
196 { "FORMAT_DEFAULT" , CONFIG_FORMAT_DEFAULT },
197 { "CONFIG_FORMAT_HEX" , CONFIG_FORMAT_HEX },
198 { "CONFIG_FORMAT_DEFAULT" , CONFIG_FORMAT_DEFAULT },
199 { NULL , 0 },
200 };
201
202 int index;
203 OtErrorCheckLng (Tcl_GetIndexFromObjStruct (interp, enumE, &keys,
204 sizeof(struct LookupClassS), "enum", TCL_EXACT, &index));
205 *ret = keys[index].val;
206 return TCL_OK;
207}
208
209int LC(Get_LcConfigOptionsEF_FromObj) (MK_RT_ARGS OT_ENV_T interp, OT_OBJ_T enumE, enum LcConfigOptionsEF *ret) {
210 const static struct LookupEnumE keys[] = {
211 { "NONE" , CONFIG_OPTION_NONE },
212 { "FSYNC" , CONFIG_OPTION_FSYNC },
213 { "OPTION_NONE" , CONFIG_OPTION_NONE },
214 { "AUTOCONVERT" , CONFIG_OPTION_AUTOCONVERT },
215 { "OPTION_FSYNC" , CONFIG_OPTION_FSYNC },
216 { "ALLOW_OVERRIDES" , CONFIG_OPTION_ALLOW_OVERRIDES },
217 { "OPTION_AUTOCONVERT" , CONFIG_OPTION_AUTOCONVERT },
218 { "CONFIG_OPTION_NONE" , CONFIG_OPTION_NONE },
219 { "CONFIG_OPTION_FSYNC" , CONFIG_OPTION_FSYNC },
220 { "SEMICOLON_SEPARATORS" , CONFIG_OPTION_SEMICOLON_SEPARATORS },
221 { "OPTION_ALLOW_OVERRIDES" , CONFIG_OPTION_ALLOW_OVERRIDES },
222 { "CONFIG_OPTION_AUTOCONVERT" , CONFIG_OPTION_AUTOCONVERT },
223 { "ALLOW_SCIENTIFIC_NOTATION" , CONFIG_OPTION_ALLOW_SCIENTIFIC_NOTATION },
224 { "OPEN_BRACE_ON_SEPARATE_LINE" , CONFIG_OPTION_OPEN_BRACE_ON_SEPARATE_LINE },
225 { "COLON_ASSIGNMENT_FOR_GROUPS" , CONFIG_OPTION_COLON_ASSIGNMENT_FOR_GROUPS },
226 { "OPTION_SEMICOLON_SEPARATORS" , CONFIG_OPTION_SEMICOLON_SEPARATORS },
227 { "CONFIG_OPTION_ALLOW_OVERRIDES" , CONFIG_OPTION_ALLOW_OVERRIDES },
228 { "COLON_ASSIGNMENT_FOR_NON_GROUPS" , CONFIG_OPTION_COLON_ASSIGNMENT_FOR_NON_GROUPS },
229 { "OPTION_ALLOW_SCIENTIFIC_NOTATION" , CONFIG_OPTION_ALLOW_SCIENTIFIC_NOTATION },
230 { "OPTION_OPEN_BRACE_ON_SEPARATE_LINE" , CONFIG_OPTION_OPEN_BRACE_ON_SEPARATE_LINE },
231 { "OPTION_COLON_ASSIGNMENT_FOR_GROUPS" , CONFIG_OPTION_COLON_ASSIGNMENT_FOR_GROUPS },
232 { "CONFIG_OPTION_SEMICOLON_SEPARATORS" , CONFIG_OPTION_SEMICOLON_SEPARATORS },
233 { "OPTION_COLON_ASSIGNMENT_FOR_NON_GROUPS" , CONFIG_OPTION_COLON_ASSIGNMENT_FOR_NON_GROUPS },
234 { "CONFIG_OPTION_ALLOW_SCIENTIFIC_NOTATION" , CONFIG_OPTION_ALLOW_SCIENTIFIC_NOTATION },
235 { "CONFIG_OPTION_OPEN_BRACE_ON_SEPARATE_LINE" , CONFIG_OPTION_OPEN_BRACE_ON_SEPARATE_LINE },
236 { "CONFIG_OPTION_COLON_ASSIGNMENT_FOR_GROUPS" , CONFIG_OPTION_COLON_ASSIGNMENT_FOR_GROUPS },
237 { "CONFIG_OPTION_COLON_ASSIGNMENT_FOR_NON_GROUPS" , CONFIG_OPTION_COLON_ASSIGNMENT_FOR_NON_GROUPS },
238 { NULL , 0 },
239 };
240
241 int index;
242 OtErrorCheckLng(MK(EnumFlagWorker)(MK_RT_CALL interp,keys,enumE,&index));
243 *ret = (enum LcConfigOptionsEF) index;
244 return TCL_OK;
245}
246
247int LC(Get_LcConfigTypeE_FromObj) (MK_RT_ARGS OT_ENV_T interp, OT_OBJ_T enumE, enum LcConfigTypeE *ret) {
248 const static struct LookupEnumE keys[] = {
249 { "INT" , CONFIG_TYPE_INT },
250 { "NONE" , CONFIG_TYPE_NONE },
251 { "BOOL" , CONFIG_TYPE_BOOL },
252 { "LIST" , CONFIG_TYPE_LIST },
253 { "GROUP" , CONFIG_TYPE_GROUP },
254 { "INT64" , CONFIG_TYPE_INT64 },
255 { "ARRAY" , CONFIG_TYPE_ARRAY },
256 { "FLOAT" , CONFIG_TYPE_FLOAT },
257 { "STRING" , CONFIG_TYPE_STRING },
258 { "TYPE_INT" , CONFIG_TYPE_INT },
259 { "TYPE_NONE" , CONFIG_TYPE_NONE },
260 { "TYPE_BOOL" , CONFIG_TYPE_BOOL },
261 { "TYPE_LIST" , CONFIG_TYPE_LIST },
262 { "TYPE_ARRAY" , CONFIG_TYPE_ARRAY },
263 { "TYPE_FLOAT" , CONFIG_TYPE_FLOAT },
264 { "TYPE_GROUP" , CONFIG_TYPE_GROUP },
265 { "TYPE_INT64" , CONFIG_TYPE_INT64 },
266 { "TYPE_STRING" , CONFIG_TYPE_STRING },
267 { "CONFIG_TYPE_INT" , CONFIG_TYPE_INT },
268 { "CONFIG_TYPE_BOOL" , CONFIG_TYPE_BOOL },
269 { "CONFIG_TYPE_LIST" , CONFIG_TYPE_LIST },
270 { "CONFIG_TYPE_NONE" , CONFIG_TYPE_NONE },
271 { "CONFIG_TYPE_GROUP" , CONFIG_TYPE_GROUP },
272 { "CONFIG_TYPE_INT64" , CONFIG_TYPE_INT64 },
273 { "CONFIG_TYPE_ARRAY" , CONFIG_TYPE_ARRAY },
274 { "CONFIG_TYPE_FLOAT" , CONFIG_TYPE_FLOAT },
275 { "CONFIG_TYPE_STRING" , CONFIG_TYPE_STRING },
276 { NULL , 0 },
277 };
278
279 int index;
280 OtErrorCheckLng (Tcl_GetIndexFromObjStruct (interp, enumE, &keys,
281 sizeof(struct LookupClassS), "enum", TCL_EXACT, &index));
282 *ret = keys[index].val;
283 return TCL_OK;
284}
285
286int LC(Get_LcErrorE_FromObj) (MK_RT_ARGS OT_ENV_T interp, OT_OBJ_T enumE, enum LcErrorE *ret) {
287 const static struct LookupEnumE keys[] = {
288 { "TRUE" , CONFIG_TRUE },
289 { "FALSE" , CONFIG_FALSE },
290 { "CONFIG_TRUE" , CONFIG_TRUE },
291 { "CONFIG_FALSE" , CONFIG_FALSE },
292 { NULL , 0 },
293 };
294
295 int index;
296 OtErrorCheckLng (Tcl_GetIndexFromObjStruct (interp, enumE, &keys,
297 sizeof(struct LookupClassS), "enum", TCL_EXACT, &index));
298 *ret = keys[index].val;
299 return TCL_OK;
300}
301
302int LC(Get_LcErrorTypeE_FromObj) (MK_RT_ARGS OT_ENV_T interp, OT_OBJ_T enumE, enum LcErrorTypeE *ret) {
303 const static struct LookupEnumE keys[] = {
304 { "NONE" , CONFIG_ERRROR_NONE },
305 { "PARSE" , CONFIG_ERRROR_PARSE },
306 { "FILE_IO" , CONFIG_ERRROR_FILE_IO },
307 { "ERRROR_NONE" , CONFIG_ERRROR_NONE },
308 { "ERRROR_PARSE" , CONFIG_ERRROR_PARSE },
309 { "ERRROR_FILE_IO" , CONFIG_ERRROR_FILE_IO },
310 { "CONFIG_ERRROR_NONE" , CONFIG_ERRROR_NONE },
311 { "CONFIG_ERRROR_PARSE" , CONFIG_ERRROR_PARSE },
312 { "CONFIG_ERRROR_FILE_IO" , CONFIG_ERRROR_FILE_IO },
313 { NULL , 0 },
314 };
315
316 int index;
317 OtErrorCheckLng (Tcl_GetIndexFromObjStruct (interp, enumE, &keys,
318 sizeof(struct LookupClassS), "enum", TCL_EXACT, &index));
319 *ret = keys[index].val;
320 return TCL_OK;
321}
324
325// END-enum - created by 'tcl_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
326
327/*****************************************************************************/
328/* */
329/* Check */
330/* */
331/*****************************************************************************/
332
334
335/*****************************************************************************/
336/* */
337/* enum */
338/* */
339/*****************************************************************************/
340
401/*****************************************************************************/
402/* */
403/* subcommands */
404/* */
405/*****************************************************************************/
406
407// BEGIN-LcConfig - created by 'tcl_MqC.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
408
412
413// doc-key: LcConfig,LcConfig-Enum,sco
414
416static OT_ProcRet NS(LcConfig_ConfigFormatE_FromInt) (OtClass_ARGS) {
419 MK_I32 value = 0;
422 enum LcConfigFormatE value_out;
424 OT_retObj_SET(OT_NEW_Lc_enum_OBJ(ConfigFormatE,value_out));
425 goto end;
426 error:
428 end:
430}
431
433static OT_ProcRet NS(LcConfig_ConfigOptionsEF_FromInt) (OtClass_ARGS) {
436 MK_I32 value = 0;
439 enum LcConfigOptionsEF value_out;
441 OT_retObj_SET(OT_NEW_Lc_enum_OBJ(ConfigOptionsEF,value_out));
442 goto end;
443 error:
445 end:
447}
448
450static OT_ProcRet NS(LcConfig_ConfigTypeE_FromInt) (OtClass_ARGS) {
453 MK_I32 value = 0;
456 enum LcConfigTypeE value_out;
458 OT_retObj_SET(OT_NEW_Lc_enum_OBJ(ConfigTypeE,value_out));
459 goto end;
460 error:
462 end:
464}
465
467static OT_ProcRet NS(LcConfig_ErrorE_FromInt) (OtClass_ARGS) {
470 MK_I32 value = 0;
473 enum LcErrorE value_out;
475 OT_retObj_SET(OT_NEW_Lc_enum_OBJ(ErrorE,value_out));
476 goto end;
477 error:
479 end:
481}
482
484static OT_ProcRet NS(LcConfig_ErrorTypeE_FromInt) (OtClass_ARGS) {
487 MK_I32 value = 0;
490 enum LcErrorTypeE value_out;
492 OT_retObj_SET(OT_NEW_Lc_enum_OBJ(ErrorTypeE,value_out));
493 goto end;
494 error:
496 end:
498}
499
500// doc-key: LcConfig,LcConfig-Enum,sm_
501
503static OT_ProcRet NS(LcConfig_ConfigFormatE_ToInt) (OtClass_ARGS) {
506 enum LcConfigFormatE value = 0;
510 goto end;
511 error:
513 end:
515}
516
518static OT_ProcRet NS(LcConfig_ConfigFormatE_ToString) (OtClass_ARGS) {
521 enum LcConfigFormatE value = 0;
525 goto end;
526 error:
528 end:
530}
531
533static OT_ProcRet NS(LcConfig_ConfigOptionsEF_ToInt) (OtClass_ARGS) {
536 enum LcConfigOptionsEF value = 0;
540 goto end;
541 error:
543 end:
545}
546
548static OT_ProcRet NS(LcConfig_ConfigOptionsEF_ToString) (OtClass_ARGS) {
551 enum LcConfigOptionsEF value = 0;
555 goto end;
556 error:
558 end:
560}
561
563static OT_ProcRet NS(LcConfig_ConfigTypeE_ToInt) (OtClass_ARGS) {
566 enum LcConfigTypeE value = 0;
570 goto end;
571 error:
573 end:
575}
576
578static OT_ProcRet NS(LcConfig_ConfigTypeE_ToString) (OtClass_ARGS) {
581 enum LcConfigTypeE value = 0;
585 goto end;
586 error:
588 end:
590}
591
593static OT_ProcRet NS(LcConfig_ErrorE_ToInt) (OtClass_ARGS) {
596 enum LcErrorE value = 0;
600 goto end;
601 error:
603 end:
605}
606
608static OT_ProcRet NS(LcConfig_ErrorE_ToString) (OtClass_ARGS) {
611 enum LcErrorE value = 0;
615 goto end;
616 error:
618 end:
620}
621
623static OT_ProcRet NS(LcConfig_ErrorTypeE_ToInt) (OtClass_ARGS) {
626 enum LcErrorTypeE value = 0;
630 goto end;
631 error:
633 end:
635}
636
638static OT_ProcRet NS(LcConfig_ErrorTypeE_ToString) (OtClass_ARGS) {
641 enum LcErrorTypeE value = 0;
645 goto end;
646 error:
648 end:
650}
651
653// LcConfig_Enum_TCL_API
654
658
659// doc-key: LcConfig,LcConfig-Setup,sm_
660
662static OT_ProcRet NS(LcConfig_Cleanup) (OtClass_ARGS) {
666 LcCleanupTmpl ();
668 goto end;
669 error:
671 end:
673}
674
676static OT_ProcRet NS(LcConfig_Setup) (OtClass_ARGS) {
680 LcSetupTmpl ();
682 goto end;
683 error:
685 end:
687}
688
690// LcConfig_Setup_TCL_API
691
692// END-LcConfig - created by 'tcl_MqC.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
693
694
695// ---------------------------------------------------------------------------------------
696
697__attribute__((unused)) const static OtObjProcDefS NS(sOtClassDef)[] = {
698// BEGIN-CLASS - created by 'tcl_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
699
700// doc-key: LcConfig,EnumFunc,sco
701 {VER, "ConfigFormatE_FromInt", NS(LcConfig_ConfigFormatE_FromInt) , NULL, NULL},
702 {VER, "ConfigOptionsEF_FromInt", NS(LcConfig_ConfigOptionsEF_FromInt) , NULL, NULL},
703 {VER, "ConfigTypeE_FromInt" , NS(LcConfig_ConfigTypeE_FromInt) , NULL, NULL},
704 {VER, "ErrorE_FromInt" , NS(LcConfig_ErrorE_FromInt) , NULL, NULL},
705 {VER, "ErrorTypeE_FromInt" , NS(LcConfig_ErrorTypeE_FromInt) , NULL, NULL},
706
707// doc-key: LcConfig,EnumFunc,sm_
708 {VER, "ConfigFormatE_ToInt" , NS(LcConfig_ConfigFormatE_ToInt) , NULL, NULL},
709 {VER, "ConfigFormatE_ToString", NS(LcConfig_ConfigFormatE_ToString) , NULL, NULL},
710 {VER, "ConfigOptionsEF_ToInt", NS(LcConfig_ConfigOptionsEF_ToInt) , NULL, NULL},
711 {VER, "ConfigOptionsEF_ToString", NS(LcConfig_ConfigOptionsEF_ToString) , NULL, NULL},
712 {VER, "ConfigTypeE_ToInt" , NS(LcConfig_ConfigTypeE_ToInt) , NULL, NULL},
713 {VER, "ConfigTypeE_ToString", NS(LcConfig_ConfigTypeE_ToString) , NULL, NULL},
714 {VER, "ErrorE_ToInt" , NS(LcConfig_ErrorE_ToInt) , NULL, NULL},
715 {VER, "ErrorE_ToString" , NS(LcConfig_ErrorE_ToString) , NULL, NULL},
716 {VER, "ErrorTypeE_ToInt" , NS(LcConfig_ErrorTypeE_ToInt) , NULL, NULL},
717 {VER, "ErrorTypeE_ToString" , NS(LcConfig_ErrorTypeE_ToString) , NULL, NULL},
718
719// doc-key: LcConfig,Setup,sm_
720 {VER, "Cleanup" , NS(LcConfig_Cleanup) , NULL, NULL},
721 {VER, "Setup" , NS(LcConfig_Setup) , NULL, NULL},
722
723// END-CLASS - created by 'tcl_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
724 {0, NULL, NULL, NULL, NULL}
725};
726
727// ---------------------------------------------------------------------------------------
728// not used.
729
730__attribute__((unused)) const static OtObjProcDefS NS(sInstanceDef)[] = {
731// BEGIN-OBJ - created by 'tcl_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
732
733// → no data
734
735// END-OBJ - created by 'tcl_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
736 {0, NULL, NULL, NULL, NULL}
737};
738
739// ---------------------------------------------------------------------------------------
740
751 Tcl_Interp * interp
752)
753{
754 // check for the right tcl version
755 if (Tcl_InitStubs (interp, "8.6", true) == NULL) {
756 return TCL_ERROR;
757 }
758 if (Tcl_OOInitStubs (interp) == NULL) {
759 return TCL_ERROR;
760 }
761
762 // setup liblcconfig
763 LcSetup();
765
766 // announce my package
767 OtErrorCheckLng (Tcl_PkgProvide (interp, "tcllcconfig", META_VERSION ));
768
769 // pkg_mkIndex hack → only "Tcl_PkgProvide" is required
770 if (Tcl_GetVar(interp,"::tcl::newPkgs", TCL_GLOBAL_ONLY) != NULL) return TCL_OK;
771
772 // dependency.
773 MK_STRN ver = Tcl_PkgRequire(interp, "tclmkkernel", META_VERSION, 1);
774 check_NULL(ver) return TCL_ERROR;
775
776 // toplevel namespace
777 Tcl_Namespace *ns = Tcl_CreateNamespace (interp, "tcllcconfig", NULL, NULL);
778 check_NULL(ns) return TCL_ERROR;
779
780 // add PACKAGE commands
781 OtErrorCheckLng( MK(FillNamespace) (interp,ns,LC(sOtClassDef),NULL));
782
783 // BEGIN-CLASS-call-init - created by 'tcl_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
784
785 OtErrorCheckLng( NS(pLcConfigC_Init) (MK_RT_CALL interp, ns)) ;
786 OtErrorCheckLng( NS(pLcSettingC_Init) (MK_RT_CALL interp, ns)) ;
787
788 // END-CLASS-call-init - created by 'tcl_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
789
790 // export namespace
791 OtErrorCheckLng( Tcl_Export(interp, ns, "Lc*C", false ) ) ;
792
793 return TCL_OK;
794}
795
798 Tcl_Interp * interp,
799 int flags
800)
801{
802 LcCleanup();
803
804 return TCL_OK;
805}
tag: nhi1-release-250425
#define ConfigOptionsEF_FromInt_doc
#define ConfigFormatE_ToInt_doc
#define ConfigFormatE_ToString_doc
#define ConfigOptionsEF_ToString_doc
OT_TCL_EXTERN int Tcllcconfig_Init(Tcl_Interp *interp)
initialize the LcConfig package
#define ErrorTypeE_FromInt_doc
#define ConfigOptionsEF_ToInt_doc
#define ErrorE_ToString_doc
#define VER
#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()
OT_TCL_EXTERN int Tcllcconfig_Unload(Tcl_Interp *interp, int flags)
#define LcCleanupTmpl()
#define Cleanup_doc
#define Setup_doc
#define ConfigTypeE_ToInt_doc
#define ErrorTypeE_ToString_doc
#define OtClass_ARGS
#define ConfigTypeE_ToString_doc
#define NS(n)
#define LC(n)
#define OT_NEW_Lc_enum_OBJ(typ, val)
#define check_NULL(code)
#define MK(n)
#define OT_SETUP_NOARG(d)
#define OT_SETUP_ONEARG(d)
#define OT_CHECK_NI4(val)
#define OT_retObj_SET_Error
#define ot_enum_append(_o, _s)
#define OT_CHECK_REQUIRED(val)
#define OT_retObj_SET_None
#define OT_retObj_SET_I32(nat)
#define OT_CHECK_ENUM(ename, val)
#define ot_fixstrobj(_s)
#define OT_retObj_RETURN
#define OT_retObj_SET_STR(nat)
#define OT_TCL_EXTERN
#define OT_retObj_SET(val)
#define OT_CHECK_NOARGS
#define OtErrorCheckLng(cmd)
#define MkErrorC_Check(mng, PROC)
#define OT_ProcRet
Tcl_Interp * OT_ENV_T
Tcl_Obj * OT_OBJ_T
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 …
@ CONFIG_OPTION_NONE
Definition LcEnum_lc.h:135
@ CONFIG_ERRROR_FILE_IO
Definition LcEnum_lc.h:230
@ CONFIG_ERRROR_PARSE
Definition LcEnum_lc.h:231
@ CONFIG_ERRROR_NONE
Definition LcEnum_lc.h:229
void LcSetup(void)
setup tcllcconfig internal memory …
void LcCleanup(void)
cleanup tcllcconfig internal memory …
#define MK_ERROR_FORMAT
#define mk_bit_compare(t, f)
const MK_STRB * MK_STRN
signed int MK_I32
#define MK_RT_CALL
#define MK_RT_ARGS
#define MkRtSetup_NULL
#define CONFIG_TYPE_STRING
#define CONFIG_TYPE_LIST
#define CONFIG_TYPE_INT
#define CONFIG_TYPE_ARRAY
#define CONFIG_TRUE
#define CONFIG_FORMAT_DEFAULT
#define CONFIG_OPTION_SEMICOLON_SEPARATORS
#define CONFIG_OPTION_FSYNC
#define CONFIG_OPTION_AUTOCONVERT
#define CONFIG_TYPE_GROUP
#define CONFIG_TYPE_BOOL
#define CONFIG_FALSE
#define CONFIG_FORMAT_HEX
#define CONFIG_OPTION_ALLOW_SCIENTIFIC_NOTATION
#define CONFIG_TYPE_INT64
#define CONFIG_TYPE_NONE
#define CONFIG_OPTION_COLON_ASSIGNMENT_FOR_NON_GROUPS
#define CONFIG_OPTION_OPEN_BRACE_ON_SEPARATE_LINE
#define CONFIG_OPTION_ALLOW_OVERRIDES
#define CONFIG_TYPE_FLOAT
#define CONFIG_OPTION_COLON_ASSIGNMENT_FOR_GROUPS
tag: nhi1-release-250425