theConfig 10.0
Loading...
Searching...
No Matches
LcSettingC_atl.c
Go to the documentation of this file.
1
9/* LABEL-START */
10
11#define META_FILE_NAME "LcSettingC_atl.c"
12
14
15#define OT_CLASS alcrt->AtlLcSettingC
16#define OT_NULL alcrt->AtlLcSettingC_MK_NULL
17#define OT_CLASS_NAME "LcSettingC"
18
19#define SELF2HDL(O) LcCfs(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(LcSettingC_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(LcSettingC_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(LcSettingC_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_CFS)
48#define OT_SETUP_hdl__null_allow SetupHdlFromMetaData__null_allow_2(LC_CFS)
49#define OT_SETUP_hdl_destr SetupHdlFromMetaData__null_allow_2(LC_CFS)
50#define OT_SETUP_hdl_constr SetupHdlConstr(LcSettingC)
51#define OT_SETUP_hdl_static_constr OT_SETUP_hdl_static
52#define OT_SETUP_hdl_static SetupHdlStatic(LcSettingC)
53
54#define OT_retObj_CONSTR(x) OT_retObj_SET(AtomInit(OT_SELF,LcSettingC_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 (LcSettingCTT == NULL) LcSettingCTT = LcSettingSTT; \
60 \
61 /* protect against double call */ \
62 if (LcSettingCTT->selfCreate == NS(LcSettingC_selfCreate)) return MK_OK; \
63 \
64 /* add "selfCreate" and "selfDelete" feature to the META-Class */ \
65 LcSettingCTT->selfCreate = NS(LcSettingC_selfCreate); \
66 LcSettingCTT->selfDelete = NS(LcSettingC_selfDelete); \
67 LcSettingCTT->selfUnlink = NS(LcSettingC_selfUnlink); \
68 \
69 /* create the ATL-class */ \
70 OT_CLASS = AltClassDef(LcSettingCTT,&alcrt->AtlLcSettingC_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, "::LcSettingC::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: LcSettingC,LcSetting,sc_,func
94#define GetNull_doc "LcSettingC [LcSettingC::GetNull]"
95#define HandleResolve_doc "LcSettingC [LcSettingC::HandleResolve netHdl:MK_HDL]"
96#define Instances_doc "LcSettingC [LcSettingC::Instances]"
97
98// doc-key: LcSettingC,LcSetting,oC_,func
99#define Add_doc "LcSettingC [LcSettingC::Add $parent name:string __type:LcConfigTypeE]"
100
101// doc-key: LcSettingC,LcSetting,oc_,func
102#define AddIfNotExists_doc "LcSettingC [LcSettingC::AddIfNotExists $setting name:string cfgtype:LcConfigTypeE]"
103#define GetConfig_doc "LcConfigC [LcSettingC::GetConfig $setting] (const)"
104#define GetElem_doc "LcSettingC [LcSettingC::GetElem $setting idx:int32] (const)"
105#define GetMember_doc "LcSettingC [LcSettingC::GetMember $setting name:string] (const)"
106#define Lookup_doc "LcSettingC [LcSettingC::Lookup $setting path:string]"
107#define LookupAll_doc "MkBufferListC [LcSettingC::LookupAll $setting] (const)"
108#define Next_doc "LcSettingC [LcSettingC::Next $cfs]"
109#define Parent_doc "LcSettingC [LcSettingC::Parent $setting] (const)"
110#define Prev_doc "LcSettingC [LcSettingC::Prev $cfs]"
111#define SetBoolElem_doc "LcSettingC [LcSettingC::SetBoolElem $setting idx:int32 value:int32]"
112#define SetFloatElem_doc "LcSettingC [LcSettingC::SetFloatElem $setting idx:int32 value:double]"
113#define SetInt64Elem_doc "LcSettingC [LcSettingC::SetInt64Elem $setting idx:int32 value:int64]"
114#define SetIntElem_doc "LcSettingC [LcSettingC::SetIntElem $setting idx:int32 value:int32]"
115#define SetStringElem_doc "LcSettingC [LcSettingC::SetStringElem $setting idx:int32 value:string]"
116
117// doc-key: LcSettingC,LcSetting,om_,func
118#define Exists_doc "bool [LcSettingC::Exists $setting name:string]"
119#define GetBool_doc "bool [LcSettingC::GetBool $setting] (const)"
120#define GetBoolElem_doc "bool [LcSettingC::GetBoolElem $setting idx:int32] (const)"
121#define GetFloat_doc "double [LcSettingC::GetFloat $setting] (const)"
122#define GetFloatElem_doc "double [LcSettingC::GetFloatElem $setting idx:int32] (const)"
123#define GetFormat_doc "LcConfigFormatE [LcSettingC::GetFormat $setting] (const)"
124#define GetInt_doc "int32 [LcSettingC::GetInt $setting] (const)"
125#define GetInt64_doc "int64 [LcSettingC::GetInt64 $setting] (const)"
126#define GetInt64Elem_doc "int64 [LcSettingC::GetInt64Elem $setting idx:int32] (const)"
127#define GetIntElem_doc "int32 [LcSettingC::GetIntElem $setting idx:int32] (const)"
128#define GetString_doc "string [LcSettingC::GetString $setting] (const)"
129#define GetStringElem_doc "string [LcSettingC::GetStringElem $setting idx:int32] (const)"
130// skip class-overload: HandleGet → MkObjectHandleGet
131#define Index_doc "int32 [LcSettingC::Index $setting] (const)"
132#define IsAggregate_doc "bool [LcSettingC::IsAggregate $setting] (const)"
133#define IsArray_doc "bool [LcSettingC::IsArray $setting] (const)"
134#define IsGroup_doc "bool [LcSettingC::IsGroup $setting] (const)"
135#define IsList_doc "bool [LcSettingC::IsList $setting] (const)"
136#define IsNumber_doc "bool [LcSettingC::IsNumber $setting] (const)"
137#define IsRoot_doc "bool [LcSettingC::IsRoot $setting] (const)"
138#define IsScalar_doc "bool [LcSettingC::IsScalar $setting] (const)"
139#define Length_doc "int32 [LcSettingC::Length $setting] (const)"
140// skip class-overload: Log → MkObjectLog
141#define Name_doc "string [LcSettingC::Name $setting] (const)"
142#define Remove_doc "LcSettingC::Remove $parent name:string"
143#define RemoveElem_doc "LcSettingC::RemoveElem $parent idx:int32"
144#define SetBool_doc "LcSettingC::SetBool $setting value:bool"
145#define SetFloat_doc "LcSettingC::SetFloat $setting value:double"
146#define SetFormat_doc "LcSettingC::SetFormat $setting format:LcConfigFormatE"
147#define SetInt_doc "LcSettingC::SetInt $setting value:int32"
148#define SetInt64_doc "LcSettingC::SetInt64 $setting value:int64"
149#define SetString_doc "LcSettingC::SetString $setting value:string"
150#define SourceFile_doc "string [LcSettingC::SourceFile $setting] (const)"
151#define SourceLine_doc "int32 [LcSettingC::SourceLine $setting] (const)"
152#define Type_doc "LcConfigTypeE [LcSettingC::Type $setting] (const)"
153
154// doc-key: LcSettingC,LcSetting,omo,func
155#define LookupBool_doc "bool [LcSettingC::LookupBool $setting name:string] (const)"
156#define LookupFloat_doc "double [LcSettingC::LookupFloat $setting name:string] (const)"
157#define LookupInt_doc "int32 [LcSettingC::LookupInt $setting name:string] (const)"
158#define LookupInt64_doc "int64 [LcSettingC::LookupInt64 $setting name:string] (const)"
159#define LookupString_doc "string [LcSettingC::LookupString $setting name:string] (const)"
160
161// END-DOC - created by 'atl_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
162
163/*****************************************************************************/
164/* */
165/* C O N / D E - S T R U C T O R */
166/* */
167/*****************************************************************************/
168
169/*****************************************************************************/
170/* */
171/* O B J E C T */
172/* */
173/*****************************************************************************/
174
175// BEGIN-LcSettingC - created by 'atl_MqC.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
176
180
181// doc-key: LcSettingC,LcSettingC-Class-Export,sc_
182
184static OT_ProcRet NS(LcSettingC_HandleResolve) (OtClass_ARGS) {
187 MK_HDL netHdl = 0;
190 LC_CFS retVal = LcSettingHandleResolve (netHdl);
191 OT_retObj_SET_CFS(retVal);
192 goto end;
193 error:
195 end:
197}
198
199// doc-key: LcSettingC,LcSettingC-Class-Export,om_
200
201// skip on class-overload: LcSettingHandleGet → MkObjectHandleGet
203static OT_ProcRet NS(LcSettingC_HandleGet) (LcSettingC_ARGS) {OT_ERROR_LNG_RETURN;}
204
206// LcSettingC_Class_ATL_API
207
211
212// doc-key: LcSettingC,LcSettingC-Class-Introspection,oc_
213
215static OT_ProcRet NS(LcSettingC_Next) (LcSettingC_ARGS) {
219 LC_CFS retVal = LcSettingNext (hdl);
220 OT_retObj_SET_CFS(retVal);
221 goto end;
222 error:
224 end:
226}
227
229static OT_ProcRet NS(LcSettingC_Prev) (LcSettingC_ARGS) {
233 LC_CFS retVal = LcSettingPrev (hdl);
234 OT_retObj_SET_CFS(retVal);
235 goto end;
236 error:
238 end:
240}
241
242// doc-key: LcSettingC,LcSettingC-Class-Introspection,sc_
243
245static OT_ProcRet NS(LcSettingC_Instances) (OtClass_ARGS) {
249 LC_CFS retVal = LcSettingInstances ();
250 OT_retObj_SET_CFS(retVal);
251 goto end;
252 error:
254 end:
256}
257
259// LcSettingC_Class_ATL_API
260
264
265// doc-key: LcSettingC,LcSettingC-Class-Misc,sc_
266
268static OT_ProcRet NS(LcSettingC_GetNull) (OtClass_ARGS) {
272 LC_CFS retVal = LcSettingGetNull ();
273 OT_retObj_SET_CFS(retVal);
274 goto end;
275 error:
277 end:
279}
280
282// LcSettingC_Class_ATL_API
283
287
288// doc-key: LcSettingC,LcSettingC-Get,oc_
289
291static OT_ProcRet NS(LcSettingC_GetElem) (LcSettingC_ARGS) {
294 MK_I32 idx = 0;
297 LC_CFS retVal = LcSettingGetElem (hdl, idx);
298 if (retVal == NULL) {
299 OT_ERROR_SOFT_CONSTRUCTOR(LcSettingC);
300 goto error;
301 }
302 OT_retObj_SET_CFS(retVal);
303 goto end;
304 error:
306 end:
308}
309
311static OT_ProcRet NS(LcSettingC_GetMember) (LcSettingC_ARGS) {
314 MK_STRN name = 0;
317 LC_CFS retVal = LcSettingGetMember (hdl, name);
318 if (retVal == NULL) {
319 OT_ERROR_SOFT_CONSTRUCTOR(LcSettingC);
320 goto error;
321 }
322 OT_retObj_SET_CFS(retVal);
323 goto end;
324 error:
326 end:
328}
329
330// doc-key: LcSettingC,LcSettingC-Get,om_
331
333static OT_ProcRet NS(LcSettingC_GetBool) (LcSettingC_ARGS) {
338 goto end;
339 error:
341 end:
343}
344
346static OT_ProcRet NS(LcSettingC_GetBoolElem) (LcSettingC_ARGS) {
349 MK_I32 idx = 0;
353 goto end;
354 error:
356 end:
358}
359
361static OT_ProcRet NS(LcSettingC_GetFloat) (LcSettingC_ARGS) {
366 goto end;
367 error:
369 end:
371}
372
374static OT_ProcRet NS(LcSettingC_GetFloatElem) (LcSettingC_ARGS) {
377 MK_I32 idx = 0;
381 goto end;
382 error:
384 end:
386}
387
389static OT_ProcRet NS(LcSettingC_GetFormat) (LcSettingC_ARGS) {
394 goto end;
395 error:
397 end:
399}
400
402static OT_ProcRet NS(LcSettingC_GetInt) (LcSettingC_ARGS) {
407 goto end;
408 error:
410 end:
412}
413
415static OT_ProcRet NS(LcSettingC_GetInt64) (LcSettingC_ARGS) {
420 goto end;
421 error:
423 end:
425}
426
428static OT_ProcRet NS(LcSettingC_GetInt64Elem) (LcSettingC_ARGS) {
431 MK_I32 idx = 0;
435 goto end;
436 error:
438 end:
440}
441
443static OT_ProcRet NS(LcSettingC_GetIntElem) (LcSettingC_ARGS) {
446 MK_I32 idx = 0;
450 goto end;
451 error:
453 end:
455}
456
458static OT_ProcRet NS(LcSettingC_GetString) (LcSettingC_ARGS) {
463 goto end;
464 error:
466 end:
468}
469
471static OT_ProcRet NS(LcSettingC_GetStringElem) (LcSettingC_ARGS) {
474 MK_I32 idx = 0;
478 goto end;
479 error:
481 end:
483}
484
486// LcSettingC_Get_ATL_API
487
491
492// doc-key: LcSettingC,LcSettingC-Is,om_
493
495static OT_ProcRet NS(LcSettingC_IsAggregate) (LcSettingC_ARGS) {
500 goto end;
501 error:
503 end:
505}
506
508static OT_ProcRet NS(LcSettingC_IsArray) (LcSettingC_ARGS) {
513 goto end;
514 error:
516 end:
518}
519
521static OT_ProcRet NS(LcSettingC_IsGroup) (LcSettingC_ARGS) {
526 goto end;
527 error:
529 end:
531}
532
534static OT_ProcRet NS(LcSettingC_IsList) (LcSettingC_ARGS) {
539 goto end;
540 error:
542 end:
544}
545
547static OT_ProcRet NS(LcSettingC_IsNumber) (LcSettingC_ARGS) {
552 goto end;
553 error:
555 end:
557}
558
560static OT_ProcRet NS(LcSettingC_IsRoot) (LcSettingC_ARGS) {
565 goto end;
566 error:
568 end:
570}
571
573static OT_ProcRet NS(LcSettingC_IsScalar) (LcSettingC_ARGS) {
578 goto end;
579 error:
581 end:
583}
584
586// LcSettingC_Is_ATL_API
587
591
592// doc-key: LcSettingC,LcSettingC-Lookup,oc_
593
595static OT_ProcRet NS(LcSettingC_Lookup) (LcSettingC_ARGS) {
598 MK_STRN path = 0;
601 LC_CFS retVal = LcSettingLookup (hdl, path);
602 if (retVal == NULL) {
603 OT_ERROR_SOFT_CONSTRUCTOR(LcSettingC);
604 goto error;
605 }
606 OT_retObj_SET_CFS(retVal);
607 goto end;
608 error:
610 end:
612}
613
615static OT_ProcRet NS(LcSettingC_LookupAll) (LcSettingC_ARGS) {
619 MK_BFL retVal = LcSettingLookupAll (hdl);
620 OT_retObj_SET_BFL(retVal);
621 goto end;
622 error:
624 end:
626}
627
628// doc-key: LcSettingC,LcSettingC-Lookup,omo
629
631static OT_ProcRet NS(LcSettingC_LookupBool) (LcSettingC_ARGS) {
634 MK_STRN name = 0;
637 MK_BOOL value_out;
638 MkErrorC_Check(hdl,LcSettingLookupBool (hdl, name, &value_out));
639 OT_retObj_SET_BOL(value_out);
640 goto end;
641 error:
643 end:
645}
646
648static OT_ProcRet NS(LcSettingC_LookupFloat) (LcSettingC_ARGS) {
651 MK_STRN name = 0;
654 MK_DBL value_out;
655 MkErrorC_Check(hdl,LcSettingLookupFloat (hdl, name, &value_out));
656 OT_retObj_SET_DBL(value_out);
657 goto end;
658 error:
660 end:
662}
663
665static OT_ProcRet NS(LcSettingC_LookupInt) (LcSettingC_ARGS) {
668 MK_STRN name = 0;
671 MK_I32 value_out;
672 MkErrorC_Check(hdl,LcSettingLookupInt (hdl, name, &value_out));
673 OT_retObj_SET_I32(value_out);
674 goto end;
675 error:
677 end:
679}
680
682static OT_ProcRet NS(LcSettingC_LookupInt64) (LcSettingC_ARGS) {
685 MK_STRN name = 0;
688 MK_I64 value_out;
689 MkErrorC_Check(hdl,LcSettingLookupInt64 (hdl, name, &value_out));
690 OT_retObj_SET_I64(value_out);
691 goto end;
692 error:
694 end:
696}
697
699static OT_ProcRet NS(LcSettingC_LookupString) (LcSettingC_ARGS) {
702 MK_STRN name = 0;
705 MK_STRN value_out;
706 MkErrorC_Check(hdl,LcSettingLookupString (hdl, name, &value_out));
707 OT_retObj_SET_STR(value_out);
708 goto end;
709 error:
711 end:
713}
714
716// LcSettingC_Lookup_ATL_API
717
721
722// doc-key: LcSettingC,LcSettingC-Misc,oc_
723
725static OT_ProcRet NS(LcSettingC_AddIfNotExists) (LcSettingC_ARGS) {
728 MK_STRN name = 0;
730 enum LcConfigTypeE cfgtype = 0;
733 LC_CFS retVal = LcSettingAddIfNotExists (hdl, name, cfgtype);
734 OT_retObj_SET_CFS(retVal);
735 goto end;
736 error:
738 end:
740}
741
743static OT_ProcRet NS(LcSettingC_Parent) (LcSettingC_ARGS) {
747 LC_CFS retVal = LcSettingParent (hdl);
748 if (retVal == NULL) {
749 OT_ERROR_SOFT_CONSTRUCTOR(LcSettingC);
750 goto error;
751 }
752 OT_retObj_SET_CFS(retVal);
753 goto end;
754 error:
756 end:
758}
759
760// doc-key: LcSettingC,LcSettingC-Misc,om_
761
763static OT_ProcRet NS(LcSettingC_Exists) (LcSettingC_ARGS) {
766 MK_STRN name = 0;
770 goto end;
771 error:
773 end:
775}
776
778static OT_ProcRet NS(LcSettingC_Index) (LcSettingC_ARGS) {
783 goto end;
784 error:
786 end:
788}
789
791static OT_ProcRet NS(LcSettingC_Length) (LcSettingC_ARGS) {
796 goto end;
797 error:
799 end:
801}
802
803// skip on class-overload: LcSettingLog → MkObjectLog
806
808static OT_ProcRet NS(LcSettingC_Name) (LcSettingC_ARGS) {
813 goto end;
814 error:
816 end:
818}
819
821static OT_ProcRet NS(LcSettingC_Remove) (LcSettingC_ARGS) {
824 MK_STRN name = 0;
827 MkErrorC_Check(hdl,LcSettingRemove (hdl, name));
829 goto end;
830 error:
832 end:
834}
835
837static OT_ProcRet NS(LcSettingC_RemoveElem) (LcSettingC_ARGS) {
840 MK_I32 idx = 0;
843 MkErrorC_Check(hdl,LcSettingRemoveElem (hdl, idx));
845 goto end;
846 error:
848 end:
850}
851
853static OT_ProcRet NS(LcSettingC_SourceFile) (LcSettingC_ARGS) {
858 goto end;
859 error:
861 end:
863}
864
866static OT_ProcRet NS(LcSettingC_SourceLine) (LcSettingC_ARGS) {
871 goto end;
872 error:
874 end:
876}
877
879static OT_ProcRet NS(LcSettingC_Type) (LcSettingC_ARGS) {
884 goto end;
885 error:
887 end:
889}
890
892// LcSettingC_Misc_ATL_API
893
897
898// doc-key: LcSettingC,LcSettingC-Set,oc_
899
901static OT_ProcRet NS(LcSettingC_SetBoolElem) (LcSettingC_ARGS) {
904 MK_I32 idx = 0;
906 MK_I32 value = 0;
909 LC_CFS retVal = LcSettingSetBoolElem (hdl, idx, value);
910 if (retVal == NULL) {
911 OT_ERROR_SOFT_CONSTRUCTOR(LcSettingC);
912 goto error;
913 }
914 OT_retObj_SET_CFS(retVal);
915 goto end;
916 error:
918 end:
920}
921
923static OT_ProcRet NS(LcSettingC_SetFloatElem) (LcSettingC_ARGS) {
926 MK_I32 idx = 0;
928 MK_DBL value = 0;
931 LC_CFS retVal = LcSettingSetFloatElem (hdl, idx, value);
932 if (retVal == NULL) {
933 OT_ERROR_SOFT_CONSTRUCTOR(LcSettingC);
934 goto error;
935 }
936 OT_retObj_SET_CFS(retVal);
937 goto end;
938 error:
940 end:
942}
943
945static OT_ProcRet NS(LcSettingC_SetInt64Elem) (LcSettingC_ARGS) {
948 MK_I32 idx = 0;
950 MK_I64 value = 0;
953 LC_CFS retVal = LcSettingSetInt64Elem (hdl, idx, value);
954 if (retVal == NULL) {
955 OT_ERROR_SOFT_CONSTRUCTOR(LcSettingC);
956 goto error;
957 }
958 OT_retObj_SET_CFS(retVal);
959 goto end;
960 error:
962 end:
964}
965
967static OT_ProcRet NS(LcSettingC_SetIntElem) (LcSettingC_ARGS) {
970 MK_I32 idx = 0;
972 MK_I32 value = 0;
975 LC_CFS retVal = LcSettingSetIntElem (hdl, idx, value);
976 if (retVal == NULL) {
977 OT_ERROR_SOFT_CONSTRUCTOR(LcSettingC);
978 goto error;
979 }
980 OT_retObj_SET_CFS(retVal);
981 goto end;
982 error:
984 end:
986}
987
989static OT_ProcRet NS(LcSettingC_SetStringElem) (LcSettingC_ARGS) {
992 MK_I32 idx = 0;
994 MK_STRN value = 0;
997 LC_CFS retVal = LcSettingSetStringElem (hdl, idx, value);
998 if (retVal == NULL) {
999 OT_ERROR_SOFT_CONSTRUCTOR(LcSettingC);
1000 goto error;
1001 }
1002 OT_retObj_SET_CFS(retVal);
1003 goto end;
1004 error:
1006 end:
1008}
1009
1010// doc-key: LcSettingC,LcSettingC-Set,om_
1011
1013static OT_ProcRet NS(LcSettingC_SetBool) (LcSettingC_ARGS) {
1016 MK_BOOL value = 0;
1019 MkErrorC_Check(hdl,LcSettingSetBool (hdl, value));
1021 goto end;
1022 error:
1024 end:
1026}
1027
1029static OT_ProcRet NS(LcSettingC_SetFloat) (LcSettingC_ARGS) {
1032 MK_DBL value = 0;
1035 MkErrorC_Check(hdl,LcSettingSetFloat (hdl, value));
1037 goto end;
1038 error:
1040 end:
1042}
1043
1045static OT_ProcRet NS(LcSettingC_SetFormat) (LcSettingC_ARGS) {
1048 enum LcConfigFormatE format = 0;
1051 MkErrorC_Check(hdl,LcSettingSetFormat (hdl, format));
1053 goto end;
1054 error:
1056 end:
1058}
1059
1061static OT_ProcRet NS(LcSettingC_SetInt) (LcSettingC_ARGS) {
1064 MK_I32 value = 0;
1067 MkErrorC_Check(hdl,LcSettingSetInt (hdl, value));
1069 goto end;
1070 error:
1072 end:
1074}
1075
1077static OT_ProcRet NS(LcSettingC_SetInt64) (LcSettingC_ARGS) {
1080 MK_I64 value = 0;
1083 MkErrorC_Check(hdl,LcSettingSetInt64 (hdl, value));
1085 goto end;
1086 error:
1088 end:
1090}
1091
1093static OT_ProcRet NS(LcSettingC_SetString) (LcSettingC_ARGS) {
1096 MK_STRN value = 0;
1099 MkErrorC_Check(hdl,LcSettingSetString (hdl, value));
1101 goto end;
1102 error:
1104 end:
1106}
1107
1109// LcSettingC_Set_ATL_API
1110
1114
1115// doc-key: LcSettingC,LcSettingC-TOR,oC_
1116
1118static OT_ProcRet NS(LcSettingC_Add) (LcSettingC_ARGS) {
1121 MK_STRN name = 0;
1123 enum LcConfigTypeE __type = 0;
1126 LC_CFS retVal = LcSettingAdd (hdl, name, __type);
1127 if (retVal == NULL) {
1128 OT_ERROR_CONSTRUCTOR(LcSettingC);
1129 goto error;
1130 }
1131 OT_retObj_SET_CFS(retVal);
1132 goto end;
1133 error:
1135 end:
1137}
1138
1139// doc-key: LcSettingC,LcSettingC-TOR,oc_
1140
1142static OT_ProcRet NS(LcSettingC_GetConfig) (LcSettingC_ARGS) {
1146 LC_CFG retVal = LcSettingGetConfig (hdl);
1147 OT_retObj_SET_CFG(retVal);
1148 goto end;
1149 error:
1151 end:
1153}
1154
1156// LcSettingC_TOR_ATL_API
1157
1158// END-LcSettingC - created by 'atl_MqC.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
1159
1160// ---------------------------------------------------------------------------------------
1161
1162static const OtObjProcDefS NS(sOtClassDef)[] = {
1163 // BEGIN-CLASS - created by 'atl_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
1164
1165 // doc-key: LcSettingC,LcSetting,sc_
1166 { "::LcSettingC::GetNull" , NS(LcSettingC_GetNull) },
1167 { "::LcSettingC::HandleResolve" , NS(LcSettingC_HandleResolve) },
1168 { "::LcSettingC::Instances" , NS(LcSettingC_Instances) },
1169
1170 // END-CLASS - created by 'atl_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
1171 { NULL }
1172};
1173
1174// ---------------------------------------------------------------------------------------
1175
1176static const OtObjProcDefS NS(sInstanceDef)[] = {
1177 // BEGIN-OBJ - created by 'atl_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
1178
1179 // doc-key: LcSettingC,LcSetting,oC_
1180 { "::LcSettingC::Add" , NS(LcSettingC_Add) },
1181
1182 // doc-key: LcSettingC,LcSetting,oc_
1183 { "::LcSettingC::AddIfNotExists" , NS(LcSettingC_AddIfNotExists) },
1184 { "::LcSettingC::GetConfig" , NS(LcSettingC_GetConfig) },
1185 { "::LcSettingC::GetElem" , NS(LcSettingC_GetElem) },
1186 { "::LcSettingC::GetMember" , NS(LcSettingC_GetMember) },
1187 { "::LcSettingC::Lookup" , NS(LcSettingC_Lookup) },
1188 { "::LcSettingC::LookupAll" , NS(LcSettingC_LookupAll) },
1189 { "::LcSettingC::Next" , NS(LcSettingC_Next) },
1190 { "::LcSettingC::Parent" , NS(LcSettingC_Parent) },
1191 { "::LcSettingC::Prev" , NS(LcSettingC_Prev) },
1192 { "::LcSettingC::SetBoolElem" , NS(LcSettingC_SetBoolElem) },
1193 { "::LcSettingC::SetFloatElem" , NS(LcSettingC_SetFloatElem) },
1194 { "::LcSettingC::SetInt64Elem" , NS(LcSettingC_SetInt64Elem) },
1195 { "::LcSettingC::SetIntElem" , NS(LcSettingC_SetIntElem) },
1196 { "::LcSettingC::SetStringElem" , NS(LcSettingC_SetStringElem) },
1197
1198 // doc-key: LcSettingC,LcSetting,om_
1199 { "::LcSettingC::Exists" , NS(LcSettingC_Exists) },
1200 { "::LcSettingC::GetBool" , NS(LcSettingC_GetBool) },
1201 { "::LcSettingC::GetBoolElem" , NS(LcSettingC_GetBoolElem) },
1202 { "::LcSettingC::GetFloat" , NS(LcSettingC_GetFloat) },
1203 { "::LcSettingC::GetFloatElem" , NS(LcSettingC_GetFloatElem) },
1204 { "::LcSettingC::GetFormat" , NS(LcSettingC_GetFormat) },
1205 { "::LcSettingC::GetInt" , NS(LcSettingC_GetInt) },
1206 { "::LcSettingC::GetInt64" , NS(LcSettingC_GetInt64) },
1207 { "::LcSettingC::GetInt64Elem" , NS(LcSettingC_GetInt64Elem) },
1208 { "::LcSettingC::GetIntElem" , NS(LcSettingC_GetIntElem) },
1209 { "::LcSettingC::GetString" , NS(LcSettingC_GetString) },
1210 { "::LcSettingC::GetStringElem" , NS(LcSettingC_GetStringElem) },
1211 // skip class-overload: HandleGet → MkObjectHandleGet
1212 { "::LcSettingC::Index" , NS(LcSettingC_Index) },
1213 { "::LcSettingC::IsAggregate" , NS(LcSettingC_IsAggregate) },
1214 { "::LcSettingC::IsArray" , NS(LcSettingC_IsArray) },
1215 { "::LcSettingC::IsGroup" , NS(LcSettingC_IsGroup) },
1216 { "::LcSettingC::IsList" , NS(LcSettingC_IsList) },
1217 { "::LcSettingC::IsNumber" , NS(LcSettingC_IsNumber) },
1218 { "::LcSettingC::IsRoot" , NS(LcSettingC_IsRoot) },
1219 { "::LcSettingC::IsScalar" , NS(LcSettingC_IsScalar) },
1220 { "::LcSettingC::Length" , NS(LcSettingC_Length) },
1221 // skip class-overload: Log → MkObjectLog
1222 { "::LcSettingC::Name" , NS(LcSettingC_Name) },
1223 { "::LcSettingC::Remove" , NS(LcSettingC_Remove) },
1224 { "::LcSettingC::RemoveElem" , NS(LcSettingC_RemoveElem) },
1225 { "::LcSettingC::SetBool" , NS(LcSettingC_SetBool) },
1226 { "::LcSettingC::SetFloat" , NS(LcSettingC_SetFloat) },
1227 { "::LcSettingC::SetFormat" , NS(LcSettingC_SetFormat) },
1228 { "::LcSettingC::SetInt" , NS(LcSettingC_SetInt) },
1229 { "::LcSettingC::SetInt64" , NS(LcSettingC_SetInt64) },
1230 { "::LcSettingC::SetString" , NS(LcSettingC_SetString) },
1231 { "::LcSettingC::SourceFile" , NS(LcSettingC_SourceFile) },
1232 { "::LcSettingC::SourceLine" , NS(LcSettingC_SourceLine) },
1233 { "::LcSettingC::Type" , NS(LcSettingC_Type) },
1234
1235 // doc-key: LcSettingC,LcSetting,omo
1236 { "::LcSettingC::LookupBool" , NS(LcSettingC_LookupBool) },
1237 { "::LcSettingC::LookupFloat" , NS(LcSettingC_LookupFloat) },
1238 { "::LcSettingC::LookupInt" , NS(LcSettingC_LookupInt) },
1239 { "::LcSettingC::LookupInt64" , NS(LcSettingC_LookupInt64) },
1240 { "::LcSettingC::LookupString" , NS(LcSettingC_LookupString) },
1241
1242 // END-OBJ - created by 'atl_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
1243 { NULL }
1244};
1245
1251
1252int NS(pLcSettingC_Init) ( OT_LC_ARGS OT_NS_T ns )
1253{
1254 ClassInit
1255
1256 return TCL_OK;
1257error:
1258 return TCL_ERROR;
1259}
#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
#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 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
#define OtClass_ARGS
#define OT_LC_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)
#define LcSettingC_ARGS
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)
#define OT_CHECK_NI8(val)
MOX_NS_T OT_NS_T
#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)
MOX_OBJ_T OT_SELF_T
#define OT_retObj_SET_BFL(nat)
#define OT_CHECK_ENUM(ename, val)
#define OT_retObj_RETURN
#define OT_MK_CALL
#define OT_retObj_SET_STR(nat)
#define OT_retObj_SET(val)
#define OT_CHECK_NOARGS
#define MkErrorC_Check(mng, PROC)
#define OT_ProcRet
#define OT_ERROR_SOFT_CONSTRUCTOR(class)
#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 MK_RT_ARGS
Struct to represent the data from the LcConfigC …
Struct to represent the data from the LcSettingC …