theConfig 10.0
Loading...
Searching...
No Matches
LibLcConfig_atl.c
Go to the documentation of this file.
1
9/* LABEL-NO */
10
11#define META_FILE_NAME "LibLcConfig_atl.c"
12
14
15#undef OtClass_ARGS
16#define OtClass_ARGS OBJCMD_ARGS
17
18#define OT_SETUP_hdl_static \
19 int __skip=1;\
20 /* printAry2("cmd",objc,objv); */ \
21 MK_UNUSED OT_LC_RT_T alcrt = clientData; \
22 MK_UNUSED OT_MK_RT_T amkrt = alcrt->amkrt; \
23 MK_UNUSED MK_RT mkrt = alcrt->mkrt; \
24 MK_UNUSED MK_ERR hdl = &MkERROR;
25
26/* LABEL-END */
27
28//#include <limits.h>
29//#include <float.h>
30
31#define LcSetupTmpl()
32#define LcCleanupTmpl()
33
34// MARK_D ################################################################
35// -----------------------------------------------------------------------
36// documentation order
76// --------------------------------------------------------------------------------
77
78// BEGIN-DOC - created by 'atl_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
79
80// doc-key: LcConfig,EnumFunc,sco,func
81#define ConfigFormatE_FromInt_doc "LcConfigFormatE [LcConfig::ConfigFormatE_FromInt value:int32]"
82#define ConfigOptionsEF_FromInt_doc "LcConfigOptionsEF [LcConfig::ConfigOptionsEF_FromInt value:int32]"
83#define ConfigTypeE_FromInt_doc "LcConfigTypeE [LcConfig::ConfigTypeE_FromInt value:int32]"
84#define ErrorE_FromInt_doc "LcErrorE [LcConfig::ErrorE_FromInt value:int32]"
85#define ErrorTypeE_FromInt_doc "LcErrorTypeE [LcConfig::ErrorTypeE_FromInt value:int32]"
86
87// doc-key: LcConfig,EnumFunc,sm_,func
88#define ConfigFormatE_ToInt_doc "int32 [LcConfig::ConfigFormatE_ToInt value:LcConfigFormatE]"
89#define ConfigFormatE_ToString_doc "string [LcConfig::ConfigFormatE_ToString value:LcConfigFormatE]"
90#define ConfigOptionsEF_ToInt_doc "int32 [LcConfig::ConfigOptionsEF_ToInt value:LcConfigOptionsEF]"
91#define ConfigOptionsEF_ToString_doc "string [LcConfig::ConfigOptionsEF_ToString value:LcConfigOptionsEF]"
92#define ConfigTypeE_ToInt_doc "int32 [LcConfig::ConfigTypeE_ToInt value:LcConfigTypeE]"
93#define ConfigTypeE_ToString_doc "string [LcConfig::ConfigTypeE_ToString value:LcConfigTypeE]"
94#define ErrorE_ToInt_doc "int32 [LcConfig::ErrorE_ToInt value:LcErrorE]"
95#define ErrorE_ToString_doc "string [LcConfig::ErrorE_ToString value:LcErrorE]"
96#define ErrorTypeE_ToInt_doc "int32 [LcConfig::ErrorTypeE_ToInt value:LcErrorTypeE]"
97#define ErrorTypeE_ToString_doc "string [LcConfig::ErrorTypeE_ToString value:LcErrorTypeE]"
98
99// doc-key: LcConfig,Setup,sm_,func
100#define Cleanup_doc "LcConfig::Cleanup"
101#define Setup_doc "LcConfig::Setup"
102
103// END-DOC - created by 'atl_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
104
105
106/*****************************************************************************/
107/* */
108/* helper */
109/* */
110/*****************************************************************************/
111
112// BEGIN-Enum-ToString - created by 'atl_MqC.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
113
118
120{
121 switch (type) {
122 case CONFIG_FORMAT_DEFAULT : return ot_fixstrobj("DEFAULT") ;
123 case CONFIG_FORMAT_HEX : return ot_fixstrobj("HEX" ) ;
124 }
125 return ot_fixstrobj("NOTHING");
126}
127
129{
130 if (type == CONFIG_OPTION_NONE) {
131 return ot_fixstrobj("NONE");
132 } else {
133 OT_OBJ_T tmpO = Tcl_NewObj();
134 if (mk_bit_compare(type,CONFIG_OPTION_AUTOCONVERT )) ot_enum_append(tmpO,"AUTOCONVERT" ) ;
135 if (mk_bit_compare(type,CONFIG_OPTION_SEMICOLON_SEPARATORS )) ot_enum_append(tmpO,"SEMICOLON_SEPARATORS" ) ;
136 if (mk_bit_compare(type,CONFIG_OPTION_COLON_ASSIGNMENT_FOR_GROUPS )) ot_enum_append(tmpO,"COLON_ASSIGNMENT_FOR_GROUPS" ) ;
137 if (mk_bit_compare(type,CONFIG_OPTION_COLON_ASSIGNMENT_FOR_NON_GROUPS)) ot_enum_append(tmpO,"COLON_ASSIGNMENT_FOR_NON_GROUPS") ;
138 if (mk_bit_compare(type,CONFIG_OPTION_OPEN_BRACE_ON_SEPARATE_LINE )) ot_enum_append(tmpO,"OPEN_BRACE_ON_SEPARATE_LINE" ) ;
139 if (mk_bit_compare(type,CONFIG_OPTION_ALLOW_SCIENTIFIC_NOTATION )) ot_enum_append(tmpO,"ALLOW_SCIENTIFIC_NOTATION" ) ;
140 if (mk_bit_compare(type,CONFIG_OPTION_FSYNC )) ot_enum_append(tmpO,"FSYNC" ) ;
141 if (mk_bit_compare(type,CONFIG_OPTION_ALLOW_OVERRIDES )) ot_enum_append(tmpO,"ALLOW_OVERRIDES" ) ;
142 return tmpO;
143 }
144}
145
147{
148 switch (type) {
149 case CONFIG_TYPE_NONE : return ot_fixstrobj("NONE" ) ;
150 case CONFIG_TYPE_GROUP : return ot_fixstrobj("GROUP" ) ;
151 case CONFIG_TYPE_INT : return ot_fixstrobj("INT" ) ;
152 case CONFIG_TYPE_INT64 : return ot_fixstrobj("INT64" ) ;
153 case CONFIG_TYPE_FLOAT : return ot_fixstrobj("FLOAT" ) ;
154 case CONFIG_TYPE_STRING : return ot_fixstrobj("STRING") ;
155 case CONFIG_TYPE_BOOL : return ot_fixstrobj("BOOL" ) ;
156 case CONFIG_TYPE_ARRAY : return ot_fixstrobj("ARRAY" ) ;
157 case CONFIG_TYPE_LIST : return ot_fixstrobj("LIST" ) ;
158 }
159 return ot_fixstrobj("NOTHING");
160}
161
163{
164 switch (type) {
165 case CONFIG_FALSE : return ot_fixstrobj("FALSE") ;
166 case CONFIG_TRUE : return ot_fixstrobj("TRUE" ) ;
167 }
168 return ot_fixstrobj("NOTHING");
169}
170
172{
173 switch (type) {
174 case CONFIG_ERRROR_NONE : return ot_fixstrobj("NONE" ) ;
175 case CONFIG_ERRROR_FILE_IO : return ot_fixstrobj("FILE_IO") ;
176 case CONFIG_ERRROR_PARSE : return ot_fixstrobj("PARSE" ) ;
177 }
178 return ot_fixstrobj("NOTHING");
179}
182
183// END-Enum-ToString - created by 'atl_MqC.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
184
185// BEGIN-enum - created by 'atl_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
186
191
192int LC(Get_LcConfigFormatE_FromObj) (MK_RT_ARGS OT_ENV_T interp, OT_OBJ_T enumE, enum LcConfigFormatE *ret) {
193 const static struct LookupEnumE keys[] = {
194 { "HEX" , CONFIG_FORMAT_HEX },
195 { "DEFAULT" , CONFIG_FORMAT_DEFAULT },
196 { "FORMAT_HEX" , CONFIG_FORMAT_HEX },
197 { "FORMAT_DEFAULT" , CONFIG_FORMAT_DEFAULT },
198 { "CONFIG_FORMAT_HEX" , CONFIG_FORMAT_HEX },
199 { "CONFIG_FORMAT_DEFAULT" , CONFIG_FORMAT_DEFAULT },
200 { NULL , 0 },
201 };
202
203 int index;
204 check_LNG(Tcl_GetIndexFromObjStruct (interp, enumE, &keys,
205 sizeof(struct LookupClassS), "enum", TCL_EXACT, &index)) return TCL_ERROR;
206 *ret = keys[index].val;
207 return TCL_OK;
208}
209
210int LC(Get_LcConfigOptionsEF_FromObj) (MK_RT_ARGS OT_ENV_T interp, OT_OBJ_T enumE, enum LcConfigOptionsEF *ret) {
211 const static struct LookupEnumE keys[] = {
212 { "NONE" , CONFIG_OPTION_NONE },
213 { "FSYNC" , CONFIG_OPTION_FSYNC },
214 { "OPTION_NONE" , CONFIG_OPTION_NONE },
215 { "AUTOCONVERT" , CONFIG_OPTION_AUTOCONVERT },
216 { "OPTION_FSYNC" , CONFIG_OPTION_FSYNC },
217 { "ALLOW_OVERRIDES" , CONFIG_OPTION_ALLOW_OVERRIDES },
218 { "OPTION_AUTOCONVERT" , CONFIG_OPTION_AUTOCONVERT },
219 { "CONFIG_OPTION_NONE" , CONFIG_OPTION_NONE },
220 { "CONFIG_OPTION_FSYNC" , CONFIG_OPTION_FSYNC },
221 { "SEMICOLON_SEPARATORS" , CONFIG_OPTION_SEMICOLON_SEPARATORS },
222 { "OPTION_ALLOW_OVERRIDES" , CONFIG_OPTION_ALLOW_OVERRIDES },
223 { "CONFIG_OPTION_AUTOCONVERT" , CONFIG_OPTION_AUTOCONVERT },
224 { "ALLOW_SCIENTIFIC_NOTATION" , CONFIG_OPTION_ALLOW_SCIENTIFIC_NOTATION },
225 { "OPEN_BRACE_ON_SEPARATE_LINE" , CONFIG_OPTION_OPEN_BRACE_ON_SEPARATE_LINE },
226 { "COLON_ASSIGNMENT_FOR_GROUPS" , CONFIG_OPTION_COLON_ASSIGNMENT_FOR_GROUPS },
227 { "OPTION_SEMICOLON_SEPARATORS" , CONFIG_OPTION_SEMICOLON_SEPARATORS },
228 { "CONFIG_OPTION_ALLOW_OVERRIDES" , CONFIG_OPTION_ALLOW_OVERRIDES },
229 { "COLON_ASSIGNMENT_FOR_NON_GROUPS" , CONFIG_OPTION_COLON_ASSIGNMENT_FOR_NON_GROUPS },
230 { "OPTION_ALLOW_SCIENTIFIC_NOTATION" , CONFIG_OPTION_ALLOW_SCIENTIFIC_NOTATION },
231 { "OPTION_OPEN_BRACE_ON_SEPARATE_LINE" , CONFIG_OPTION_OPEN_BRACE_ON_SEPARATE_LINE },
232 { "OPTION_COLON_ASSIGNMENT_FOR_GROUPS" , CONFIG_OPTION_COLON_ASSIGNMENT_FOR_GROUPS },
233 { "CONFIG_OPTION_SEMICOLON_SEPARATORS" , CONFIG_OPTION_SEMICOLON_SEPARATORS },
234 { "OPTION_COLON_ASSIGNMENT_FOR_NON_GROUPS" , CONFIG_OPTION_COLON_ASSIGNMENT_FOR_NON_GROUPS },
235 { "CONFIG_OPTION_ALLOW_SCIENTIFIC_NOTATION" , CONFIG_OPTION_ALLOW_SCIENTIFIC_NOTATION },
236 { "CONFIG_OPTION_OPEN_BRACE_ON_SEPARATE_LINE" , CONFIG_OPTION_OPEN_BRACE_ON_SEPARATE_LINE },
237 { "CONFIG_OPTION_COLON_ASSIGNMENT_FOR_GROUPS" , CONFIG_OPTION_COLON_ASSIGNMENT_FOR_GROUPS },
238 { "CONFIG_OPTION_COLON_ASSIGNMENT_FOR_NON_GROUPS" , CONFIG_OPTION_COLON_ASSIGNMENT_FOR_NON_GROUPS },
239 { NULL , 0 },
240 };
241
242 int index;
243 check_LNG(MK(EnumFlagWorker)(MK_RT_CALL interp,keys,enumE,&index)) return TCL_ERROR;
244 *ret = (enum LcConfigOptionsEF) index;
245 return TCL_OK;
246}
247
248int LC(Get_LcConfigTypeE_FromObj) (MK_RT_ARGS OT_ENV_T interp, OT_OBJ_T enumE, enum LcConfigTypeE *ret) {
249 const static struct LookupEnumE keys[] = {
250 { "INT" , CONFIG_TYPE_INT },
251 { "NONE" , CONFIG_TYPE_NONE },
252 { "BOOL" , CONFIG_TYPE_BOOL },
253 { "LIST" , CONFIG_TYPE_LIST },
254 { "GROUP" , CONFIG_TYPE_GROUP },
255 { "INT64" , CONFIG_TYPE_INT64 },
256 { "ARRAY" , CONFIG_TYPE_ARRAY },
257 { "FLOAT" , CONFIG_TYPE_FLOAT },
258 { "STRING" , CONFIG_TYPE_STRING },
259 { "TYPE_INT" , CONFIG_TYPE_INT },
260 { "TYPE_NONE" , CONFIG_TYPE_NONE },
261 { "TYPE_BOOL" , CONFIG_TYPE_BOOL },
262 { "TYPE_LIST" , CONFIG_TYPE_LIST },
263 { "TYPE_ARRAY" , CONFIG_TYPE_ARRAY },
264 { "TYPE_FLOAT" , CONFIG_TYPE_FLOAT },
265 { "TYPE_GROUP" , CONFIG_TYPE_GROUP },
266 { "TYPE_INT64" , CONFIG_TYPE_INT64 },
267 { "TYPE_STRING" , CONFIG_TYPE_STRING },
268 { "CONFIG_TYPE_INT" , CONFIG_TYPE_INT },
269 { "CONFIG_TYPE_BOOL" , CONFIG_TYPE_BOOL },
270 { "CONFIG_TYPE_LIST" , CONFIG_TYPE_LIST },
271 { "CONFIG_TYPE_NONE" , CONFIG_TYPE_NONE },
272 { "CONFIG_TYPE_GROUP" , CONFIG_TYPE_GROUP },
273 { "CONFIG_TYPE_INT64" , CONFIG_TYPE_INT64 },
274 { "CONFIG_TYPE_ARRAY" , CONFIG_TYPE_ARRAY },
275 { "CONFIG_TYPE_FLOAT" , CONFIG_TYPE_FLOAT },
276 { "CONFIG_TYPE_STRING" , CONFIG_TYPE_STRING },
277 { NULL , 0 },
278 };
279
280 int index;
281 check_LNG(Tcl_GetIndexFromObjStruct (interp, enumE, &keys,
282 sizeof(struct LookupClassS), "enum", TCL_EXACT, &index)) return TCL_ERROR;
283 *ret = keys[index].val;
284 return TCL_OK;
285}
286
287int LC(Get_LcErrorE_FromObj) (MK_RT_ARGS OT_ENV_T interp, OT_OBJ_T enumE, enum LcErrorE *ret) {
288 const static struct LookupEnumE keys[] = {
289 { "TRUE" , CONFIG_TRUE },
290 { "FALSE" , CONFIG_FALSE },
291 { "CONFIG_TRUE" , CONFIG_TRUE },
292 { "CONFIG_FALSE" , CONFIG_FALSE },
293 { NULL , 0 },
294 };
295
296 int index;
297 check_LNG(Tcl_GetIndexFromObjStruct (interp, enumE, &keys,
298 sizeof(struct LookupClassS), "enum", TCL_EXACT, &index)) return TCL_ERROR;
299 *ret = keys[index].val;
300 return TCL_OK;
301}
302
303int LC(Get_LcErrorTypeE_FromObj) (MK_RT_ARGS OT_ENV_T interp, OT_OBJ_T enumE, enum LcErrorTypeE *ret) {
304 const static struct LookupEnumE keys[] = {
305 { "NONE" , CONFIG_ERRROR_NONE },
306 { "PARSE" , CONFIG_ERRROR_PARSE },
307 { "FILE_IO" , CONFIG_ERRROR_FILE_IO },
308 { "ERRROR_NONE" , CONFIG_ERRROR_NONE },
309 { "ERRROR_PARSE" , CONFIG_ERRROR_PARSE },
310 { "ERRROR_FILE_IO" , CONFIG_ERRROR_FILE_IO },
311 { "CONFIG_ERRROR_NONE" , CONFIG_ERRROR_NONE },
312 { "CONFIG_ERRROR_PARSE" , CONFIG_ERRROR_PARSE },
313 { "CONFIG_ERRROR_FILE_IO" , CONFIG_ERRROR_FILE_IO },
314 { NULL , 0 },
315 };
316
317 int index;
318 check_LNG(Tcl_GetIndexFromObjStruct (interp, enumE, &keys,
319 sizeof(struct LookupClassS), "enum", TCL_EXACT, &index)) return TCL_ERROR;
320 *ret = keys[index].val;
321 return TCL_OK;
322}
325
326// END-enum - created by 'atl_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
327
328/*****************************************************************************/
329/* */
330/* Check */
331/* */
332/*****************************************************************************/
333
335
336/*****************************************************************************/
337/* */
338/* enum */
339/* */
340/*****************************************************************************/
341
402/*****************************************************************************/
403/* */
404/* subcommands */
405/* */
406/*****************************************************************************/
407
408// BEGIN-LcConfig - created by 'atl_MqC.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
409
413
414// doc-key: LcConfig,LcConfig-Enum,sco
415
417static OT_ProcRet NS(LcConfig_ConfigFormatE_FromInt) (OtClass_ARGS) {
420 MK_I32 value = 0;
423 enum LcConfigFormatE value_out;
425 OT_retObj_SET(OT_NEW_Lc_enum_OBJ(ConfigFormatE,value_out));
426 goto end;
427 error:
429 end:
431}
432
434static OT_ProcRet NS(LcConfig_ConfigOptionsEF_FromInt) (OtClass_ARGS) {
437 MK_I32 value = 0;
440 enum LcConfigOptionsEF value_out;
442 OT_retObj_SET(OT_NEW_Lc_enum_OBJ(ConfigOptionsEF,value_out));
443 goto end;
444 error:
446 end:
448}
449
451static OT_ProcRet NS(LcConfig_ConfigTypeE_FromInt) (OtClass_ARGS) {
454 MK_I32 value = 0;
457 enum LcConfigTypeE value_out;
459 OT_retObj_SET(OT_NEW_Lc_enum_OBJ(ConfigTypeE,value_out));
460 goto end;
461 error:
463 end:
465}
466
468static OT_ProcRet NS(LcConfig_ErrorE_FromInt) (OtClass_ARGS) {
471 MK_I32 value = 0;
474 enum LcErrorE value_out;
476 OT_retObj_SET(OT_NEW_Lc_enum_OBJ(ErrorE,value_out));
477 goto end;
478 error:
480 end:
482}
483
485static OT_ProcRet NS(LcConfig_ErrorTypeE_FromInt) (OtClass_ARGS) {
488 MK_I32 value = 0;
491 enum LcErrorTypeE value_out;
493 OT_retObj_SET(OT_NEW_Lc_enum_OBJ(ErrorTypeE,value_out));
494 goto end;
495 error:
497 end:
499}
500
501// doc-key: LcConfig,LcConfig-Enum,sm_
502
504static OT_ProcRet NS(LcConfig_ConfigFormatE_ToInt) (OtClass_ARGS) {
507 enum LcConfigFormatE value = 0;
511 goto end;
512 error:
514 end:
516}
517
519static OT_ProcRet NS(LcConfig_ConfigFormatE_ToString) (OtClass_ARGS) {
522 enum LcConfigFormatE value = 0;
526 goto end;
527 error:
529 end:
531}
532
534static OT_ProcRet NS(LcConfig_ConfigOptionsEF_ToInt) (OtClass_ARGS) {
537 enum LcConfigOptionsEF value = 0;
541 goto end;
542 error:
544 end:
546}
547
549static OT_ProcRet NS(LcConfig_ConfigOptionsEF_ToString) (OtClass_ARGS) {
552 enum LcConfigOptionsEF value = 0;
556 goto end;
557 error:
559 end:
561}
562
564static OT_ProcRet NS(LcConfig_ConfigTypeE_ToInt) (OtClass_ARGS) {
567 enum LcConfigTypeE value = 0;
571 goto end;
572 error:
574 end:
576}
577
579static OT_ProcRet NS(LcConfig_ConfigTypeE_ToString) (OtClass_ARGS) {
582 enum LcConfigTypeE value = 0;
586 goto end;
587 error:
589 end:
591}
592
594static OT_ProcRet NS(LcConfig_ErrorE_ToInt) (OtClass_ARGS) {
597 enum LcErrorE value = 0;
601 goto end;
602 error:
604 end:
606}
607
609static OT_ProcRet NS(LcConfig_ErrorE_ToString) (OtClass_ARGS) {
612 enum LcErrorE value = 0;
616 goto end;
617 error:
619 end:
621}
622
624static OT_ProcRet NS(LcConfig_ErrorTypeE_ToInt) (OtClass_ARGS) {
627 enum LcErrorTypeE value = 0;
631 goto end;
632 error:
634 end:
636}
637
639static OT_ProcRet NS(LcConfig_ErrorTypeE_ToString) (OtClass_ARGS) {
642 enum LcErrorTypeE value = 0;
646 goto end;
647 error:
649 end:
651}
652
654// LcConfig_Enum_ATL_API
655
659
660// doc-key: LcConfig,LcConfig-Setup,sm_
661
663static OT_ProcRet NS(LcConfig_Cleanup) (OtClass_ARGS) {
667 LcCleanupTmpl ();
669 goto end;
670 error:
672 end:
674}
675
677static OT_ProcRet NS(LcConfig_Setup) (OtClass_ARGS) {
681 LcSetupTmpl ();
683 goto end;
684 error:
686 end:
688}
689
691// LcConfig_Setup_ATL_API
692
693// END-LcConfig - created by 'atl_MqC.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
694
695
696// ---------------------------------------------------------------------------------------
697
698__attribute__((unused)) const static OtObjProcDefS NS(sOtClassDef)[] = {
699 // BEGIN-CLASS - created by 'atl_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
700
701 // doc-key: LcConfig,EnumFunc,sco
702 { "::LcConfig::ConfigFormatE_FromInt" , NS(LcConfig_ConfigFormatE_FromInt) },
703 { "::LcConfig::ConfigOptionsEF_FromInt" , NS(LcConfig_ConfigOptionsEF_FromInt) },
704 { "::LcConfig::ConfigTypeE_FromInt" , NS(LcConfig_ConfigTypeE_FromInt) },
705 { "::LcConfig::ErrorE_FromInt" , NS(LcConfig_ErrorE_FromInt) },
706 { "::LcConfig::ErrorTypeE_FromInt" , NS(LcConfig_ErrorTypeE_FromInt) },
707
708 // doc-key: LcConfig,EnumFunc,sm_
709 { "::LcConfig::ConfigFormatE_ToInt" , NS(LcConfig_ConfigFormatE_ToInt) },
710 { "::LcConfig::ConfigFormatE_ToString" , NS(LcConfig_ConfigFormatE_ToString) },
711 { "::LcConfig::ConfigOptionsEF_ToInt" , NS(LcConfig_ConfigOptionsEF_ToInt) },
712 { "::LcConfig::ConfigOptionsEF_ToString" , NS(LcConfig_ConfigOptionsEF_ToString) },
713 { "::LcConfig::ConfigTypeE_ToInt" , NS(LcConfig_ConfigTypeE_ToInt) },
714 { "::LcConfig::ConfigTypeE_ToString" , NS(LcConfig_ConfigTypeE_ToString) },
715 { "::LcConfig::ErrorE_ToInt" , NS(LcConfig_ErrorE_ToInt) },
716 { "::LcConfig::ErrorE_ToString" , NS(LcConfig_ErrorE_ToString) },
717 { "::LcConfig::ErrorTypeE_ToInt" , NS(LcConfig_ErrorTypeE_ToInt) },
718 { "::LcConfig::ErrorTypeE_ToString" , NS(LcConfig_ErrorTypeE_ToString) },
719
720 // doc-key: LcConfig,Setup,sm_
721 { "::LcConfig::Cleanup" , NS(LcConfig_Cleanup) },
722 { "::LcConfig::Setup" , NS(LcConfig_Setup) },
723
724 // END-CLASS - created by 'atl_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
725 { NULL }
726};
727
728// ---------------------------------------------------------------------------------------
729// not used.
730
731__attribute__((unused)) const static OtObjProcDefS NS(sInstanceDef)[] = {
732 // BEGIN-OBJ - created by 'atl_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
733
734 // → no data
735
736 // END-OBJ - created by 'atl_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
737 { NULL }
738};
739
740// ---------------------------------------------------------------------------------------
741
742void NS(LcConfig_ns_delete)(ClientData clientData)
743{
744 OT_LC_RT_T alcrt = clientData;
745 assert(alcrt != NULL);
746 MkRtSetup_RT(alcrt->mkrt);
747
748#ifdef OT_DEBUG_NAMESPACE_DELETE
749 OT_DEBUG_NAMESPACE_DELETE(MK_COLOR_YELLOW,"::LcConfig with alcrt<%p>","LC",alcrt);
750#endif
751 OT_ENV_T interp = alcrt->interp;
752 //alcrt->status = OT_MK_RT_STATUS_ONEXIT;
753
754 // BEGIN-CLASS-delete-2 - created by 'atl_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
755
756 OT_NS_T ns;
757 ns = Tcl_FindNamespace(interp,"::LcSettingC",NULL,TCL_GLOBAL_ONLY);
758 if (ns) Tcl_DeleteNamespace(ns);
759 ns = Tcl_FindNamespace(interp,"::LcConfigC",NULL,TCL_GLOBAL_ONLY);
760 if (ns) Tcl_DeleteNamespace(ns);
761
762 // END-CLASS-delete-2 - created by 'atl_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
763
764 #define AtlRtFree(tok) if (alcrt->tok) { Tcl_DecrRefCount(alcrt->tok); alcrt->tok = NULL; }
765 #define regTclObj2(t,v) AtlRtFree(t)
766 #define regTclObj(t) AtlRtFree(t)
767 #define regTclCmd(t) AtlRtFree(t)
769 #undef regTclCmd
770 #undef regTclObj
771 #undef regTclObj2
772
773 // BEGIN-CLASS-delete - created by 'atl_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
774
775 if (alcrt->AtlLcSettingC) Tcl_DecrRefCount(alcrt->AtlLcSettingC) ;
776 if (alcrt->AtlLcSettingC_MK_NULL) Tcl_DecrRefCount(alcrt->AtlLcSettingC_MK_NULL) ;
777 if (alcrt->AtlLcConfigC) Tcl_DecrRefCount(alcrt->AtlLcConfigC) ;
778 if (alcrt->AtlLcConfigC_MK_NULL) Tcl_DecrRefCount(alcrt->AtlLcConfigC_MK_NULL) ;
779
780 // END-CLASS-delete - created by 'atl_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
781
782 alcrt->signature = 0x0;
783}
784
786
795Atllcconfig_Init (
796 Tcl_Interp * interp
797)
798{
799 // check for the right tcl version
800 if (Tcl_InitStubs (interp, "8.5", false) == NULL) {
801 return TCL_ERROR;
802 }
803
804 // setup liblcconfig
805 LcSetup();
807
808 // announce my package
809 check_LNG (Tcl_PkgProvideEx (interp, "atllcconfig", META_VERSION, &alcrtR ));
810
811 // pkg_mkIndex hack → only "Tcl_PkgProvide" is required
812 if (Tcl_GetVar(interp,"::tcl::newPkgs", TCL_GLOBAL_ONLY) != NULL) return TCL_OK;
813
814 // dependency.
815 OT_MK_RT_T amkrt = NULL;
816 MK_STRN ver = Tcl_PkgRequireEx(interp, "atlmkkernel", META_VERSION, 1, (ClientData*) &amkrt);
817 if (ver == NULL) return TCL_ERROR;
818
819 // create local runtime
820 OT_LC_RT_T alcrt = &alcrtR;
821 alcrt->signature = OT_LC_RT_SIG;
822 alcrt->interp = interp;
823 alcrt->mkrt = MK_RT_PTR;
824 alcrt->amkrt = amkrt;
825
826 if (alcrt->signature != OT_LC_RT_SIG) {
827 Tcl_SetErrorCode(interp, "ATLLC", "INIT", "SIGNATURE", "INVALID", NULL);
828 Tcl_SetResult(interp,"error: ATLLC setup failed with INVALID signature", TCL_STATIC);
829 return TCL_ERROR;
830 }
831
832 // register "access" objects
833 #define regTclObj2(t,v) alcrt->t = alcrt->t ? alcrt->t : ({ OT_OBJ_T val=STR2VAL(v); Tcl_IncrRefCount(val); val;})
834 #define regTclObj(t) regTclObj2(t,#t)
835 #define regTclCmd(t) regTclObj2(t,#t)
837 #undef regTclCmd
838 #undef regTclObj
839 #undef regTclObj2
840
841 // create ::LcConfig
842 OT_NS_T ns = Tcl_FindNamespace(interp,"::LcConfig",NULL,TCL_GLOBAL_ONLY);
843 if (ns == NULL) {
844 ns = Tcl_CreateNamespace(interp,"::LcConfig",alcrt,NS(LcConfig_ns_delete));
845 if (ns == NULL) return TCL_ERROR;
846 }
847
848 // add PACKAGE commands
849 check_LNG( MK(FillNamespace)(interp,LC(sOtClassDef),alcrt));
850
851 // BEGIN-CLASS-call-init - created by 'atl_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
852
853 check_LNG( NS(pLcConfigC_Init) (OT_LC_CALL ns) ) return TCL_ERROR;
854 check_LNG( NS(pLcSettingC_Init) (OT_LC_CALL ns) ) return TCL_ERROR;
855
856 // END-CLASS-call-init - created by 'atl_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
857
858 return TCL_OK;
859}
860
863 Tcl_Interp * interp,
864 int flags
865)
866{
867 OT_NS_T ns = Tcl_FindNamespace(interp,"::LcConfig",NULL,TCL_GLOBAL_ONLY);
868 if (ns) Tcl_DeleteNamespace(ns);
869
870 LcCleanup();
871
872 return TCL_OK;
873}
#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
__thread OT_LC_RT_S alcrtR
#define LcSetupTmpl()
#define LcCleanupTmpl()
#define Cleanup_doc
#define Setup_doc
#define ConfigTypeE_ToInt_doc
#define ErrorTypeE_ToString_doc
#define OtClass_ARGS
#define ConfigTypeE_ToString_doc
OT_ATL_EXTERN int Atllcconfig_Unload(Tcl_Interp *interp, int flags)
#define OT_LC_CALL
#define OT_LC_RT_SIG
identify the custom runtime
#define NS(n)
#define LC(n)
#define OT_NEW_Lc_enum_OBJ(typ, val)
tag: nhi1-release-250425
initialize the LcConfig package
#define MK(n)
#define OT_SETUP_NOARG(d)
#define OT_SETUP_ONEARG(d)
#define OT_DEBUG_NAMESPACE_DELETE(...)
MOX_ENV_T OT_ENV_T
#define OT_CHECK_NI4(val)
MOX_NS_T OT_NS_T
#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 check_LNG(code)
#define OT_retObj_SET_STR(nat)
#define OT_retObj_SET(val)
#define OT_CHECK_NOARGS
#define MkErrorC_Check(mng, PROC)
#define OT_ProcRet
#define OT_ATL_EXTERN
MOX_OBJ_T 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 atllcconfig internal memory …
void LcCleanup(void)
cleanup atllcconfig internal memory …
#define MK_ERROR_FORMAT
#define mk_bit_compare(t, f)
const MK_STRB * MK_STRN
signed int MK_I32
#define MkThreadLocal
#define MK_RT_PTR
#define MK_RT_CALL
#define MK_RT_ARGS
#define MkRtSetup_NULL
#define MkRtSetup_RT(r)
#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
OT_CLS_T AtlLcSettingC
OT_MK_RT_T amkrt
OT_OBJ_T AtlLcSettingC_MK_NULL
OT_CLS_T AtlLcConfigC
OT_ENV_T interp
OT_OBJ_T AtlLcConfigC_MK_NULL