theConfig 10.0
Loading...
Searching...
No Matches
LcSettingC_tcl.c
Go to the documentation of this file.
1
9/* LABEL-START */
10
11#define META_FILE_NAME "LcSettingC_tcl.c"
12
14
15#define OT_CLASS NS(LcSettingC)
16#define OT_CLASS_NAME "LcSettingC"
17
18#define OBJECT2CFS(O) MkAssertCastM(LcSettingC,(Tcl_ObjectGetMetadata(O, &MK(AtomMeta))))
19
20// TCL class
22
23// META class
25MkThreadLocal OT_OBJ_T LC(LcSettingC_MK_NULL) = NULL;
26
27// META: ObjNew feature: selfCreate will be called from "ObjNew->MkSelfNew" if MkObj need a SELF pointer
28static MK_PTR NS(LcSettingC_selfCreate) (MK_RT_ARGS MK_OBJ const obj, MK_PTR const env) {
29 OT_ENV_T interp = env;
30 return MK(AtomCreate) (MK_RT_CALL interp,obj,OT_CLASS,NULL,NULL);
31}
32// META: is called when the META object is destroyed and SELF does NOT belongs to the META.
33static void NS(LcSettingC_selfDelete) (MK_RT_ARGS MK_PTR selfP, MK_PTR const env) {
34 OT_SELF_T selfO = selfP;
35 OT_ENV_T interp = env;
36 MK(AtomDeleteHard) (MK_RT_CALL interp, selfO);
37}
38// META: is called when the META object is destroyed and SELF does NOT belong to the META.
39static void NS(LcSettingC_selfUnlink) (MK_RT_ARGS MK_PTR selfP, MK_PTR const env) {
40 OT_SELF_T selfO = selfP;
41 OT_ENV_T interp = env;
42 MK(AtomUnlink) (MK_RT_CALL interp, selfO);
43}
44
45// ATTENTION: TCL has no "Unlink" because the "Tcl_ObjectSetMetadata(selfO,&MK(AtomMeta),NULL);" call
46// also the destructor
47
48#define OT_SETUP_hdl_static_constr_pre
49#define OT_SETUP_hdl_static_constr \
50 OT_SETUP_hdl_static_constr_pre; \
51 OT_SETUP_hdl_static
52
53#define OT_SETUP_hdl_static \
54 int __skip=Tcl_ObjectContextSkippedArgs(objCtx); \
55 AllRtSetup_NULL; \
56 __attribute__((unused)) OT_SELF_T selfO = Tcl_ObjectContextObject(objCtx); \
57 __attribute__((unused)) MK_TYP hdl = LcSettingC##_TT;
58
59#define OT_SETUP_hdl SetupHdlFromMetaData_2(CFS,LC_CFS);
60#define OT_SETUP_hdl__null_allow SetupHdlFromMetaData__null_allow_2(CFS,LC_CFS);
61#define OT_SETUP_hdl_destr SetupHdlFromMetaData__null_allow_2(CFS,LC_CFS);
62
63#define OT_SETUP_hdl_constr_pre
64#define OT_SETUP_hdl_constr \
65 OT_SETUP_hdl_constr_pre; \
66 int __skip=Tcl_ObjectContextSkippedArgs(objCtx); \
67 AllRtSetup_NULL; \
68 MK_RT_UNUSED OT_SELF_T selfO = Tcl_ObjectContextObject(objCtx); \
69 LC_CFS hdl = (LC_CFS) &MkERROR;
70
71#if !defined(SetupRtFromHdl_XN)
72 #define SetupRtFromHdl_XN(hdl) AllRtSetup_XN(hdl)
73 #define SetupRtFromHdl_X(hdl) AllRtSetup_X(hdl)
74#endif
75
76// initialize the TCL and MO class specific object
77#define ClassInit \
78 /* if not already done, initialize NEW MQ type */ \
79 if (LcSettingCTT == NULL) LcSettingCTT = LcSettingSTT; \
80 \
81 /* protect against double call */ \
82 if (LcSettingCTT->selfCreate == NS(LcSettingC_selfCreate)) return MK_OK; \
83 \
84 /* add "selfCreate" and "selfDelete" feature to the MQ-Class */ \
85 LcSettingCTT->selfCreate = NS(LcSettingC_selfCreate); \
86 LcSettingCTT->selfDelete = NS(LcSettingC_selfDelete); \
87 LcSettingCTT->selfUnlink = NS(LcSettingC_selfUnlink); \
88 \
89 /* create the TCL-class */ \
90 OT_SELF_T classO = MK(ClassDef)(interp,ns,LcSettingCTT); \
91 check_NULL(classO) goto error; \
92 OT_CLASS = Tcl_GetObjectAsClass(classO); \
93 \
94 /* create the TCL static Methods */ \
95 static MkThreadLocal OtUnknownS NS(sClassUnknown) = {OT_UNKNOWN_CLASS}; \
96 check_LNG(MK(UnknownSetup) (interp,classO,NS(sOtClassDef),&NS(sClassUnknown))) goto error; \
97 \
98 /* create the TCL instance Methods */ \
99 static MkThreadLocal OtUnknownS NS(sInstanceUnknown) = {OT_UNKNOWN_INSTANCE}; \
100 check_LNG(MK(UnknownSetup) (interp,classO,NS(sInstanceDef),&NS(sInstanceUnknown))) goto error; \
101 \
102 /* define the "NULL" object */ \
103 LC(LcSettingC_MK_NULL) = Tcl_GetObjectName(interp, \
104 MK(AtomCreate) (MK_RT_CALL interp, NULL /*obj*/, OT_CLASS, "MK_NULL" /*name*/, "::tcllcconfig::LcSettingC" /*ns*/) \
105 ); \
106 Tcl_IncrRefCount(LC(LcSettingC_MK_NULL));
107
108#define VER TCL_OO_METHOD_VERSION_CURRENT
109
110/* LABEL-END */
111
112// BEGIN-DOC - created by 'tcl_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
113
114// doc-key: LcSettingC,LcSetting,sc_,func
115#define GetNull_doc "LcSettingC [LcSettingC GetNull]"
116#define HandleResolve_doc "LcSettingC [LcSettingC HandleResolve netHdl:MK_HDL]"
117#define Instances_doc "LcSettingC [LcSettingC Instances]"
118
119// doc-key: LcSettingC,LcSetting,oC_,func
120#define Add_doc "LcSettingC [$parent Add name:string __type:LcConfigTypeE]"
121
122// doc-key: LcSettingC,LcSetting,oc_,func
123#define AddIfNotExists_doc "LcSettingC [$setting AddIfNotExists name:string cfgtype:LcConfigTypeE]"
124#define GetConfig_doc "LcConfigC [$setting GetConfig] (const)"
125#define GetElem_doc "LcSettingC [$setting GetElem idx:int32] (const)"
126#define GetMember_doc "LcSettingC [$setting GetMember name:string] (const)"
127#define Lookup_doc "LcSettingC [$setting Lookup path:string]"
128#define LookupAll_doc "MkBufferListC [$setting LookupAll] (const)"
129#define Next_doc "LcSettingC [$cfs Next]"
130#define Parent_doc "LcSettingC [$setting Parent] (const)"
131#define Prev_doc "LcSettingC [$cfs Prev]"
132#define SetBoolElem_doc "LcSettingC [$setting SetBoolElem idx:int32 value:int32]"
133#define SetFloatElem_doc "LcSettingC [$setting SetFloatElem idx:int32 value:double]"
134#define SetInt64Elem_doc "LcSettingC [$setting SetInt64Elem idx:int32 value:int64]"
135#define SetIntElem_doc "LcSettingC [$setting SetIntElem idx:int32 value:int32]"
136#define SetStringElem_doc "LcSettingC [$setting SetStringElem idx:int32 value:string]"
137
138// doc-key: LcSettingC,LcSetting,om_,func
139#define Exists_doc "bool [$setting Exists name:string]"
140#define GetBool_doc "bool [$setting GetBool] (const)"
141#define GetBoolElem_doc "bool [$setting GetBoolElem idx:int32] (const)"
142#define GetFloat_doc "double [$setting GetFloat] (const)"
143#define GetFloatElem_doc "double [$setting GetFloatElem idx:int32] (const)"
144#define GetFormat_doc "LcConfigFormatE [$setting GetFormat] (const)"
145#define GetInt_doc "int32 [$setting GetInt] (const)"
146#define GetInt64_doc "int64 [$setting GetInt64] (const)"
147#define GetInt64Elem_doc "int64 [$setting GetInt64Elem idx:int32] (const)"
148#define GetIntElem_doc "int32 [$setting GetIntElem idx:int32] (const)"
149#define GetString_doc "string [$setting GetString] (const)"
150#define GetStringElem_doc "string [$setting GetStringElem idx:int32] (const)"
151// skip class-overload: HandleGet → MkObjectHandleGet
152#define Index_doc "int32 [$setting Index] (const)"
153#define IsAggregate_doc "bool [$setting IsAggregate] (const)"
154#define IsArray_doc "bool [$setting IsArray] (const)"
155#define IsGroup_doc "bool [$setting IsGroup] (const)"
156#define IsList_doc "bool [$setting IsList] (const)"
157#define IsNumber_doc "bool [$setting IsNumber] (const)"
158#define IsRoot_doc "bool [$setting IsRoot] (const)"
159#define IsScalar_doc "bool [$setting IsScalar] (const)"
160#define Length_doc "int32 [$setting Length] (const)"
161// skip class-overload: Log → MkObjectLog
162#define Name_doc "string [$setting Name] (const)"
163#define Remove_doc "$parent Remove name:string"
164#define RemoveElem_doc "$parent RemoveElem idx:int32"
165#define SetBool_doc "$setting SetBool value:bool"
166#define SetFloat_doc "$setting SetFloat value:double"
167#define SetFormat_doc "$setting SetFormat format:LcConfigFormatE"
168#define SetInt_doc "$setting SetInt value:int32"
169#define SetInt64_doc "$setting SetInt64 value:int64"
170#define SetString_doc "$setting SetString value:string"
171#define SourceFile_doc "string [$setting SourceFile] (const)"
172#define SourceLine_doc "int32 [$setting SourceLine] (const)"
173#define Type_doc "LcConfigTypeE [$setting Type] (const)"
174
175// doc-key: LcSettingC,LcSetting,omo,func
176#define LookupBool_doc "bool [$setting LookupBool name:string] (const)"
177#define LookupFloat_doc "double [$setting LookupFloat name:string] (const)"
178#define LookupInt_doc "int32 [$setting LookupInt name:string] (const)"
179#define LookupInt64_doc "int64 [$setting LookupInt64 name:string] (const)"
180#define LookupString_doc "string [$setting LookupString name:string] (const)"
181
182// END-DOC - created by 'tcl_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
183
184/*****************************************************************************/
185/* */
186/* C O N / D E - S T R U C T O R */
187/* */
188/*****************************************************************************/
189
190/*****************************************************************************/
191/* */
192/* O B J E C T */
193/* */
194/*****************************************************************************/
195
196// BEGIN-LcSettingC - created by 'tcl_MqC.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
197
201
202// doc-key: LcSettingC,LcSettingC-Class-Export,sc_
203
205static OT_ProcRet NS(LcSettingC_HandleResolve) (OtClass_ARGS) {
208 MK_HDL netHdl = 0;
211 LC_CFS retVal = LcSettingHandleResolve (netHdl);
212 OT_retObj_SET_CFS(retVal);
213 goto end;
214 error:
216 end:
218}
219
220// doc-key: LcSettingC,LcSettingC-Class-Export,om_
221
222// skip on class-overload: LcSettingHandleGet → MkObjectHandleGet
224static OT_ProcRet NS(LcSettingC_HandleGet) (LcSettingC_ARGS) {OT_ERROR_LNG_RETURN;}
225
227// LcSettingC_Class_TCL_API
228
232
233// doc-key: LcSettingC,LcSettingC-Class-Introspection,oc_
234
236static OT_ProcRet NS(LcSettingC_Next) (LcSettingC_ARGS) {
240 LC_CFS retVal = LcSettingNext (hdl);
241 OT_retObj_SET_CFS(retVal);
242 goto end;
243 error:
245 end:
247}
248
250static OT_ProcRet NS(LcSettingC_Prev) (LcSettingC_ARGS) {
254 LC_CFS retVal = LcSettingPrev (hdl);
255 OT_retObj_SET_CFS(retVal);
256 goto end;
257 error:
259 end:
261}
262
263// doc-key: LcSettingC,LcSettingC-Class-Introspection,sc_
264
266static OT_ProcRet NS(LcSettingC_Instances) (OtClass_ARGS) {
270 LC_CFS retVal = LcSettingInstances ();
271 OT_retObj_SET_CFS(retVal);
272 goto end;
273 error:
275 end:
277}
278
280// LcSettingC_Class_TCL_API
281
285
286// doc-key: LcSettingC,LcSettingC-Class-Misc,sc_
287
289static OT_ProcRet NS(LcSettingC_GetNull) (OtClass_ARGS) {
293 LC_CFS retVal = LcSettingGetNull ();
294 OT_retObj_SET_CFS(retVal);
295 goto end;
296 error:
298 end:
300}
301
303// LcSettingC_Class_TCL_API
304
308
309// doc-key: LcSettingC,LcSettingC-Get,oc_
310
312static OT_ProcRet NS(LcSettingC_GetElem) (LcSettingC_ARGS) {
315 MK_I32 idx = 0;
318 LC_CFS retVal = LcSettingGetElem (hdl, idx);
319 if (retVal == NULL) {
320 OT_ERROR_SOFT_CONSTRUCTOR(LcSettingC);
321 goto error;
322 }
323 OT_retObj_SET_CFS(retVal);
324 goto end;
325 error:
327 end:
329}
330
332static OT_ProcRet NS(LcSettingC_GetMember) (LcSettingC_ARGS) {
335 MK_STRN name = 0;
338 LC_CFS retVal = LcSettingGetMember (hdl, name);
339 if (retVal == NULL) {
340 OT_ERROR_SOFT_CONSTRUCTOR(LcSettingC);
341 goto error;
342 }
343 OT_retObj_SET_CFS(retVal);
344 goto end;
345 error:
347 end:
349}
350
351// doc-key: LcSettingC,LcSettingC-Get,om_
352
354static OT_ProcRet NS(LcSettingC_GetBool) (LcSettingC_ARGS) {
359 goto end;
360 error:
362 end:
364}
365
367static OT_ProcRet NS(LcSettingC_GetBoolElem) (LcSettingC_ARGS) {
370 MK_I32 idx = 0;
374 goto end;
375 error:
377 end:
379}
380
382static OT_ProcRet NS(LcSettingC_GetFloat) (LcSettingC_ARGS) {
387 goto end;
388 error:
390 end:
392}
393
395static OT_ProcRet NS(LcSettingC_GetFloatElem) (LcSettingC_ARGS) {
398 MK_I32 idx = 0;
402 goto end;
403 error:
405 end:
407}
408
410static OT_ProcRet NS(LcSettingC_GetFormat) (LcSettingC_ARGS) {
415 goto end;
416 error:
418 end:
420}
421
423static OT_ProcRet NS(LcSettingC_GetInt) (LcSettingC_ARGS) {
428 goto end;
429 error:
431 end:
433}
434
436static OT_ProcRet NS(LcSettingC_GetInt64) (LcSettingC_ARGS) {
441 goto end;
442 error:
444 end:
446}
447
449static OT_ProcRet NS(LcSettingC_GetInt64Elem) (LcSettingC_ARGS) {
452 MK_I32 idx = 0;
456 goto end;
457 error:
459 end:
461}
462
464static OT_ProcRet NS(LcSettingC_GetIntElem) (LcSettingC_ARGS) {
467 MK_I32 idx = 0;
471 goto end;
472 error:
474 end:
476}
477
479static OT_ProcRet NS(LcSettingC_GetString) (LcSettingC_ARGS) {
484 goto end;
485 error:
487 end:
489}
490
492static OT_ProcRet NS(LcSettingC_GetStringElem) (LcSettingC_ARGS) {
495 MK_I32 idx = 0;
499 goto end;
500 error:
502 end:
504}
505
507// LcSettingC_Get_TCL_API
508
512
513// doc-key: LcSettingC,LcSettingC-Is,om_
514
516static OT_ProcRet NS(LcSettingC_IsAggregate) (LcSettingC_ARGS) {
521 goto end;
522 error:
524 end:
526}
527
529static OT_ProcRet NS(LcSettingC_IsArray) (LcSettingC_ARGS) {
534 goto end;
535 error:
537 end:
539}
540
542static OT_ProcRet NS(LcSettingC_IsGroup) (LcSettingC_ARGS) {
547 goto end;
548 error:
550 end:
552}
553
555static OT_ProcRet NS(LcSettingC_IsList) (LcSettingC_ARGS) {
560 goto end;
561 error:
563 end:
565}
566
568static OT_ProcRet NS(LcSettingC_IsNumber) (LcSettingC_ARGS) {
573 goto end;
574 error:
576 end:
578}
579
581static OT_ProcRet NS(LcSettingC_IsRoot) (LcSettingC_ARGS) {
586 goto end;
587 error:
589 end:
591}
592
594static OT_ProcRet NS(LcSettingC_IsScalar) (LcSettingC_ARGS) {
599 goto end;
600 error:
602 end:
604}
605
607// LcSettingC_Is_TCL_API
608
612
613// doc-key: LcSettingC,LcSettingC-Lookup,oc_
614
616static OT_ProcRet NS(LcSettingC_Lookup) (LcSettingC_ARGS) {
619 MK_STRN path = 0;
622 LC_CFS retVal = LcSettingLookup (hdl, path);
623 if (retVal == NULL) {
624 OT_ERROR_SOFT_CONSTRUCTOR(LcSettingC);
625 goto error;
626 }
627 OT_retObj_SET_CFS(retVal);
628 goto end;
629 error:
631 end:
633}
634
636static OT_ProcRet NS(LcSettingC_LookupAll) (LcSettingC_ARGS) {
640 MK_BFL retVal = LcSettingLookupAll (hdl);
641 OT_retObj_SET_BFL(retVal);
642 goto end;
643 error:
645 end:
647}
648
649// doc-key: LcSettingC,LcSettingC-Lookup,omo
650
652static OT_ProcRet NS(LcSettingC_LookupBool) (LcSettingC_ARGS) {
655 MK_STRN name = 0;
658 MK_BOOL value_out;
659 MkErrorC_Check(hdl,LcSettingLookupBool (hdl, name, &value_out));
660 OT_retObj_SET_BOL(value_out);
661 goto end;
662 error:
664 end:
666}
667
669static OT_ProcRet NS(LcSettingC_LookupFloat) (LcSettingC_ARGS) {
672 MK_STRN name = 0;
675 MK_DBL value_out;
676 MkErrorC_Check(hdl,LcSettingLookupFloat (hdl, name, &value_out));
677 OT_retObj_SET_DBL(value_out);
678 goto end;
679 error:
681 end:
683}
684
686static OT_ProcRet NS(LcSettingC_LookupInt) (LcSettingC_ARGS) {
689 MK_STRN name = 0;
692 MK_I32 value_out;
693 MkErrorC_Check(hdl,LcSettingLookupInt (hdl, name, &value_out));
694 OT_retObj_SET_I32(value_out);
695 goto end;
696 error:
698 end:
700}
701
703static OT_ProcRet NS(LcSettingC_LookupInt64) (LcSettingC_ARGS) {
706 MK_STRN name = 0;
709 MK_I64 value_out;
710 MkErrorC_Check(hdl,LcSettingLookupInt64 (hdl, name, &value_out));
711 OT_retObj_SET_I64(value_out);
712 goto end;
713 error:
715 end:
717}
718
720static OT_ProcRet NS(LcSettingC_LookupString) (LcSettingC_ARGS) {
723 MK_STRN name = 0;
726 MK_STRN value_out;
727 MkErrorC_Check(hdl,LcSettingLookupString (hdl, name, &value_out));
728 OT_retObj_SET_STR(value_out);
729 goto end;
730 error:
732 end:
734}
735
737// LcSettingC_Lookup_TCL_API
738
742
743// doc-key: LcSettingC,LcSettingC-Misc,oc_
744
746static OT_ProcRet NS(LcSettingC_AddIfNotExists) (LcSettingC_ARGS) {
749 MK_STRN name = 0;
751 enum LcConfigTypeE cfgtype = 0;
754 LC_CFS retVal = LcSettingAddIfNotExists (hdl, name, cfgtype);
755 OT_retObj_SET_CFS(retVal);
756 goto end;
757 error:
759 end:
761}
762
764static OT_ProcRet NS(LcSettingC_Parent) (LcSettingC_ARGS) {
768 LC_CFS retVal = LcSettingParent (hdl);
769 if (retVal == NULL) {
770 OT_ERROR_SOFT_CONSTRUCTOR(LcSettingC);
771 goto error;
772 }
773 OT_retObj_SET_CFS(retVal);
774 goto end;
775 error:
777 end:
779}
780
781// doc-key: LcSettingC,LcSettingC-Misc,om_
782
784static OT_ProcRet NS(LcSettingC_Exists) (LcSettingC_ARGS) {
787 MK_STRN name = 0;
791 goto end;
792 error:
794 end:
796}
797
799static OT_ProcRet NS(LcSettingC_Index) (LcSettingC_ARGS) {
804 goto end;
805 error:
807 end:
809}
810
812static OT_ProcRet NS(LcSettingC_Length) (LcSettingC_ARGS) {
817 goto end;
818 error:
820 end:
822}
823
824// skip on class-overload: LcSettingLog → MkObjectLog
827
829static OT_ProcRet NS(LcSettingC_Name) (LcSettingC_ARGS) {
834 goto end;
835 error:
837 end:
839}
840
842static OT_ProcRet NS(LcSettingC_Remove) (LcSettingC_ARGS) {
845 MK_STRN name = 0;
848 MkErrorC_Check(hdl,LcSettingRemove (hdl, name));
850 goto end;
851 error:
853 end:
855}
856
858static OT_ProcRet NS(LcSettingC_RemoveElem) (LcSettingC_ARGS) {
861 MK_I32 idx = 0;
864 MkErrorC_Check(hdl,LcSettingRemoveElem (hdl, idx));
866 goto end;
867 error:
869 end:
871}
872
874static OT_ProcRet NS(LcSettingC_SourceFile) (LcSettingC_ARGS) {
879 goto end;
880 error:
882 end:
884}
885
887static OT_ProcRet NS(LcSettingC_SourceLine) (LcSettingC_ARGS) {
892 goto end;
893 error:
895 end:
897}
898
900static OT_ProcRet NS(LcSettingC_Type) (LcSettingC_ARGS) {
905 goto end;
906 error:
908 end:
910}
911
913// LcSettingC_Misc_TCL_API
914
918
919// doc-key: LcSettingC,LcSettingC-Set,oc_
920
922static OT_ProcRet NS(LcSettingC_SetBoolElem) (LcSettingC_ARGS) {
925 MK_I32 idx = 0;
927 MK_I32 value = 0;
930 LC_CFS retVal = LcSettingSetBoolElem (hdl, idx, value);
931 if (retVal == NULL) {
932 OT_ERROR_SOFT_CONSTRUCTOR(LcSettingC);
933 goto error;
934 }
935 OT_retObj_SET_CFS(retVal);
936 goto end;
937 error:
939 end:
941}
942
944static OT_ProcRet NS(LcSettingC_SetFloatElem) (LcSettingC_ARGS) {
947 MK_I32 idx = 0;
949 MK_DBL value = 0;
952 LC_CFS retVal = LcSettingSetFloatElem (hdl, idx, value);
953 if (retVal == NULL) {
954 OT_ERROR_SOFT_CONSTRUCTOR(LcSettingC);
955 goto error;
956 }
957 OT_retObj_SET_CFS(retVal);
958 goto end;
959 error:
961 end:
963}
964
966static OT_ProcRet NS(LcSettingC_SetInt64Elem) (LcSettingC_ARGS) {
969 MK_I32 idx = 0;
971 MK_I64 value = 0;
974 LC_CFS retVal = LcSettingSetInt64Elem (hdl, idx, value);
975 if (retVal == NULL) {
976 OT_ERROR_SOFT_CONSTRUCTOR(LcSettingC);
977 goto error;
978 }
979 OT_retObj_SET_CFS(retVal);
980 goto end;
981 error:
983 end:
985}
986
988static OT_ProcRet NS(LcSettingC_SetIntElem) (LcSettingC_ARGS) {
991 MK_I32 idx = 0;
993 MK_I32 value = 0;
996 LC_CFS retVal = LcSettingSetIntElem (hdl, idx, value);
997 if (retVal == NULL) {
998 OT_ERROR_SOFT_CONSTRUCTOR(LcSettingC);
999 goto error;
1000 }
1001 OT_retObj_SET_CFS(retVal);
1002 goto end;
1003 error:
1005 end:
1007}
1008
1010static OT_ProcRet NS(LcSettingC_SetStringElem) (LcSettingC_ARGS) {
1013 MK_I32 idx = 0;
1015 MK_STRN value = 0;
1018 LC_CFS retVal = LcSettingSetStringElem (hdl, idx, value);
1019 if (retVal == NULL) {
1020 OT_ERROR_SOFT_CONSTRUCTOR(LcSettingC);
1021 goto error;
1022 }
1023 OT_retObj_SET_CFS(retVal);
1024 goto end;
1025 error:
1027 end:
1029}
1030
1031// doc-key: LcSettingC,LcSettingC-Set,om_
1032
1034static OT_ProcRet NS(LcSettingC_SetBool) (LcSettingC_ARGS) {
1037 MK_BOOL value = 0;
1040 MkErrorC_Check(hdl,LcSettingSetBool (hdl, value));
1042 goto end;
1043 error:
1045 end:
1047}
1048
1050static OT_ProcRet NS(LcSettingC_SetFloat) (LcSettingC_ARGS) {
1053 MK_DBL value = 0;
1056 MkErrorC_Check(hdl,LcSettingSetFloat (hdl, value));
1058 goto end;
1059 error:
1061 end:
1063}
1064
1066static OT_ProcRet NS(LcSettingC_SetFormat) (LcSettingC_ARGS) {
1069 enum LcConfigFormatE format = 0;
1072 MkErrorC_Check(hdl,LcSettingSetFormat (hdl, format));
1074 goto end;
1075 error:
1077 end:
1079}
1080
1082static OT_ProcRet NS(LcSettingC_SetInt) (LcSettingC_ARGS) {
1085 MK_I32 value = 0;
1088 MkErrorC_Check(hdl,LcSettingSetInt (hdl, value));
1090 goto end;
1091 error:
1093 end:
1095}
1096
1098static OT_ProcRet NS(LcSettingC_SetInt64) (LcSettingC_ARGS) {
1101 MK_I64 value = 0;
1104 MkErrorC_Check(hdl,LcSettingSetInt64 (hdl, value));
1106 goto end;
1107 error:
1109 end:
1111}
1112
1114static OT_ProcRet NS(LcSettingC_SetString) (LcSettingC_ARGS) {
1117 MK_STRN value = 0;
1120 MkErrorC_Check(hdl,LcSettingSetString (hdl, value));
1122 goto end;
1123 error:
1125 end:
1127}
1128
1130// LcSettingC_Set_TCL_API
1131
1135
1136// doc-key: LcSettingC,LcSettingC-TOR,oC_
1137
1139static OT_ProcRet NS(LcSettingC_Add) (LcSettingC_ARGS) {
1142 MK_STRN name = 0;
1144 enum LcConfigTypeE __type = 0;
1147 LC_CFS retVal = LcSettingAdd (hdl, name, __type);
1148 if (retVal == NULL) {
1149 OT_ERROR_CONSTRUCTOR(LcSettingC);
1150 goto error;
1151 }
1152 OT_retObj_SET_CFS(retVal);
1153 goto end;
1154 error:
1156 end:
1158}
1159
1160// doc-key: LcSettingC,LcSettingC-TOR,oc_
1161
1163static OT_ProcRet NS(LcSettingC_GetConfig) (LcSettingC_ARGS) {
1167 LC_CFG retVal = LcSettingGetConfig (hdl);
1168 OT_retObj_SET_CFG(retVal);
1169 goto end;
1170 error:
1172 end:
1174}
1175
1177// LcSettingC_TOR_TCL_API
1178
1179// END-LcSettingC - created by 'tcl_MqC.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
1180
1181// ---------------------------------------------------------------------------------------
1182
1183static Tcl_MethodType NS(sOtClassDef)[] = {
1184// BEGIN-CLASS - created by 'tcl_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
1185
1186// doc-key: LcSettingC,LcSetting,sc_
1187 {VER, "GetNull" , NS(LcSettingC_GetNull) , NULL, NULL},
1188 {VER, "HandleResolve" , NS(LcSettingC_HandleResolve) , NULL, NULL},
1189 {VER, "Instances" , NS(LcSettingC_Instances) , NULL, NULL},
1190
1191// END-CLASS - created by 'tcl_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
1192 {0, NULL, NULL, NULL}
1193};
1194
1195// ---------------------------------------------------------------------------------------
1196
1197static Tcl_MethodType NS(sInstanceDef)[] = {
1198// BEGIN-OBJ - created by 'tcl_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
1199
1200// doc-key: LcSettingC,LcSetting,oC_
1201 {VER, "Add" , NS(LcSettingC_Add) , NULL, NULL},
1202
1203// doc-key: LcSettingC,LcSetting,oc_
1204 {VER, "AddIfNotExists" , NS(LcSettingC_AddIfNotExists) , NULL, NULL},
1205 {VER, "GetConfig" , NS(LcSettingC_GetConfig) , NULL, NULL},
1206 {VER, "GetElem" , NS(LcSettingC_GetElem) , NULL, NULL},
1207 {VER, "GetMember" , NS(LcSettingC_GetMember) , NULL, NULL},
1208 {VER, "Lookup" , NS(LcSettingC_Lookup) , NULL, NULL},
1209 {VER, "LookupAll" , NS(LcSettingC_LookupAll) , NULL, NULL},
1210 {VER, "Next" , NS(LcSettingC_Next) , NULL, NULL},
1211 {VER, "Parent" , NS(LcSettingC_Parent) , NULL, NULL},
1212 {VER, "Prev" , NS(LcSettingC_Prev) , NULL, NULL},
1213 {VER, "SetBoolElem" , NS(LcSettingC_SetBoolElem) , NULL, NULL},
1214 {VER, "SetFloatElem" , NS(LcSettingC_SetFloatElem) , NULL, NULL},
1215 {VER, "SetInt64Elem" , NS(LcSettingC_SetInt64Elem) , NULL, NULL},
1216 {VER, "SetIntElem" , NS(LcSettingC_SetIntElem) , NULL, NULL},
1217 {VER, "SetStringElem" , NS(LcSettingC_SetStringElem) , NULL, NULL},
1218
1219// doc-key: LcSettingC,LcSetting,om_
1220 {VER, "Exists" , NS(LcSettingC_Exists) , NULL, NULL},
1221 {VER, "GetBool" , NS(LcSettingC_GetBool) , NULL, NULL},
1222 {VER, "GetBoolElem" , NS(LcSettingC_GetBoolElem) , NULL, NULL},
1223 {VER, "GetFloat" , NS(LcSettingC_GetFloat) , NULL, NULL},
1224 {VER, "GetFloatElem" , NS(LcSettingC_GetFloatElem) , NULL, NULL},
1225 {VER, "GetFormat" , NS(LcSettingC_GetFormat) , NULL, NULL},
1226 {VER, "GetInt" , NS(LcSettingC_GetInt) , NULL, NULL},
1227 {VER, "GetInt64" , NS(LcSettingC_GetInt64) , NULL, NULL},
1228 {VER, "GetInt64Elem" , NS(LcSettingC_GetInt64Elem) , NULL, NULL},
1229 {VER, "GetIntElem" , NS(LcSettingC_GetIntElem) , NULL, NULL},
1230 {VER, "GetString" , NS(LcSettingC_GetString) , NULL, NULL},
1231 {VER, "GetStringElem" , NS(LcSettingC_GetStringElem) , NULL, NULL},
1232 // skip class-overload: LcSettingHandleGet → HandleGet, NS(LcSettingC_HandleGet)
1233 {VER, "Index" , NS(LcSettingC_Index) , NULL, NULL},
1234 {VER, "IsAggregate" , NS(LcSettingC_IsAggregate) , NULL, NULL},
1235 {VER, "IsArray" , NS(LcSettingC_IsArray) , NULL, NULL},
1236 {VER, "IsGroup" , NS(LcSettingC_IsGroup) , NULL, NULL},
1237 {VER, "IsList" , NS(LcSettingC_IsList) , NULL, NULL},
1238 {VER, "IsNumber" , NS(LcSettingC_IsNumber) , NULL, NULL},
1239 {VER, "IsRoot" , NS(LcSettingC_IsRoot) , NULL, NULL},
1240 {VER, "IsScalar" , NS(LcSettingC_IsScalar) , NULL, NULL},
1241 {VER, "Length" , NS(LcSettingC_Length) , NULL, NULL},
1242 // skip class-overload: LcSettingLog → Log, NS(LcSettingC_Log)
1243 {VER, "Name" , NS(LcSettingC_Name) , NULL, NULL},
1244 {VER, "Remove" , NS(LcSettingC_Remove) , NULL, NULL},
1245 {VER, "RemoveElem" , NS(LcSettingC_RemoveElem) , NULL, NULL},
1246 {VER, "SetBool" , NS(LcSettingC_SetBool) , NULL, NULL},
1247 {VER, "SetFloat" , NS(LcSettingC_SetFloat) , NULL, NULL},
1248 {VER, "SetFormat" , NS(LcSettingC_SetFormat) , NULL, NULL},
1249 {VER, "SetInt" , NS(LcSettingC_SetInt) , NULL, NULL},
1250 {VER, "SetInt64" , NS(LcSettingC_SetInt64) , NULL, NULL},
1251 {VER, "SetString" , NS(LcSettingC_SetString) , NULL, NULL},
1252 {VER, "SourceFile" , NS(LcSettingC_SourceFile) , NULL, NULL},
1253 {VER, "SourceLine" , NS(LcSettingC_SourceLine) , NULL, NULL},
1254 {VER, "Type" , NS(LcSettingC_Type) , NULL, NULL},
1255
1256// doc-key: LcSettingC,LcSetting,omo
1257 {VER, "LookupBool" , NS(LcSettingC_LookupBool) , NULL, NULL},
1258 {VER, "LookupFloat" , NS(LcSettingC_LookupFloat) , NULL, NULL},
1259 {VER, "LookupInt" , NS(LcSettingC_LookupInt) , NULL, NULL},
1260 {VER, "LookupInt64" , NS(LcSettingC_LookupInt64) , NULL, NULL},
1261 {VER, "LookupString" , NS(LcSettingC_LookupString) , NULL, NULL},
1262
1263// END-OBJ - created by 'tcl_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
1264 {0, NULL, NULL, NULL, NULL}
1265};
1266
1272
1273int NS(pLcSettingC_Init) ( MK_RT_ARGS Tcl_Interp *interp, Tcl_Namespace *ns)
1274{
1275 ClassInit
1276
1277 return TCL_OK;
1278error:
1279 return TCL_ERROR;
1280}
#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
tag: nhi1-release-250425
#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:30
LcConfigTypeE
define the data-type of a LcSettingC …
Definition LcEnum_lc.h:78
#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 …