theConfig 10.0 NHI1 - theKernel - theLink - theConfig - theSq3Lite - theCompiler - theBrain - theGuard - theLib
c - tcl - atl - cs - py - rb - jv - cc
Loading...
Searching...
No Matches
LcSettingC_tcl.c
Go to the documentation of this file.
1
12/* LABEL-START */
13
14#define META_FILE_NAME "LcSettingC_tcl.c"
15
17
18#define OT_CLASS NS(LcSettingC)
19#define OT_CLASS_NAME "LcSettingC"
20
21#define OBJECT2CFS(O) MkAssertCastM(LcSettingC,(Tcl_ObjectGetMetadata(O, &MK(AtomMeta))))
22
23// TCL class
25
26// META class
28MkThreadLocal OT_OBJ_T LC(LcSettingC_MK_NULL) = NULL;
29
30// META: ObjNew feature: selfCreate will be called from "ObjNew->MkSelfNew" if MkObj need a SELF pointer
31static MK_PTR NS(LcSettingC_selfCreate) (MK_RT_ARGS MK_OBJ const obj, MK_PTR const env) {
32 OT_ENV_T interp = env;
33 return MK(AtomCreate) (MK_RT_CALL interp,obj,OT_CLASS,NULL,NULL);
34}
35// META: is called when the META object is destroyed and SELF does NOT belongs to the META.
36static void NS(LcSettingC_selfDelete) (MK_RT_ARGS MK_PTR selfP, MK_PTR const env) {
37 OT_SELF_T selfO = selfP;
38 OT_ENV_T interp = env;
39 MK(AtomDeleteHard) (MK_RT_CALL interp, selfO);
40}
41// META: is called when the META object is destroyed and SELF does NOT belong to the META.
42static void NS(LcSettingC_selfUnlink) (MK_RT_ARGS MK_PTR selfP, MK_PTR const env) {
43 OT_SELF_T selfO = selfP;
44 OT_ENV_T interp = env;
45 MK(AtomUnlink) (MK_RT_CALL interp, selfO);
46}
47
48// ATTENTION: TCL has no "Unlink" because the "Tcl_ObjectSetMetadata(selfO,&MK(AtomMeta),NULL);" call
49// also the destructor
50
51#define OT_SETUP_hdl_static_constr_pre
52#define OT_SETUP_hdl_static_constr \
53 OT_SETUP_hdl_static_constr_pre; \
54 OT_SETUP_hdl_static
55
56#define OT_SETUP_hdl_static \
57 int __skip=Tcl_ObjectContextSkippedArgs(objCtx); \
58 AllRtSetup_NULL; \
59 __attribute__((unused)) OT_SELF_T selfO = Tcl_ObjectContextObject(objCtx); \
60 __attribute__((unused)) MK_TYP hdl = LcSettingC##_TT;
61
62#define OT_SETUP_hdl SetupHdlFromMetaData_2(CFS,LC_CFS);
63#define OT_SETUP_hdl__null_allow SetupHdlFromMetaData__null_allow_2(CFS,LC_CFS);
64#define OT_SETUP_hdl_destr SetupHdlFromMetaData__null_allow_2(CFS,LC_CFS);
65
66#define OT_SETUP_hdl_constr_pre
67#define OT_SETUP_hdl_constr \
68 OT_SETUP_hdl_constr_pre; \
69 int __skip=Tcl_ObjectContextSkippedArgs(objCtx); \
70 AllRtSetup_NULL; \
71 MK_RT_UNUSED OT_SELF_T selfO = Tcl_ObjectContextObject(objCtx); \
72 LC_CFS hdl = (LC_CFS) &MkERROR;
73
74#if !defined(SetupRtFromHdl_XN)
75 #define SetupRtFromHdl_XN(hdl) AllRtSetup_XN(hdl)
76 #define SetupRtFromHdl_X(hdl) AllRtSetup_X(hdl)
77#endif
78
79// initialize the TCL and MO class specific object
80#define ClassInit \
81 /* if not already done, initialize NEW MQ type */ \
82 if (LcSettingCTT == NULL) LcSettingCTT = LcSettingSTT; \
83 \
84 /* protect against double call */ \
85 if (LcSettingCTT->selfCreate == NS(LcSettingC_selfCreate)) return MK_OK; \
86 \
87 /* add "selfCreate" and "selfDelete" feature to the MQ-Class */ \
88 LcSettingCTT->selfCreate = NS(LcSettingC_selfCreate); \
89 LcSettingCTT->selfDelete = NS(LcSettingC_selfDelete); \
90 LcSettingCTT->selfUnlink = NS(LcSettingC_selfUnlink); \
91 \
92 /* create the TCL-class */ \
93 OT_SELF_T classO = MK(ClassDef)(interp,ns,LcSettingCTT); \
94 check_NULL(classO) goto error; \
95 OT_CLASS = Tcl_GetObjectAsClass(classO); \
96 \
97 /* create the TCL static Methods */ \
98 static MkThreadLocal OtUnknownS NS(sClassUnknown) = {OT_UNKNOWN_CLASS}; \
99 check_LNG(MK(UnknownSetup) (interp,classO,NS(sOtClassDef),&NS(sClassUnknown))) goto error; \
100 \
101 /* create the TCL instance Methods */ \
102 static MkThreadLocal OtUnknownS NS(sInstanceUnknown) = {OT_UNKNOWN_INSTANCE}; \
103 check_LNG(MK(UnknownSetup) (interp,classO,NS(sInstanceDef),&NS(sInstanceUnknown))) goto error; \
104 \
105 /* define the "NULL" object */ \
106 LC(LcSettingC_MK_NULL) = Tcl_GetObjectName(interp, \
107 MK(AtomCreate) (MK_RT_CALL interp, NULL /*obj*/, OT_CLASS, "MK_NULL" /*name*/, "::tcllcconfig::LcSettingC" /*ns*/) \
108 ); \
109 Tcl_IncrRefCount(LC(LcSettingC_MK_NULL));
110
111#define VER TCL_OO_METHOD_VERSION_CURRENT
112
113/* LABEL-END */
114
115// BEGIN-DOC - created by 'tcl_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
116
117// doc-key: LcSettingC,LcSetting,sc_,func
118#define GetNull_doc "LcSettingC [LcSettingC GetNull]"
119#define HandleResolve_doc "LcSettingC [LcSettingC HandleResolve netHdl:MK_HDL]"
120#define Instances_doc "LcSettingC [LcSettingC Instances]"
121
122// doc-key: LcSettingC,LcSetting,oC_,func
123#define Add_doc "LcSettingC [$parent Add name:string __type:LcConfigTypeE]"
124
125// doc-key: LcSettingC,LcSetting,oc_,func
126#define AddIfNotExists_doc "LcSettingC [$setting AddIfNotExists name:string cfgtype:LcConfigTypeE]"
127#define GetConfig_doc "LcConfigC [$setting GetConfig] (const)"
128#define GetElem_doc "LcSettingC [$setting GetElem idx:int32] (const)"
129#define GetMember_doc "LcSettingC [$setting GetMember name:string] (const)"
130#define Lookup_doc "LcSettingC [$setting Lookup path:string]"
131#define LookupAll_doc "MkBufferListC [$setting LookupAll] (const)"
132#define Next_doc "LcSettingC [$cfs Next]"
133#define Parent_doc "LcSettingC [$setting Parent] (const)"
134#define Prev_doc "LcSettingC [$cfs Prev]"
135#define SetBoolElem_doc "LcSettingC [$setting SetBoolElem idx:int32 value:int32]"
136#define SetFloatElem_doc "LcSettingC [$setting SetFloatElem idx:int32 value:double]"
137#define SetInt64Elem_doc "LcSettingC [$setting SetInt64Elem idx:int32 value:int64]"
138#define SetIntElem_doc "LcSettingC [$setting SetIntElem idx:int32 value:int32]"
139#define SetStringElem_doc "LcSettingC [$setting SetStringElem idx:int32 value:string]"
140
141// doc-key: LcSettingC,LcSetting,om_,func
142#define Exists_doc "bool [$setting Exists name:string]"
143#define GetBool_doc "bool [$setting GetBool] (const)"
144#define GetBoolElem_doc "bool [$setting GetBoolElem idx:int32] (const)"
145#define GetFloat_doc "double [$setting GetFloat] (const)"
146#define GetFloatElem_doc "double [$setting GetFloatElem idx:int32] (const)"
147#define GetFormat_doc "LcConfigFormatE [$setting GetFormat] (const)"
148#define GetInt_doc "int32 [$setting GetInt] (const)"
149#define GetInt64_doc "int64 [$setting GetInt64] (const)"
150#define GetInt64Elem_doc "int64 [$setting GetInt64Elem idx:int32] (const)"
151#define GetIntElem_doc "int32 [$setting GetIntElem idx:int32] (const)"
152#define GetString_doc "string [$setting GetString] (const)"
153#define GetStringElem_doc "string [$setting GetStringElem idx:int32] (const)"
154// skip class-overload: HandleGet → MkObjectHandleGet
155#define Index_doc "int32 [$setting Index] (const)"
156#define IsAggregate_doc "bool [$setting IsAggregate] (const)"
157#define IsArray_doc "bool [$setting IsArray] (const)"
158#define IsGroup_doc "bool [$setting IsGroup] (const)"
159#define IsList_doc "bool [$setting IsList] (const)"
160#define IsNumber_doc "bool [$setting IsNumber] (const)"
161#define IsRoot_doc "bool [$setting IsRoot] (const)"
162#define IsScalar_doc "bool [$setting IsScalar] (const)"
163#define Length_doc "int32 [$setting Length] (const)"
164// skip class-overload: Log → MkObjectLog
165#define Name_doc "string [$setting Name] (const)"
166#define Remove_doc "$parent Remove name:string"
167#define RemoveElem_doc "$parent RemoveElem idx:int32"
168#define SetBool_doc "$setting SetBool value:bool"
169#define SetFloat_doc "$setting SetFloat value:double"
170#define SetFormat_doc "$setting SetFormat format:LcConfigFormatE"
171#define SetInt_doc "$setting SetInt value:int32"
172#define SetInt64_doc "$setting SetInt64 value:int64"
173#define SetString_doc "$setting SetString value:string"
174#define SourceFile_doc "string [$setting SourceFile] (const)"
175#define SourceLine_doc "int32 [$setting SourceLine] (const)"
176#define Type_doc "LcConfigTypeE [$setting Type] (const)"
177
178// doc-key: LcSettingC,LcSetting,omo,func
179#define LookupBool_doc "bool [$setting LookupBool name:string] (const)"
180#define LookupFloat_doc "double [$setting LookupFloat name:string] (const)"
181#define LookupInt_doc "int32 [$setting LookupInt name:string] (const)"
182#define LookupInt64_doc "int64 [$setting LookupInt64 name:string] (const)"
183#define LookupString_doc "string [$setting LookupString name:string] (const)"
184
185// END-DOC - created by 'tcl_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
186
187/*****************************************************************************/
188/* */
189/* C O N / D E - S T R U C T O R */
190/* */
191/*****************************************************************************/
192
193/*****************************************************************************/
194/* */
195/* O B J E C T */
196/* */
197/*****************************************************************************/
198
199// BEGIN-LcSettingC - created by 'tcl_MqC.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
200
204
205// doc-key: LcSettingC,LcSettingC-Class-Export,sc_
206
208static OT_ProcRet NS(LcSettingC_HandleResolve) (OtClass_ARGS) {
211 MK_HDL netHdl = 0;
214 LC_CFS retVal = LcSettingHandleResolve (netHdl);
215 OT_retObj_SET_CFS(retVal);
216 goto end;
217 error:
219 end:
221}
222
223// doc-key: LcSettingC,LcSettingC-Class-Export,om_
224
225// skip on class-overload: LcSettingHandleGet → MkObjectHandleGet
227static OT_ProcRet NS(LcSettingC_HandleGet) (LcSettingC_ARGS) {OT_ERROR_LNG_RETURN;}
228
230// LcSettingC_Class_TCL_API
231
235
236// doc-key: LcSettingC,LcSettingC-Class-Introspection,oc_
237
239static OT_ProcRet NS(LcSettingC_Next) (LcSettingC_ARGS) {
243 LC_CFS retVal = LcSettingNext (hdl);
244 OT_retObj_SET_CFS(retVal);
245 goto end;
246 error:
248 end:
250}
251
253static OT_ProcRet NS(LcSettingC_Prev) (LcSettingC_ARGS) {
257 LC_CFS retVal = LcSettingPrev (hdl);
258 OT_retObj_SET_CFS(retVal);
259 goto end;
260 error:
262 end:
264}
265
266// doc-key: LcSettingC,LcSettingC-Class-Introspection,sc_
267
269static OT_ProcRet NS(LcSettingC_Instances) (OtClass_ARGS) {
273 LC_CFS retVal = LcSettingInstances ();
274 OT_retObj_SET_CFS(retVal);
275 goto end;
276 error:
278 end:
280}
281
283// LcSettingC_Class_TCL_API
284
288
289// doc-key: LcSettingC,LcSettingC-Class-Misc,sc_
290
292static OT_ProcRet NS(LcSettingC_GetNull) (OtClass_ARGS) {
296 LC_CFS retVal = LcSettingGetNull ();
297 OT_retObj_SET_CFS(retVal);
298 goto end;
299 error:
301 end:
303}
304
306// LcSettingC_Class_TCL_API
307
311
312// doc-key: LcSettingC,LcSettingC-Get,oc_
313
315static OT_ProcRet NS(LcSettingC_GetElem) (LcSettingC_ARGS) {
318 MK_I32 idx = 0;
321 LC_CFS retVal = LcSettingGetElem (hdl, idx);
322 if (retVal == NULL) {
323 OT_ERROR_SOFT_CONSTRUCTOR(LcSettingC);
324 goto error;
325 }
326 OT_retObj_SET_CFS(retVal);
327 goto end;
328 error:
330 end:
332}
333
335static OT_ProcRet NS(LcSettingC_GetMember) (LcSettingC_ARGS) {
338 MK_STRN name = 0;
341 LC_CFS retVal = LcSettingGetMember (hdl, name);
342 if (retVal == NULL) {
343 OT_ERROR_SOFT_CONSTRUCTOR(LcSettingC);
344 goto error;
345 }
346 OT_retObj_SET_CFS(retVal);
347 goto end;
348 error:
350 end:
352}
353
354// doc-key: LcSettingC,LcSettingC-Get,om_
355
357static OT_ProcRet NS(LcSettingC_GetBool) (LcSettingC_ARGS) {
362 goto end;
363 error:
365 end:
367}
368
370static OT_ProcRet NS(LcSettingC_GetBoolElem) (LcSettingC_ARGS) {
373 MK_I32 idx = 0;
377 goto end;
378 error:
380 end:
382}
383
385static OT_ProcRet NS(LcSettingC_GetFloat) (LcSettingC_ARGS) {
390 goto end;
391 error:
393 end:
395}
396
398static OT_ProcRet NS(LcSettingC_GetFloatElem) (LcSettingC_ARGS) {
401 MK_I32 idx = 0;
405 goto end;
406 error:
408 end:
410}
411
413static OT_ProcRet NS(LcSettingC_GetFormat) (LcSettingC_ARGS) {
418 goto end;
419 error:
421 end:
423}
424
426static OT_ProcRet NS(LcSettingC_GetInt) (LcSettingC_ARGS) {
431 goto end;
432 error:
434 end:
436}
437
439static OT_ProcRet NS(LcSettingC_GetInt64) (LcSettingC_ARGS) {
444 goto end;
445 error:
447 end:
449}
450
452static OT_ProcRet NS(LcSettingC_GetInt64Elem) (LcSettingC_ARGS) {
455 MK_I32 idx = 0;
459 goto end;
460 error:
462 end:
464}
465
467static OT_ProcRet NS(LcSettingC_GetIntElem) (LcSettingC_ARGS) {
470 MK_I32 idx = 0;
474 goto end;
475 error:
477 end:
479}
480
482static OT_ProcRet NS(LcSettingC_GetString) (LcSettingC_ARGS) {
487 goto end;
488 error:
490 end:
492}
493
495static OT_ProcRet NS(LcSettingC_GetStringElem) (LcSettingC_ARGS) {
498 MK_I32 idx = 0;
502 goto end;
503 error:
505 end:
507}
508
510// LcSettingC_Get_TCL_API
511
515
516// doc-key: LcSettingC,LcSettingC-Is,om_
517
519static OT_ProcRet NS(LcSettingC_IsAggregate) (LcSettingC_ARGS) {
524 goto end;
525 error:
527 end:
529}
530
532static OT_ProcRet NS(LcSettingC_IsArray) (LcSettingC_ARGS) {
537 goto end;
538 error:
540 end:
542}
543
545static OT_ProcRet NS(LcSettingC_IsGroup) (LcSettingC_ARGS) {
550 goto end;
551 error:
553 end:
555}
556
558static OT_ProcRet NS(LcSettingC_IsList) (LcSettingC_ARGS) {
563 goto end;
564 error:
566 end:
568}
569
571static OT_ProcRet NS(LcSettingC_IsNumber) (LcSettingC_ARGS) {
576 goto end;
577 error:
579 end:
581}
582
584static OT_ProcRet NS(LcSettingC_IsRoot) (LcSettingC_ARGS) {
589 goto end;
590 error:
592 end:
594}
595
597static OT_ProcRet NS(LcSettingC_IsScalar) (LcSettingC_ARGS) {
602 goto end;
603 error:
605 end:
607}
608
610// LcSettingC_Is_TCL_API
611
615
616// doc-key: LcSettingC,LcSettingC-Lookup,oc_
617
619static OT_ProcRet NS(LcSettingC_Lookup) (LcSettingC_ARGS) {
622 MK_STRN path = 0;
625 LC_CFS retVal = LcSettingLookup (hdl, path);
626 if (retVal == NULL) {
627 OT_ERROR_SOFT_CONSTRUCTOR(LcSettingC);
628 goto error;
629 }
630 OT_retObj_SET_CFS(retVal);
631 goto end;
632 error:
634 end:
636}
637
639static OT_ProcRet NS(LcSettingC_LookupAll) (LcSettingC_ARGS) {
643 MK_BFL retVal = LcSettingLookupAll (hdl);
644 OT_retObj_SET_BFL(retVal);
645 goto end;
646 error:
648 end:
650}
651
652// doc-key: LcSettingC,LcSettingC-Lookup,omo
653
655static OT_ProcRet NS(LcSettingC_LookupBool) (LcSettingC_ARGS) {
658 MK_STRN name = 0;
661 MK_BOOL value_out;
662 MkErrorC_Check(hdl,LcSettingLookupBool (hdl, name, &value_out));
663 OT_retObj_SET_BOL(value_out);
664 goto end;
665 error:
667 end:
669}
670
672static OT_ProcRet NS(LcSettingC_LookupFloat) (LcSettingC_ARGS) {
675 MK_STRN name = 0;
678 MK_DBL value_out;
679 MkErrorC_Check(hdl,LcSettingLookupFloat (hdl, name, &value_out));
680 OT_retObj_SET_DBL(value_out);
681 goto end;
682 error:
684 end:
686}
687
689static OT_ProcRet NS(LcSettingC_LookupInt) (LcSettingC_ARGS) {
692 MK_STRN name = 0;
695 MK_I32 value_out;
696 MkErrorC_Check(hdl,LcSettingLookupInt (hdl, name, &value_out));
697 OT_retObj_SET_I32(value_out);
698 goto end;
699 error:
701 end:
703}
704
706static OT_ProcRet NS(LcSettingC_LookupInt64) (LcSettingC_ARGS) {
709 MK_STRN name = 0;
712 MK_I64 value_out;
713 MkErrorC_Check(hdl,LcSettingLookupInt64 (hdl, name, &value_out));
714 OT_retObj_SET_I64(value_out);
715 goto end;
716 error:
718 end:
720}
721
723static OT_ProcRet NS(LcSettingC_LookupString) (LcSettingC_ARGS) {
726 MK_STRN name = 0;
729 MK_STRN value_out;
730 MkErrorC_Check(hdl,LcSettingLookupString (hdl, name, &value_out));
731 OT_retObj_SET_STR(value_out);
732 goto end;
733 error:
735 end:
737}
738
740// LcSettingC_Lookup_TCL_API
741
745
746// doc-key: LcSettingC,LcSettingC-Misc,oc_
747
749static OT_ProcRet NS(LcSettingC_AddIfNotExists) (LcSettingC_ARGS) {
752 MK_STRN name = 0;
754 enum LcConfigTypeE cfgtype = 0;
757 LC_CFS retVal = LcSettingAddIfNotExists (hdl, name, cfgtype);
758 OT_retObj_SET_CFS(retVal);
759 goto end;
760 error:
762 end:
764}
765
767static OT_ProcRet NS(LcSettingC_Parent) (LcSettingC_ARGS) {
771 LC_CFS retVal = LcSettingParent (hdl);
772 if (retVal == NULL) {
773 OT_ERROR_SOFT_CONSTRUCTOR(LcSettingC);
774 goto error;
775 }
776 OT_retObj_SET_CFS(retVal);
777 goto end;
778 error:
780 end:
782}
783
784// doc-key: LcSettingC,LcSettingC-Misc,om_
785
787static OT_ProcRet NS(LcSettingC_Exists) (LcSettingC_ARGS) {
790 MK_STRN name = 0;
794 goto end;
795 error:
797 end:
799}
800
802static OT_ProcRet NS(LcSettingC_Index) (LcSettingC_ARGS) {
807 goto end;
808 error:
810 end:
812}
813
815static OT_ProcRet NS(LcSettingC_Length) (LcSettingC_ARGS) {
820 goto end;
821 error:
823 end:
825}
826
827// skip on class-overload: LcSettingLog → MkObjectLog
830
832static OT_ProcRet NS(LcSettingC_Name) (LcSettingC_ARGS) {
837 goto end;
838 error:
840 end:
842}
843
845static OT_ProcRet NS(LcSettingC_Remove) (LcSettingC_ARGS) {
848 MK_STRN name = 0;
851 MkErrorC_Check(hdl,LcSettingRemove (hdl, name));
853 goto end;
854 error:
856 end:
858}
859
861static OT_ProcRet NS(LcSettingC_RemoveElem) (LcSettingC_ARGS) {
864 MK_I32 idx = 0;
867 MkErrorC_Check(hdl,LcSettingRemoveElem (hdl, idx));
869 goto end;
870 error:
872 end:
874}
875
877static OT_ProcRet NS(LcSettingC_SourceFile) (LcSettingC_ARGS) {
882 goto end;
883 error:
885 end:
887}
888
890static OT_ProcRet NS(LcSettingC_SourceLine) (LcSettingC_ARGS) {
895 goto end;
896 error:
898 end:
900}
901
903static OT_ProcRet NS(LcSettingC_Type) (LcSettingC_ARGS) {
908 goto end;
909 error:
911 end:
913}
914
916// LcSettingC_Misc_TCL_API
917
921
922// doc-key: LcSettingC,LcSettingC-Set,oc_
923
925static OT_ProcRet NS(LcSettingC_SetBoolElem) (LcSettingC_ARGS) {
928 MK_I32 idx = 0;
930 MK_I32 value = 0;
933 LC_CFS retVal = LcSettingSetBoolElem (hdl, idx, value);
934 if (retVal == NULL) {
935 OT_ERROR_SOFT_CONSTRUCTOR(LcSettingC);
936 goto error;
937 }
938 OT_retObj_SET_CFS(retVal);
939 goto end;
940 error:
942 end:
944}
945
947static OT_ProcRet NS(LcSettingC_SetFloatElem) (LcSettingC_ARGS) {
950 MK_I32 idx = 0;
952 MK_DBL value = 0;
955 LC_CFS retVal = LcSettingSetFloatElem (hdl, idx, value);
956 if (retVal == NULL) {
957 OT_ERROR_SOFT_CONSTRUCTOR(LcSettingC);
958 goto error;
959 }
960 OT_retObj_SET_CFS(retVal);
961 goto end;
962 error:
964 end:
966}
967
969static OT_ProcRet NS(LcSettingC_SetInt64Elem) (LcSettingC_ARGS) {
972 MK_I32 idx = 0;
974 MK_I64 value = 0;
977 LC_CFS retVal = LcSettingSetInt64Elem (hdl, idx, value);
978 if (retVal == NULL) {
979 OT_ERROR_SOFT_CONSTRUCTOR(LcSettingC);
980 goto error;
981 }
982 OT_retObj_SET_CFS(retVal);
983 goto end;
984 error:
986 end:
988}
989
991static OT_ProcRet NS(LcSettingC_SetIntElem) (LcSettingC_ARGS) {
994 MK_I32 idx = 0;
996 MK_I32 value = 0;
999 LC_CFS retVal = LcSettingSetIntElem (hdl, idx, value);
1000 if (retVal == NULL) {
1001 OT_ERROR_SOFT_CONSTRUCTOR(LcSettingC);
1002 goto error;
1003 }
1004 OT_retObj_SET_CFS(retVal);
1005 goto end;
1006 error:
1008 end:
1010}
1011
1013static OT_ProcRet NS(LcSettingC_SetStringElem) (LcSettingC_ARGS) {
1016 MK_I32 idx = 0;
1018 MK_STRN value = 0;
1021 LC_CFS retVal = LcSettingSetStringElem (hdl, idx, value);
1022 if (retVal == NULL) {
1023 OT_ERROR_SOFT_CONSTRUCTOR(LcSettingC);
1024 goto error;
1025 }
1026 OT_retObj_SET_CFS(retVal);
1027 goto end;
1028 error:
1030 end:
1032}
1033
1034// doc-key: LcSettingC,LcSettingC-Set,om_
1035
1037static OT_ProcRet NS(LcSettingC_SetBool) (LcSettingC_ARGS) {
1040 MK_BOOL value = 0;
1043 MkErrorC_Check(hdl,LcSettingSetBool (hdl, value));
1045 goto end;
1046 error:
1048 end:
1050}
1051
1053static OT_ProcRet NS(LcSettingC_SetFloat) (LcSettingC_ARGS) {
1056 MK_DBL value = 0;
1059 MkErrorC_Check(hdl,LcSettingSetFloat (hdl, value));
1061 goto end;
1062 error:
1064 end:
1066}
1067
1069static OT_ProcRet NS(LcSettingC_SetFormat) (LcSettingC_ARGS) {
1072 enum LcConfigFormatE format = 0;
1075 MkErrorC_Check(hdl,LcSettingSetFormat (hdl, format));
1077 goto end;
1078 error:
1080 end:
1082}
1083
1085static OT_ProcRet NS(LcSettingC_SetInt) (LcSettingC_ARGS) {
1088 MK_I32 value = 0;
1091 MkErrorC_Check(hdl,LcSettingSetInt (hdl, value));
1093 goto end;
1094 error:
1096 end:
1098}
1099
1101static OT_ProcRet NS(LcSettingC_SetInt64) (LcSettingC_ARGS) {
1104 MK_I64 value = 0;
1107 MkErrorC_Check(hdl,LcSettingSetInt64 (hdl, value));
1109 goto end;
1110 error:
1112 end:
1114}
1115
1117static OT_ProcRet NS(LcSettingC_SetString) (LcSettingC_ARGS) {
1120 MK_STRN value = 0;
1123 MkErrorC_Check(hdl,LcSettingSetString (hdl, value));
1125 goto end;
1126 error:
1128 end:
1130}
1131
1133// LcSettingC_Set_TCL_API
1134
1138
1139// doc-key: LcSettingC,LcSettingC-TOR,oC_
1140
1142static OT_ProcRet NS(LcSettingC_Add) (LcSettingC_ARGS) {
1145 MK_STRN name = 0;
1147 enum LcConfigTypeE __type = 0;
1150 LC_CFS retVal = LcSettingAdd (hdl, name, __type);
1151 if (retVal == NULL) {
1152 OT_ERROR_CONSTRUCTOR(LcSettingC);
1153 goto error;
1154 }
1155 OT_retObj_SET_CFS(retVal);
1156 goto end;
1157 error:
1159 end:
1161}
1162
1163// doc-key: LcSettingC,LcSettingC-TOR,oc_
1164
1166static OT_ProcRet NS(LcSettingC_GetConfig) (LcSettingC_ARGS) {
1170 LC_CFG retVal = LcSettingGetConfig (hdl);
1171 OT_retObj_SET_CFG(retVal);
1172 goto end;
1173 error:
1175 end:
1177}
1178
1180// LcSettingC_TOR_TCL_API
1181
1182// END-LcSettingC - created by 'tcl_MqC.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
1183
1184// ---------------------------------------------------------------------------------------
1185
1186static Tcl_MethodType NS(sOtClassDef)[] = {
1187// BEGIN-CLASS - created by 'tcl_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
1188
1189// doc-key: LcSettingC,LcSetting,sc_
1190 {VER, "GetNull" , NS(LcSettingC_GetNull) , NULL, NULL},
1191 {VER, "HandleResolve" , NS(LcSettingC_HandleResolve) , NULL, NULL},
1192 {VER, "Instances" , NS(LcSettingC_Instances) , NULL, NULL},
1193
1194// END-CLASS - created by 'tcl_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
1195 {0, NULL, NULL, NULL}
1196};
1197
1198// ---------------------------------------------------------------------------------------
1199
1200static Tcl_MethodType NS(sInstanceDef)[] = {
1201// BEGIN-OBJ - created by 'tcl_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
1202
1203// doc-key: LcSettingC,LcSetting,oC_
1204 {VER, "Add" , NS(LcSettingC_Add) , NULL, NULL},
1205
1206// doc-key: LcSettingC,LcSetting,oc_
1207 {VER, "AddIfNotExists" , NS(LcSettingC_AddIfNotExists) , NULL, NULL},
1208 {VER, "GetConfig" , NS(LcSettingC_GetConfig) , NULL, NULL},
1209 {VER, "GetElem" , NS(LcSettingC_GetElem) , NULL, NULL},
1210 {VER, "GetMember" , NS(LcSettingC_GetMember) , NULL, NULL},
1211 {VER, "Lookup" , NS(LcSettingC_Lookup) , NULL, NULL},
1212 {VER, "LookupAll" , NS(LcSettingC_LookupAll) , NULL, NULL},
1213 {VER, "Next" , NS(LcSettingC_Next) , NULL, NULL},
1214 {VER, "Parent" , NS(LcSettingC_Parent) , NULL, NULL},
1215 {VER, "Prev" , NS(LcSettingC_Prev) , NULL, NULL},
1216 {VER, "SetBoolElem" , NS(LcSettingC_SetBoolElem) , NULL, NULL},
1217 {VER, "SetFloatElem" , NS(LcSettingC_SetFloatElem) , NULL, NULL},
1218 {VER, "SetInt64Elem" , NS(LcSettingC_SetInt64Elem) , NULL, NULL},
1219 {VER, "SetIntElem" , NS(LcSettingC_SetIntElem) , NULL, NULL},
1220 {VER, "SetStringElem" , NS(LcSettingC_SetStringElem) , NULL, NULL},
1221
1222// doc-key: LcSettingC,LcSetting,om_
1223 {VER, "Exists" , NS(LcSettingC_Exists) , NULL, NULL},
1224 {VER, "GetBool" , NS(LcSettingC_GetBool) , NULL, NULL},
1225 {VER, "GetBoolElem" , NS(LcSettingC_GetBoolElem) , NULL, NULL},
1226 {VER, "GetFloat" , NS(LcSettingC_GetFloat) , NULL, NULL},
1227 {VER, "GetFloatElem" , NS(LcSettingC_GetFloatElem) , NULL, NULL},
1228 {VER, "GetFormat" , NS(LcSettingC_GetFormat) , NULL, NULL},
1229 {VER, "GetInt" , NS(LcSettingC_GetInt) , NULL, NULL},
1230 {VER, "GetInt64" , NS(LcSettingC_GetInt64) , NULL, NULL},
1231 {VER, "GetInt64Elem" , NS(LcSettingC_GetInt64Elem) , NULL, NULL},
1232 {VER, "GetIntElem" , NS(LcSettingC_GetIntElem) , NULL, NULL},
1233 {VER, "GetString" , NS(LcSettingC_GetString) , NULL, NULL},
1234 {VER, "GetStringElem" , NS(LcSettingC_GetStringElem) , NULL, NULL},
1235 // skip class-overload: LcSettingHandleGet → HandleGet, NS(LcSettingC_HandleGet)
1236 {VER, "Index" , NS(LcSettingC_Index) , NULL, NULL},
1237 {VER, "IsAggregate" , NS(LcSettingC_IsAggregate) , NULL, NULL},
1238 {VER, "IsArray" , NS(LcSettingC_IsArray) , NULL, NULL},
1239 {VER, "IsGroup" , NS(LcSettingC_IsGroup) , NULL, NULL},
1240 {VER, "IsList" , NS(LcSettingC_IsList) , NULL, NULL},
1241 {VER, "IsNumber" , NS(LcSettingC_IsNumber) , NULL, NULL},
1242 {VER, "IsRoot" , NS(LcSettingC_IsRoot) , NULL, NULL},
1243 {VER, "IsScalar" , NS(LcSettingC_IsScalar) , NULL, NULL},
1244 {VER, "Length" , NS(LcSettingC_Length) , NULL, NULL},
1245 // skip class-overload: LcSettingLog → Log, NS(LcSettingC_Log)
1246 {VER, "Name" , NS(LcSettingC_Name) , NULL, NULL},
1247 {VER, "Remove" , NS(LcSettingC_Remove) , NULL, NULL},
1248 {VER, "RemoveElem" , NS(LcSettingC_RemoveElem) , NULL, NULL},
1249 {VER, "SetBool" , NS(LcSettingC_SetBool) , NULL, NULL},
1250 {VER, "SetFloat" , NS(LcSettingC_SetFloat) , NULL, NULL},
1251 {VER, "SetFormat" , NS(LcSettingC_SetFormat) , NULL, NULL},
1252 {VER, "SetInt" , NS(LcSettingC_SetInt) , NULL, NULL},
1253 {VER, "SetInt64" , NS(LcSettingC_SetInt64) , NULL, NULL},
1254 {VER, "SetString" , NS(LcSettingC_SetString) , NULL, NULL},
1255 {VER, "SourceFile" , NS(LcSettingC_SourceFile) , NULL, NULL},
1256 {VER, "SourceLine" , NS(LcSettingC_SourceLine) , NULL, NULL},
1257 {VER, "Type" , NS(LcSettingC_Type) , NULL, NULL},
1258
1259// doc-key: LcSettingC,LcSetting,omo
1260 {VER, "LookupBool" , NS(LcSettingC_LookupBool) , NULL, NULL},
1261 {VER, "LookupFloat" , NS(LcSettingC_LookupFloat) , NULL, NULL},
1262 {VER, "LookupInt" , NS(LcSettingC_LookupInt) , NULL, NULL},
1263 {VER, "LookupInt64" , NS(LcSettingC_LookupInt64) , NULL, NULL},
1264 {VER, "LookupString" , NS(LcSettingC_LookupString) , NULL, NULL},
1265
1266// END-OBJ - created by 'tcl_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
1267 {0, NULL, NULL, NULL, NULL}
1268};
1269
1275
1276int NS(pLcSettingC_Init) ( MK_RT_ARGS Tcl_Interp *interp, Tcl_Namespace *ns)
1277{
1278 ClassInit
1279
1280 return TCL_OK;
1281error:
1282 return TCL_ERROR;
1283}
#define Instances_doc
#define GetInt64_doc
#define Lookup_doc
#define GetInt64Elem_doc
#define GetConfig_doc
#define IsRoot_doc
#define OT_SETUP_hdl
#define LookupBool_doc
#define IsGroup_doc
#define GetBool_doc
#define GetStringElem_doc
#define SetString_doc
#define LookupFloat_doc
#define SetInt64Elem_doc
#define GetMember_doc
#define IsAggregate_doc
#define GetIntElem_doc
#define SetIntElem_doc
#define SetFormat_doc
#define GetNull_doc
static __thread MK_TYP LcSettingCTT
#define SetBoolElem_doc
#define Remove_doc
#define Next_doc
#define SetBool_doc
#define SetStringElem_doc
#define SetFloatElem_doc
#define HandleResolve_doc
#define SetFloat_doc
#define LookupInt_doc
#define GetFloatElem_doc
#define IsList_doc
#define Prev_doc
#define GetFormat_doc
#define VER
#define Index_doc
#define Parent_doc
#define GetInt_doc
#define IsArray_doc
#define OT_CLASS
#define LookupString_doc
#define OT_SETUP_hdl_static
#define Type_doc
#define Exists_doc
#define GetFloat_doc
#define AddIfNotExists_doc
#define GetBoolElem_doc
#define IsNumber_doc
#define SourceLine_doc
#define LookupInt64_doc
#define LookupAll_doc
#define SourceFile_doc
#define GetString_doc
#define IsScalar_doc
#define Length_doc
#define GetElem_doc
#define RemoveElem_doc
#define Add_doc
#define SetInt64_doc
#define ClassInit
#define Name_doc
#define SetInt_doc
LibLcConfig_private_tcl.h - 11 Apr 2025 - aotto1968.
#define OtClass_ARGS
#define OT_retObj_SET_CFG(nat)
#define OT_retObj_SET_CFS(nat)
#define NS(n)
#define LC(n)
#define OT_NEW_Lc_enum_OBJ(typ, val)
#define LcSettingC_ARGS
#define OT_CHECK_bool(val)
#define MK(n)
#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)
Tcl_Class OT_CLS_T
#define OT_ERROR_LNG_RETURN
#define OT_CHECK_NI4(val)
#define OT_CHECK_NI8(val)
#define OT_retObj_SET_Error
#define OT_CHECK_NF8(val)
#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)
#define OT_retObj_SET_BFL(nat)
#define OT_CHECK_ENUM(ename, val)
#define OT_retObj_RETURN
#define OT_retObj_SET_STR(nat)
Tcl_Object OT_SELF_T
#define OT_retObj_SET(val)
#define OT_CHECK_NOARGS
#define MkErrorC_Check(mng, PROC)
#define OT_ProcRet
Tcl_Interp * OT_ENV_T
#define OT_ERROR_SOFT_CONSTRUCTOR(class)
Tcl_Obj * OT_OBJ_T
#define OT_CHECK_STRN(val)
LcConfigFormatE
set the format of a LcSettingC …
Definition LcEnum_lc.h:33
LcConfigTypeE
define the data-type of a LcSettingC …
Definition LcEnum_lc.h:81
#define LcSettingHandleResolve(...)
static LC_CFS LcSettingPrev(LC_CFS const cfs)
get previous instance from linked-list of LcSettingS type
static LC_CFS LcSettingNext(LC_CFS const cfs)
get next instance from linked-list of LcSettingS type
#define LcSettingInstances()
static LC_CFS LcSettingGetNull(void)
Null-Slot - return a LcSettingC typed NULL instance …
static MK_STRN LcSettingGetString(LC_CFSN setting)
These functions return the value of the given setting …
static LC_CFG LcSettingGetConfig(LC_CFSN setting)
addon - return the LcConfigC from the LcSettingC …
static LC_CFS LcSettingGetElem(LC_CFSN setting, MK_I32 idx)
This function fetches the element at the given index index in the setting setting,...
static MK_BOOL LcSettingGetBool(LC_CFSN setting)
These functions return the value of the given setting …
static MK_DBL LcSettingGetFloat(LC_CFSN setting)
These functions return the value of the given setting …
static MK_BOOL LcSettingGetBoolElem(LC_CFSN setting, MK_I32 idx)
These functions return the value at the specified index index in the setting setting …
static MK_I64 LcSettingGetInt64Elem(LC_CFSN setting, MK_I32 idx)
These functions return the value at the specified index index in the setting setting …
static LC_CFS LcSettingGetMember(LC_CFSN setting, MK_STRN name)
This function fetches the child setting named name from the group setting …
static enum LcConfigFormatE LcSettingGetFormat(LC_CFSN setting)
These functions get and set the external format for the setting setting …
static MK_I32 LcSettingGetInt(LC_CFSN setting)
These functions return the value of the given setting …
static MK_I32 LcSettingGetIntElem(LC_CFSN setting, MK_I32 idx)
These functions return the value at the specified index index in the setting setting …
static MK_I64 LcSettingGetInt64(LC_CFSN setting)
These functions return the value of the given setting …
static MK_STRN LcSettingGetStringElem(LC_CFSN setting, MK_I32 idx)
These functions return the value at the specified index index in the setting setting …
static MK_DBL LcSettingGetFloatElem(LC_CFSN setting, MK_I32 idx)
These functions return the value at the specified index index in the setting setting …
static MK_BOOL LcSettingIsArray(LC_CFSN setting)
These convenience functions, which are implemented as macros, test if the setting setting is of a giv...
static MK_BOOL LcSettingIsNumber(LC_CFSN setting)
These convenience functions, some of which are implemented as macros, test if the setting setting is ...
static MK_BOOL LcSettingIsRoot(LC_CFSN setting)
This function returns CONFIG_TRUE if the given setting is the root setting, and CONFIG_FALSE otherwis...
static MK_BOOL LcSettingIsList(LC_CFSN setting)
These convenience functions, which are implemented as macros, test if the setting setting is of a giv...
static MK_BOOL LcSettingIsAggregate(LC_CFSN setting)
These convenience functions, some of which are implemented as macros, test if the setting setting is ...
static MK_BOOL LcSettingIsGroup(LC_CFSN setting)
These convenience functions, which are implemented as macros, test if the setting setting is of a giv...
static MK_BOOL LcSettingIsScalar(LC_CFSN setting)
These convenience functions, some of which are implemented as macros, test if the setting setting is ...
static enum MkErrorE LcSettingLookupString(LC_CFSN setting, MK_STRN name, MK_STRN *value_out)
These functions look up the value of the child setting named name of the setting setting …
static LC_CFS LcSettingLookup(LC_CFS setting, MK_STRN path)
This function locates a setting by a path path relative to the setting setting …
static enum MkErrorE LcSettingLookupBool(LC_CFSN setting, MK_STRN name, MK_BOOL *value_out)
These functions look up the value of the child setting named name of the setting setting …
static enum MkErrorE LcSettingLookupInt(LC_CFSN setting, MK_STRN name, MK_I32 *value_out)
These functions look up the value of the child setting named name of the setting setting …
static enum MkErrorE LcSettingLookupInt64(LC_CFSN setting, MK_STRN name, MK_I64 *value_out)
These functions look up the value of the child setting named name of the setting setting …
static enum MkErrorE LcSettingLookupFloat(LC_CFSN setting, MK_STRN name, MK_DBL *value_out)
These functions look up the value of the child setting named name of the setting setting …
MK_BFL LcSettingLookupAll(LC_CFSN setting)
addon - read an entire configuration below setting into MkBufferListC …
static LC_CFS LcSettingParent(LC_CFSN setting)
This function returns the parent setting of the given setting, or NULL if setting is the root setting...
static MK_I32 LcSettingIndex(LC_CFSN setting)
This function returns the index of the given setting within its parent setting …
static enum MkErrorE LcSettingRemoveElem(LC_CFS parent, MK_I32 idx)
This function removes the child setting at the given index index from the setting parent,...
static MK_STRN LcSettingName(LC_CFSN setting)
This function returns the name of the given setting, or NULL if the setting has no name …
static bool LcSettingExists(const LC_CFS setting, MK_STRN name)
addon - return true if name exists in the setting otherwise false …
static MK_I32 LcSettingSourceLine(LC_CFSN setting)
This function returns the line number of the configuration file or stream at which the setting settin...
static MK_STRN LcSettingSourceFile(LC_CFSN setting)
This function returns the name of the file from which the setting setting was read,...
static enum MkErrorE LcSettingRemove(LC_CFS parent, MK_STRN name)
This function removes and destroys the setting named name from the parent setting parent,...
static enum LcConfigTypeE LcSettingType(LC_CFSN setting)
This function returns the type of the given setting …
static MK_I32 LcSettingLength(LC_CFSN setting)
This function returns the number of settings in a group, or the number of elements in a list or array...
static LC_CFS LcSettingAddIfNotExists(LC_CFS setting, MK_STRN name, enum LcConfigTypeE cfgtype)
addon - add name with type only if not exists in the setting …
static LC_CFS LcSettingSetFloatElem(LC_CFS setting, MK_I32 idx, MK_DBL value)
These functions set the value at the specified index index in the setting setting to value …
static enum MkErrorE LcSettingSetInt64(LC_CFS setting, MK_I64 value)
These functions set the value of the given setting to value …
static enum MkErrorE LcSettingSetBool(LC_CFS setting, MK_BOOL value)
These functions set the value of the given setting to value …
static LC_CFS LcSettingSetIntElem(LC_CFS setting, MK_I32 idx, MK_I32 value)
These functions set the value at the specified index index in the setting setting to value …
static enum MkErrorE LcSettingSetString(LC_CFS setting, MK_STRN value)
These functions set the value of the given setting to value …
static enum MkErrorE LcSettingSetFormat(LC_CFS setting, enum LcConfigFormatE format)
These functions get and set the external format for the setting setting …
static LC_CFS LcSettingSetBoolElem(LC_CFS setting, MK_I32 idx, MK_I32 value)
These functions set the value at the specified index index in the setting setting to value …
static enum MkErrorE LcSettingSetFloat(LC_CFS setting, MK_DBL value)
These functions set the value of the given setting to value …
static LC_CFS LcSettingSetStringElem(LC_CFS setting, MK_I32 idx, MK_STRN value)
These functions set the value at the specified index index in the setting setting to value …
static LC_CFS LcSettingSetInt64Elem(LC_CFS setting, MK_I32 idx, MK_I64 value)
These functions set the value at the specified index index in the setting setting to value …
static enum MkErrorE LcSettingSetInt(LC_CFS setting, MK_I32 value)
These functions set the value of the given setting to value …
static LC_CFS LcSettingAdd(LC_CFS parent, MK_STRN name, enum LcConfigTypeE __type)
This function adds a new child setting or element to the setting parent, which must be a group,...
#define MK_UNUSED
#define MK_DEPRECATED
MK_PTRB * MK_PTR
const MK_STRB * MK_STRN
signed long long MK_I64
bool MK_BOOL
double MK_DBL
int32_t MK_HDL
signed int MK_I32
#define MkThreadLocal
#define MK_RT_CALL
#define MK_RT_ARGS
Struct to represent the data from the LcConfigC …
Struct to represent the data from the LcSettingC …