theConfig 10.0
Loading...
Searching...
No Matches
LcConfigC_atl.c
Go to the documentation of this file.
1
9/* LABEL-START */
10
11#define META_FILE_NAME "LcConfigC_atl.c"
12
14
15#define OT_CLASS alcrt->AtlLcConfigC
16#define OT_NULL alcrt->AtlLcConfigC_MK_NULL
17#define OT_CLASS_NAME "LcConfigC"
18
19#define SELF2HDL(O) LcCfg(VAL2MNG(O))
20
21// LNG: class
22// -> moved to LibLcConfig_atl.h → OT_LC_RT_S → AtlLcConfigCTT;
23
24// META: ObjNew feature: called to return a new or an already existing ATL-SELF-Object
25// -> moved to LibLcConfig_atl.h → LcConfigC_ObjNew
26
27// META: ObjNew feature: selfCreate will be called from "ObjNew->MkSelfNew" if MkObj need a SELF pointer
28static MK_PTR NS(LcConfigC_selfCreate) (MK_RT_ARGS MK_OBJ const obj, MK_PTR const env) {
29 SETUP_alcrt(env);
30 return AtomMake(obj,OT_CLASS,NULL,NULL,env);
31}
32
33// META: called if MkObj must be destroyed and if the SELF is still alive → goal: destroy the SELF
34static void NS(LcConfigC_selfDelete) (MK_RT_ARGS MK_PTR selfP, MK_PTR const env) {
35 OT_SELF_T selfO = selfP;
36 SETUP_alcrt(env);
37 MK(AtomDeleteHard) (OT_MK_CALL selfO);
38}
39
40// META: called to destroy link from SELF to META
41static void NS(LcConfigC_selfUnlink) (MK_RT_ARGS MK_PTR selfP, MK_PTR const env) {
42 OT_SELF_T selfO = selfP;
43 SETUP_alcrt(env);
44 return MK(AtomUnlink) (OT_MK_CALL selfO);
45}
46
47#define OT_SETUP_hdl SetupHdlFromMetaData_2(LC_CFG)
48#define OT_SETUP_hdl__null_allow SetupHdlFromMetaData__null_allow_2(LC_CFG)
49#define OT_SETUP_hdl_destr SetupHdlFromMetaData__null_allow_2(LC_CFG)
50#define OT_SETUP_hdl_constr SetupHdlConstr(LcConfigC)
51#define OT_SETUP_hdl_static_constr OT_SETUP_hdl_static
52#define OT_SETUP_hdl_static SetupHdlStatic(LcConfigC)
53
54#define OT_retObj_CONSTR(x) OT_retObj_SET(AtomInit(OT_SELF,LcConfigC_X2obj(x),alcrt))
55
56// initialize the ATL and META class specific object
57#define ClassInit \
58 /* if not already done, initialize NEW META type */ \
59 if (LcConfigCTT == NULL) LcConfigCTT = LcConfigSTT; \
60 \
61 /* protect against double call */ \
62 if (LcConfigCTT->selfCreate == NS(LcConfigC_selfCreate)) return MK_OK; \
63 \
64 /* add "selfCreate" and "selfDelete" feature to the META-Class */ \
65 LcConfigCTT->selfCreate = NS(LcConfigC_selfCreate); \
66 LcConfigCTT->selfDelete = NS(LcConfigC_selfDelete); \
67 LcConfigCTT->selfUnlink = NS(LcConfigC_selfUnlink); \
68 \
69 /* create the ATL-class */ \
70 OT_CLASS = AltClassDef(LcConfigCTT,&alcrt->AtlLcConfigC_NS); \
71 if (OT_CLASS == NULL) goto error; \
72 OT_REF_INCR(OT_CLASS); \
73 \
74 /* create the ATL static Methods */ \
75 check_LNG(AtlUnknownSetup (NS(sOtClassDef),alcrt)) goto error; \
76 \
77 /* create the ATL instance Methods */ \
78 check_LNG(AtlUnknownSetup (NS(sInstanceDef),alcrt)) goto error; \
79 \
80 /* after class was modified, recompile the class */ \
81 RL_init(2, recompile, RL_T(0,RecompileN)); RL_O(1,OT_CLASS) ; \
82 int retI = RL_EvalEx(0); \
83 if (retI != TCL_OK) return retI; \
84 \
85 /* define the "NULL" object */ \
86 OT_NULL = AtomCreateNULL(OT_CLASS, "::LcConfigC::MK_NULL", (MK_PTR)alcrt); \
87 if (OT_NULL == NULL) goto error; \
88 OT_REF_INCR(OT_NULL);
89/* LABEL-END */
90
91// BEGIN-DOC - created by 'atl_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
92
93// doc-key: LcConfigC,LcConfig,sCc,func
94#define CTOR_doc "LcConfigC [LcConfigC::CTOR]"
95#define Create_doc "LcConfigC [LcConfigC::Create]"
96
97// doc-key: LcConfigC,LcConfig,sc_,func
98#define GetNull_doc "LcConfigC [LcConfigC::GetNull]"
99#define HandleResolve_doc "LcConfigC [LcConfigC::HandleResolve netHdl:MK_HDL]"
100#define Instances_doc "LcConfigC [LcConfigC::Instances]"
101
102// doc-key: LcConfigC,LcConfig,oc_,func
103#define Lookup_doc "LcSettingC [LcConfigC::Lookup $config path:string] (const)"
104#define Next_doc "LcConfigC [LcConfigC::Next $cfg]"
105#define Prev_doc "LcConfigC [LcConfigC::Prev $cfg]"
106#define RootSetting_doc "LcSettingC [LcConfigC::RootSetting $config] (const)"
107
108// doc-key: LcConfigC,LcConfig,om_,func
109#define Clear_doc "LcConfigC::Clear $config"
110#define ErrorType_doc "LcErrorTypeE [LcConfigC::ErrorType $config] (const)"
111#define GetDefaultFormat_doc "LcConfigFormatE [LcConfigC::GetDefaultFormat $config] (const)"
112#define GetFloatPrecision_doc "int16 [LcConfigC::GetFloatPrecision $config] (const)"
113#define GetIncludeDir_doc "string [LcConfigC::GetIncludeDir $config] (const)"
114#define GetOption_doc "bool [LcConfigC::GetOption $config option:LcConfigOptionsEF] (const)"
115#define GetOptions_doc "LcConfigOptionsEF [LcConfigC::GetOptions $config] (const)"
116#define GetTabWidth_doc "int16 [LcConfigC::GetTabWidth $config] (const)"
117// skip class-overload: HandleGet → MkObjectHandleGet
118#define Log_doc "LcConfigC::Log $cfg ?fmtobj:MkObjectC=NULL? ?debug:int32=0? ?callfunc:string=\"MK_NULL\"? ?lvl:int32=0? (const)"
119#define ReadFile_doc "LcConfigC::ReadFile $config filename:string"
120#define ReadString_doc "LcConfigC::ReadString $config str:string"
121#define SetDefaultFormat_doc "LcConfigC::SetDefaultFormat $config format:LcConfigFormatE"
122#define SetFloatPrecision_doc "LcConfigC::SetFloatPrecision $config digits:int16"
123#define SetIncludeDir_doc "LcConfigC::SetIncludeDir $config include_dir:string"
124#define SetIncludeFunc_doc "LcConfigC::SetIncludeFunc $cfg ?fConfigIncludeData:LC_CBP=NULL?"
125#define SetOption_doc "LcConfigC::SetOption $config option:LcConfigOptionsEF flag:bool"
126#define SetOptions_doc "LcConfigC::SetOptions $config options:LcConfigOptionsEF"
127#define SetSettingDeleteFunc_doc "LcConfigC::SetSettingDeleteFunc $cfg ?fSettingDeleteData:LC_CBP=NULL?"
128#define SetTabWidth_doc "LcConfigC::SetTabWidth $config width:int16"
129#define WriteFile_doc "LcConfigC::WriteFile $config filename:string"
130
131// doc-key: LcConfigC,LcConfig,omo,func
132#define LookupBool_doc "bool [LcConfigC::LookupBool $config path:string] (const)"
133#define LookupFloat_doc "double [LcConfigC::LookupFloat $config path:string] (const)"
134#define LookupInt_doc "int32 [LcConfigC::LookupInt $config path:string] (const)"
135#define LookupInt64_doc "int64 [LcConfigC::LookupInt64 $config path:string] (const)"
136#define LookupString_doc "string [LcConfigC::LookupString $config path:string] (const)"
137#define WriteString_doc "string [LcConfigC::WriteString $cfg] (const)"
138
139// END-DOC - created by 'atl_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
140
141/*****************************************************************************/
142/* */
143/* C O N / D E - S T R U C T O R */
144/* */
145/*****************************************************************************/
146
150
151/*****************************************************************************/
152/* */
153/* O B J E C T */
154/* */
155/*****************************************************************************/
156
157// BEGIN-LcConfigC - created by 'atl_MqC.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
158
162
163// doc-key: LcConfigC,LcConfigC-Class-Export,sc_
164
166static OT_ProcRet NS(LcConfigC_HandleResolve) (OtClass_ARGS) {
169 MK_HDL netHdl = 0;
172 LC_CFG retVal = LcConfigHandleResolve (netHdl);
173 OT_retObj_SET_CFG(retVal);
174 goto end;
175 error:
177 end:
179}
180
181// doc-key: LcConfigC,LcConfigC-Class-Export,om_
182
183// skip on class-overload: LcConfigHandleGet → MkObjectHandleGet
185static OT_ProcRet NS(LcConfigC_HandleGet) (LcConfigC_ARGS) {OT_ERROR_LNG_RETURN;}
186
188// LcConfigC_Class_ATL_API
189
193
194// doc-key: LcConfigC,LcConfigC-Class-Introspection,oc_
195
197static OT_ProcRet NS(LcConfigC_Next) (LcConfigC_ARGS) {
201 LC_CFG retVal = LcConfigNext (hdl);
202 OT_retObj_SET_CFG(retVal);
203 goto end;
204 error:
206 end:
208}
209
211static OT_ProcRet NS(LcConfigC_Prev) (LcConfigC_ARGS) {
215 LC_CFG retVal = LcConfigPrev (hdl);
216 OT_retObj_SET_CFG(retVal);
217 goto end;
218 error:
220 end:
222}
223
224// doc-key: LcConfigC,LcConfigC-Class-Introspection,sc_
225
227static OT_ProcRet NS(LcConfigC_Instances) (OtClass_ARGS) {
231 LC_CFG retVal = LcConfigInstances ();
232 OT_retObj_SET_CFG(retVal);
233 goto end;
234 error:
236 end:
238}
239
241// LcConfigC_Class_ATL_API
242
246
247// doc-key: LcConfigC,LcConfigC-Class-Misc,sc_
248
250static OT_ProcRet NS(LcConfigC_GetNull) (OtClass_ARGS) {
254 LC_CFG retVal = LcConfigGetNull ();
255 OT_retObj_SET_CFG(retVal);
256 goto end;
257 error:
259 end:
261}
262
264// LcConfigC_Class_ATL_API
265
269
270// doc-key: LcConfigC,LcConfigC-Error,om_
271
273static OT_ProcRet NS(LcConfigC_ErrorType) (LcConfigC_ARGS) {
278 goto end;
279 error:
281 end:
283}
284
286// LcConfigC_Error_ATL_API
287
291
292// doc-key: LcConfigC,LcConfigC-Get,om_
293
295static OT_ProcRet NS(LcConfigC_GetDefaultFormat) (LcConfigC_ARGS) {
300 goto end;
301 error:
303 end:
305}
306
308static OT_ProcRet NS(LcConfigC_GetFloatPrecision) (LcConfigC_ARGS) {
313 goto end;
314 error:
316 end:
318}
319
321static OT_ProcRet NS(LcConfigC_GetIncludeDir) (LcConfigC_ARGS) {
326 goto end;
327 error:
329 end:
331}
332
334static OT_ProcRet NS(LcConfigC_GetOption) (LcConfigC_ARGS) {
337 enum LcConfigOptionsEF option = 0;
341 goto end;
342 error:
344 end:
346}
347
349static OT_ProcRet NS(LcConfigC_GetOptions) (LcConfigC_ARGS) {
354 goto end;
355 error:
357 end:
359}
360
362static OT_ProcRet NS(LcConfigC_GetTabWidth) (LcConfigC_ARGS) {
367 goto end;
368 error:
370 end:
372}
373
375// LcConfigC_Get_ATL_API
376
380
381// doc-key: LcConfigC,LcConfigC-Lookup,oc_
382
384static OT_ProcRet NS(LcConfigC_Lookup) (LcConfigC_ARGS) {
387 MK_STRN path = 0;
390 LC_CFS retVal = LcConfigLookup (hdl, path);
391 OT_retObj_SET_CFS(retVal);
392 goto end;
393 error:
395 end:
397}
398
399// doc-key: LcConfigC,LcConfigC-Lookup,omo
400
402static OT_ProcRet NS(LcConfigC_LookupBool) (LcConfigC_ARGS) {
405 MK_STRN path = 0;
408 MK_BOOL value_out;
409 MkErrorC_Check(hdl,LcConfigLookupBool (hdl, path, &value_out));
410 OT_retObj_SET_BOL(value_out);
411 goto end;
412 error:
414 end:
416}
417
419static OT_ProcRet NS(LcConfigC_LookupFloat) (LcConfigC_ARGS) {
422 MK_STRN path = 0;
425 MK_DBL value_out;
426 MkErrorC_Check(hdl,LcConfigLookupFloat (hdl, path, &value_out));
427 OT_retObj_SET_DBL(value_out);
428 goto end;
429 error:
431 end:
433}
434
436static OT_ProcRet NS(LcConfigC_LookupInt) (LcConfigC_ARGS) {
439 MK_STRN path = 0;
442 MK_I32 value_out;
443 MkErrorC_Check(hdl,LcConfigLookupInt (hdl, path, &value_out));
444 OT_retObj_SET_I32(value_out);
445 goto end;
446 error:
448 end:
450}
451
453static OT_ProcRet NS(LcConfigC_LookupInt64) (LcConfigC_ARGS) {
456 MK_STRN path = 0;
459 MK_I64 value_out;
460 MkErrorC_Check(hdl,LcConfigLookupInt64 (hdl, path, &value_out));
461 OT_retObj_SET_I64(value_out);
462 goto end;
463 error:
465 end:
467}
468
470static OT_ProcRet NS(LcConfigC_LookupString) (LcConfigC_ARGS) {
473 MK_STRN path = 0;
476 MK_STRN value_out;
477 MkErrorC_Check(hdl,LcConfigLookupString (hdl, path, &value_out));
478 OT_retObj_SET_STR(value_out);
479 goto end;
480 error:
482 end:
484}
485
487// LcConfigC_Lookup_ATL_API
488
492
493// doc-key: LcConfigC,LcConfigC-Misc,oc_
494
496static OT_ProcRet NS(LcConfigC_RootSetting) (LcConfigC_ARGS) {
500 LC_CFS retVal = LcConfigRootSetting (hdl);
501 OT_retObj_SET_CFS(retVal);
502 goto end;
503 error:
505 end:
507}
508
509// doc-key: LcConfigC,LcConfigC-Misc,om_
510
512static OT_ProcRet NS(LcConfigC_Clear) (LcConfigC_ARGS) {
516 LcConfigClear (hdl);
518 goto end;
519 error:
521 end:
523}
524
526static OT_ProcRet NS(LcConfigC_Log) (LcConfigC_ARGS) {
529 MK_OBJN fmtobj = NULL;
531 MK_DBG debug = 0;
533 MK_STRN callfunc = NULL;
535 MK_I32 lvl = 0;
538 if (debug > MkRuntimeDebugGet()) {
540 goto end;
541 }
542 if (MkSysStringIsNULL(callfunc)) {callfunc = OT_GET_CALL_PROC;}
543 LcConfigLog (hdl, fmtobj, debug, callfunc, lvl);
545 goto end;
546 error:
548 end:
551}
552
554static OT_ProcRet NS(LcConfigC_ReadFile) (LcConfigC_ARGS) {
557 MK_STRN filename = 0;
560 MkErrorC_Check(hdl,LcConfigReadFile (hdl, filename));
562 goto end;
563 error:
565 end:
567}
568
570static OT_ProcRet NS(LcConfigC_ReadString) (LcConfigC_ARGS) {
573 MK_STRN str = 0;
578 goto end;
579 error:
581 end:
583}
584
586static OT_ProcRet NS(LcConfigC_WriteFile) (LcConfigC_ARGS) {
589 MK_STRN filename = 0;
592 MkErrorC_Check(hdl,LcConfigWriteFile (hdl, filename));
594 goto end;
595 error:
597 end:
599}
600
601// doc-key: LcConfigC,LcConfigC-Misc,omo
602
604static OT_ProcRet NS(LcConfigC_WriteString) (LcConfigC_ARGS) {
608 MK_STRN val_out;
609 MkErrorC_Check(hdl,LcConfigWriteString (hdl, &val_out));
610 OT_retObj_SET_STR(val_out);
611 goto end;
612 error:
614 end:
616}
617
619// LcConfigC_Misc_ATL_API
620
624
625// doc-key: LcConfigC,LcConfigC-Set,om_
626
628static OT_ProcRet NS(LcConfigC_SetDefaultFormat) (LcConfigC_ARGS) {
631 enum LcConfigFormatE format = 0;
634 LcConfigSetDefaultFormat (hdl, format);
636 goto end;
637 error:
639 end:
641}
642
644static OT_ProcRet NS(LcConfigC_SetFloatPrecision) (LcConfigC_ARGS) {
647 MK_I16 digits = 0;
650 LcConfigSetFloatPrecision (hdl, digits);
652 goto end;
653 error:
655 end:
657}
658
660static OT_ProcRet NS(LcConfigC_SetIncludeDir) (LcConfigC_ARGS) {
663 MK_STRN include_dir = 0;
664 OT_CHECK_REQUIRED(OT_CHECK_STRN (include_dir))
666 LcConfigSetIncludeDir (hdl, include_dir);
668 goto end;
669 error:
671 end:
673}
674
676static OT_ProcRet NS(LcConfigC_SetIncludeFunc) (LcConfigC_ARGS) {
679 OT_SETUP_CALLABLE(fConfigIncludeData)
680 OT_CHECK_OPTIONAL(OT_CHECK_CALLABLE(fConfigIncludeData))
682 LcConfigIncludeCallF fConfigIncludeCall = (fConfigIncludeData == NULL ? NULL : NS(ConfigIncludeCall));
683 MkErrorC_Check(hdl,LcConfigSetIncludeFunc (hdl, fConfigIncludeCall, fConfigIncludeData, NS(ConfigIncludeFree)));
685 goto end;
686 error:
688 end:
689 OT_CLEANUP_CALLABLE(fConfigIncludeData)
691}
692
694static OT_ProcRet NS(LcConfigC_SetOption) (LcConfigC_ARGS) {
697 enum LcConfigOptionsEF option = 0;
699 MK_BOOL flag = 0;
702 LcConfigSetOption (hdl, option, flag);
704 goto end;
705 error:
707 end:
709}
710
712static OT_ProcRet NS(LcConfigC_SetOptions) (LcConfigC_ARGS) {
715 enum LcConfigOptionsEF options = 0;
718 LcConfigSetOptions (hdl, options);
720 goto end;
721 error:
723 end:
725}
726
728static OT_ProcRet NS(LcConfigC_SetSettingDeleteFunc) (LcConfigC_ARGS) {
731 OT_SETUP_CALLABLE(fSettingDeleteData)
732 OT_CHECK_OPTIONAL(OT_CHECK_CALLABLE(fSettingDeleteData))
734 LcSettingDeleteCallF fSettingDeleteCall = (fSettingDeleteData == NULL ? NULL : NS(SettingDeleteCall));
735 MkErrorC_Check(hdl,LcConfigSetSettingDeleteFunc (hdl, fSettingDeleteCall, fSettingDeleteData, NS(SettingDeleteFree)));
737 goto end;
738 error:
740 end:
741 OT_CLEANUP_CALLABLE(fSettingDeleteData)
743}
744
746static OT_ProcRet NS(LcConfigC_SetTabWidth) (LcConfigC_ARGS) {
749 MK_I16 width = 0;
752 LcConfigSetTabWidth (hdl, width);
754 goto end;
755 error:
757 end:
759}
760
762// LcConfigC_Set_ATL_API
763
767
768// doc-key: LcConfigC,LcConfigC-TOR,sCc
769
771static OT_ProcRet NS(LcConfigC_CTOR) (CONSTR_ARGS) {
774 LC_CFG retVal = LcConfigCreate (NULL, NULL);
775 if (retVal == NULL) {
776 OT_ERROR_CONSTRUCTOR(LcConfigC);
777 goto error;
778 }
779 OT_CONSTRUCTOR_POST(retVal)
780 OT_retObj_CONSTR(retVal);
781 goto end;
782 error:
784 end:
786}
787
789static OT_ProcRet NS(LcConfigC_Create) (OtClass_ARGS) {
793 LC_CFG retVal = LcConfigCreate (NULL, NULL);
794 if (retVal == NULL) {
795 OT_ERROR_CONSTRUCTOR(LcConfigC);
796 goto error;
797 }
798 OT_CONSTRUCTOR_POST(retVal)
799 OT_retObj_SET_CFG(retVal);
800 goto end;
801 error:
803 end:
805}
806
808// LcConfigC_TOR_ATL_API
809
810// END-LcConfigC - created by 'atl_MqC.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
811
813
814#if 0
815// Assumes little endian
816char* printBits(size_t const size, void const * const ptr)
817{
818 static char buf[100];
819 char * bufP = &buf[0];
820 unsigned char *b = (unsigned char*) ptr;
821 unsigned char byte;
822 int i, j;
823 int num;
824
825 for (i = (int)size-1; i >= 0; i--) {
826 for (j = 7; j >= 0; j--) {
827 byte = (b[i] >> j) & 1;
828 num = sprintf(bufP,"%u", byte);
829 bufP+=num;
830 }
831 }
832 *bufP = '\0';
833 return buf;
834}
835
836#define myprint(num) ({ \
837 unsigned int tmp=num; \
838 printf("%-40s → %s\n", #num, printBits(4,&tmp)); \
839})
840
842static OT_ProcRet NS(LcConfigC_test) (LcConfigC_ARGS) {
843 MK_UNUSED int __skip; Tcl_Object selfO; LC_CFG hdl; \
844 if (objCtx) { \
845 /* call method via TCL */ \
846 __skip = Tcl_ObjectContextSkippedArgs(objCtx); \
847 selfO = Tcl_ObjectContextObject(objCtx); \
848 hdl = OBJECT2CFG(selfO); \
849 if (hdl == NULL) { \
850 Tcl_SetResult(interp, "PointerError: 'LcConfigC' hdl is NULL", TCL_STATIC); \
851 return TCL_ERROR; \
852 } \
853
854printP(hdl)
855myprint(MkOBJ_R(hdl).signature);
856myprint(MkOBJ_R(hdl).type->objmask);
857myprint(LcConfigS_SIGNATURE);
858myprint(LcConfigS_MASK);
859myprint(MkObjectS_SIGNATURE);
860myprint(MkObjectS_MASK);
861
862 //if (!__MkCheckX(LcConfig,hdl)) { MkPanicV_1E("broken hdl=%p\n",hdl); }
863 } else { \
864 /* call method DIRECT */ \
865 __skip = 0; \
866 selfO = NULL; \
867 hdl = (LC_CFG) clientData; \
868 } \
869 SetupRtFromHdl(hdl);
870
871 return TCL_OK;
872/*
873 OT_SETUP_hdl
874 OT_SETUP_ONEARG(Lookup_doc)
875 MK_STRN path = 0;
876 OT_CHECK_REQUIRED(OT_CHECK_STRN (path))
877 OT_CHECK_NOARGS
878 if (hdl->nat == NULL) OT_ERROR_LNG_RETURN_HDL_NAT_NULL(hdl);
879 config_setting_t* nat = config_lookup (hdl->nat, path);
880 LC_CFS retVal = OT_get_CFS_from_NAT(nat);
881 OT_retObj_SET_CFS(retVal)
882 goto end;
883 error:
884 OT_retObj_SET_Error
885 end:
886 OT_retObj_RETURN
887*/
888}
889#endif
890
891// ---------------------------------------------------------------------------------------
892
893static const OtObjProcDefS NS(sOtClassDef)[] = {
894 // BEGIN-CLASS - created by 'atl_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
895
896 // doc-key: LcConfigC,LcConfig,sCc
897 { "::LcConfigC::Create" , NS(LcConfigC_Create) },
898
899 // doc-key: LcConfigC,LcConfig,sc_
900 { "::LcConfigC::GetNull" , NS(LcConfigC_GetNull) },
901 { "::LcConfigC::HandleResolve" , NS(LcConfigC_HandleResolve) },
902 { "::LcConfigC::Instances" , NS(LcConfigC_Instances) },
903
904 // END-CLASS - created by 'atl_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
905 { NULL }
906};
907
908// ---------------------------------------------------------------------------------------
909
910static const OtObjProcDefS NS(sInstanceDef)[] = {
911// {VER, "test" , NS(LcConfigC_test) , NULL, NULL},
912 // BEGIN-OBJ - created by 'atl_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
913
914 // doc-key: LcConfigC,LcConfig,oC_
915 { "::LcConfigC::LcConfigC" , NS(LcConfigC_CTOR) },
916
917 // doc-key: LcConfigC,LcConfig,oc_
918 { "::LcConfigC::Lookup" , NS(LcConfigC_Lookup) },
919 { "::LcConfigC::Next" , NS(LcConfigC_Next) },
920 { "::LcConfigC::Prev" , NS(LcConfigC_Prev) },
921 { "::LcConfigC::RootSetting" , NS(LcConfigC_RootSetting) },
922
923 // doc-key: LcConfigC,LcConfig,om_
924 { "::LcConfigC::Clear" , NS(LcConfigC_Clear) },
925 { "::LcConfigC::ErrorType" , NS(LcConfigC_ErrorType) },
926 { "::LcConfigC::GetDefaultFormat" , NS(LcConfigC_GetDefaultFormat) },
927 { "::LcConfigC::GetFloatPrecision" , NS(LcConfigC_GetFloatPrecision) },
928 { "::LcConfigC::GetIncludeDir" , NS(LcConfigC_GetIncludeDir) },
929 { "::LcConfigC::GetOption" , NS(LcConfigC_GetOption) },
930 { "::LcConfigC::GetOptions" , NS(LcConfigC_GetOptions) },
931 { "::LcConfigC::GetTabWidth" , NS(LcConfigC_GetTabWidth) },
932 // skip class-overload: HandleGet → MkObjectHandleGet
933 { "::LcConfigC::Log" , NS(LcConfigC_Log) },
934 { "::LcConfigC::ReadFile" , NS(LcConfigC_ReadFile) },
935 { "::LcConfigC::ReadString" , NS(LcConfigC_ReadString) },
936 { "::LcConfigC::SetDefaultFormat" , NS(LcConfigC_SetDefaultFormat) },
937 { "::LcConfigC::SetFloatPrecision" , NS(LcConfigC_SetFloatPrecision) },
938 { "::LcConfigC::SetIncludeDir" , NS(LcConfigC_SetIncludeDir) },
939 { "::LcConfigC::SetIncludeFunc" , NS(LcConfigC_SetIncludeFunc) },
940 { "::LcConfigC::SetOption" , NS(LcConfigC_SetOption) },
941 { "::LcConfigC::SetOptions" , NS(LcConfigC_SetOptions) },
942 { "::LcConfigC::SetSettingDeleteFunc" , NS(LcConfigC_SetSettingDeleteFunc) },
943 { "::LcConfigC::SetTabWidth" , NS(LcConfigC_SetTabWidth) },
944 { "::LcConfigC::WriteFile" , NS(LcConfigC_WriteFile) },
945
946 // doc-key: LcConfigC,LcConfig,omo
947 { "::LcConfigC::LookupBool" , NS(LcConfigC_LookupBool) },
948 { "::LcConfigC::LookupFloat" , NS(LcConfigC_LookupFloat) },
949 { "::LcConfigC::LookupInt" , NS(LcConfigC_LookupInt) },
950 { "::LcConfigC::LookupInt64" , NS(LcConfigC_LookupInt64) },
951 { "::LcConfigC::LookupString" , NS(LcConfigC_LookupString) },
952 { "::LcConfigC::WriteString" , NS(LcConfigC_WriteString) },
953
954 // END-OBJ - created by 'atl_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
955 { NULL }
956};
957
963
964int NS(pLcConfigC_Init) ( OT_LC_ARGS OT_NS_T ns )
965{
967
968 return TCL_OK;
969error:
970 return TCL_ERROR;
971}
#define Instances_doc
#define SetIncludeFunc_doc
#define WriteString_doc
#define ReadString_doc
#define ReadFile_doc
#define SetIncludeDir_doc
#define OT_SETUP_hdl_static_constr
#define Lookup_doc
#define SetOption_doc
#define OT_SETUP_hdl
#define LookupBool_doc
#define LookupFloat_doc
#define ErrorType_doc
#define Log_doc
#define SetOptions_doc
#define SetTabWidth_doc
#define GetNull_doc
#define SetSettingDeleteFunc_doc
#define Next_doc
#define GetTabWidth_doc
#define Create_doc
#define HandleResolve_doc
#define LookupInt_doc
#define Prev_doc
#define SetFloatPrecision_doc
#define OT_CLASS
#define LookupString_doc
#define OT_SETUP_hdl_static
#define OT_SETUP_hdl_constr
#define GetFloatPrecision_doc
#define WriteFile_doc
#define SetDefaultFormat_doc
#define RootSetting_doc
#define LookupInt64_doc
#define OT_retObj_CONSTR(x)
#define GetOptions_doc
#define Clear_doc
#define CTOR_doc
#define GetOption_doc
#define ClassInit
#define GetDefaultFormat_doc
#define GetIncludeDir_doc
#define OtClass_ARGS
#define OT_LC_ARGS
#define LcConfigC_ARGS
#define OT_retObj_SET_CFG(nat)
#define OT_retObj_SET_CFS(nat)
#define NS(n)
#define SETUP_alcrt(r)
#define OT_NEW_Lc_enum_OBJ(typ, val)
tag: nhi1-release-250425
#define OT_CHECK_bool(val)
#define MK(n)
#define AtomMake(...)
#define OT_SETUP_VARARGS(min, max, d)
#define OT_CHECK_NIH(val)
#define OT_retObj_SET_BOL(nat)
#define OT_SETUP_NOARG(d)
#define OT_SETUP_ONEARG(d)
#define OT_ERROR_LNG_RETURN
#define OT_CHECK_NI4(val)
MOX_NS_T OT_NS_T
#define OT_retObj_SET_I16(nat)
#define OT_retObj_SET_Error
#define OT_CONSTRUCTOR_POST(x)
#define OT_FRAME_CLEANUP
#define OT_ERROR_CONSTRUCTOR(class)
#define OT_retObj_SET_DBL(nat)
#define OT_retObj_SET_I64(nat)
#define OT_CHECK_REQUIRED(val)
#define OT_retObj_SET_None
#define OT_retObj_SET_I32(nat)
MOX_OBJ_T OT_SELF_T
#define OT_SETUP_CONSTRUCTOR_ARGS(...)
#define OT_CHECK_ENUM(ename, val)
#define OT_retObj_RETURN
#define OT_GET_CALL_PROC
#define OT_MK_CALL
#define OT_CHECK_NI2(val)
#define OT_retObj_SET_STR(nat)
#define OT_CHECK_OPTIONAL(val)
#define OT_retObj_SET(val)
#define str(s)
#define OT_CHECK_NOARGS
#define MkErrorC_Check(mng, PROC)
#define OT_ProcRet
#define CONSTR_ARGS
#define OT_CHECK_STRN(val)
enum MkErrorE(* LcSettingDeleteCallF)(LcSettingDeleteCallF_ARGS)
enum MkErrorE(* LcConfigIncludeCallF)(LcConfigIncludeCallF_ARGS)
struct LcConfigS * LC_CFG
class-shortcut for struct LcConfigS *, all shortcut using the XX_YYY syntax (only for public API) …
#define LcConfigInstances()
static LC_CFG LcConfigPrev(LC_CFG const cfg)
get previous instance from linked-list of LcConfigS type
static LC_CFG LcConfigNext(LC_CFG const cfg)
get next instance from linked-list of LcConfigS type
static LC_CFG LcConfigGetNull(void)
Null-Slot - return a LcConfigC typed NULL instance …
#define LcConfigHandleResolve(...)
static enum LcErrorTypeE LcConfigErrorType(LC_CFGN config)
This function, which is implemented as a macro, returns the type of error that occurred during the la...
static enum LcConfigFormatE LcConfigGetDefaultFormat(LC_CFGN config)
These functions, which are implemented as macros, get and set the default external format for setting...
static MK_I16 LcConfigGetTabWidth(LC_CFGN config)
These functions, which are implemented as macros, get and set the tab width for the configuration con...
static MK_BOOL LcConfigGetOption(LC_CFGN config, enum LcConfigOptionsEF option)
Since v1.7 These functions get and set the given option of the configuration config …
static MK_I16 LcConfigGetFloatPrecision(LC_CFGN config)
Since v1.6 These functions get and set the number of decimal digits to output after the radix charact...
static enum LcConfigOptionsEF LcConfigGetOptions(LC_CFGN config)
These functions get and set the options for the configuration config …
static MK_STRN LcConfigGetIncludeDir(LC_CFGN config)
ConfigSetIncludeDir specifies the include directory, include_dir, relative to which the files specifi...
static enum MkErrorE LcConfigLookupFloat(LC_CFGN config, MK_STRN path, MK_DBL *value_out)
These functions look up the value of the setting in the configuration config specified by the path pa...
static enum MkErrorE LcConfigLookupBool(LC_CFGN config, MK_STRN path, MK_BOOL *value_out)
These functions look up the value of the setting in the configuration config specified by the path pa...
static enum MkErrorE LcConfigLookupString(LC_CFGN config, MK_STRN path, MK_STRN *value_out)
These functions look up the value of the setting in the configuration config specified by the path pa...
static enum MkErrorE LcConfigLookupInt(LC_CFGN config, MK_STRN path, MK_I32 *value_out)
These functions look up the value of the setting in the configuration config specified by the path pa...
static enum MkErrorE LcConfigLookupInt64(LC_CFGN config, MK_STRN path, MK_I64 *value_out)
These functions look up the value of the setting in the configuration config specified by the path pa...
static LC_CFS LcConfigLookup(LC_CFGN config, MK_STRN path)
This function locates the setting in the configuration config specified by the path path …
static enum MkErrorE LcConfigWriteFile(LC_CFG config, MK_STRN filename)
This function writes the configuration config to the file named filename …
#define LcConfigWriteString(...)
static LC_CFS LcConfigRootSetting(LC_CFGN config)
This function, which is implemented as a macro, returns the root setting for the configuration config...
#define LcConfigLog(...)
static void LcConfigClear(LC_CFG config)
Since v1.7 This function clears the configuration config …
static enum MkErrorE LcConfigReadFile(LC_CFG config, MK_STRN filename)
This function reads and parses a configuration from the file named filename into the configuration ob...
static enum MkErrorE LcConfigReadString(LC_CFG config, MK_STRN str)
This function reads and parses a configuration from the string str into the configuration object conf...
static void LcConfigSetTabWidth(LC_CFG config, MK_I16 width)
These functions, which are implemented as macros, get and set the tab width for the configuration con...
static void LcConfigSetFloatPrecision(LC_CFG config, MK_I16 digits)
Since v1.6 These functions get and set the number of decimal digits to output after the radix charact...
#define LcConfigSetSettingDeleteFunc(...)
static void LcConfigSetOptions(LC_CFG config, enum LcConfigOptionsEF options)
These functions get and set the options for the configuration config …
static void LcConfigSetOption(LC_CFG config, enum LcConfigOptionsEF option, MK_BOOL flag)
Since v1.7 These functions get and set the given option of the configuration config …
static void LcConfigSetIncludeDir(LC_CFG config, MK_STRN include_dir)
ConfigSetIncludeDir specifies the include directory, include_dir, relative to which the files specifi...
#define LcConfigSetIncludeFunc(...)
static void LcConfigSetDefaultFormat(LC_CFG config, enum LcConfigFormatE format)
These functions, which are implemented as macros, get and set the default external format for setting...
static LC_CFG LcConfigCreate(MK_TYP type, config_t *nat)
create a LcConfigC instance …
LcConfigFormatE
set the format of a LcSettingC …
Definition LcEnum_lc.h:30
LcConfigOptionsEF
define the configuration-option of a LcConfigC …
Definition LcEnum_lc.h:134
#define MK_NULL_YES
#define MK_UNUSED
#define MK_DEPRECATED
MK_PTRB * MK_PTR
const MK_STRB * MK_STRN
signed long long MK_I64
bool MK_BOOL
signed short int MK_I16
double MK_DBL
int32_t MK_HDL
signed int MK_I32
int MK_DBG
#define MkOBJ_R(x)
static bool MkSysStringIsNULL(MK_STRN str)
static MK_I32 MkRuntimeDebugGet(void)
#define MK_RT_ARGS
#define OT_CHECK_CALLABLE(val)
#define OT_CLEANUP_CALLABLE(val)
#define OT_SETUP_CALLABLE(val)
#define OT_CHECK_OBJN(val, nullB)
Struct to represent the data from the LcConfigC …
Struct to represent the data from the LcSettingC …