theConfig 10.0
Loading...
Searching...
No Matches
LcSettingC_rb.c
Go to the documentation of this file.
1
9/* LABEL-START */
10#define META_FILE_NAME "LcSettingC_rb.c"
11
13
14#define OT_CLASS NS(LcSettingC)
15#define OT_CLASS_NAME "LcSettingC"
16
17#define OT_LNG2META(O) LcCfs(VAL2MNG(O))
18
20
21// new Class type object
22static MK_TYP LcSettingCTT = NULL;
24
25// GS marker in "Data_Wrap_Struct"
26static void NS(sMark) (MK_PTR);
27
28// ruby datatype of the wrapped struct
29static rb_data_type_t NS(LcSettingC_T) = {
30 "LcSettingC",
31 {
32 NS(sMark),
33 MK(AtomDeleteSoft),
34 0, /* dsize */
35 0, /* reserved[1] */
36 },
37 NULL, /* parent */
38 NULL, /* data */
39 RUBY_TYPED_FREE_IMMEDIATELY
40};
41
42// >>THIS<< is a Phase-1-CONSTRUCTOR: a constructor which create the SELF object
43// A Phase-2-CONSTRUCTOR is a constructor which configure an already existing object
44// DO: create a new SELF and link this SELF with the MQ-Object "mng"
45// clazz is the toplevel "subclass" or "LcSettingC"
46mk_inline OT_OBJ_T NS(LNG_CONSTR) (OT_CLS_T clazz, MK_MNG mng, int objc, VALUE* objv) {
47 return MK(AtomObjCrt)(clazz,&NS(LcSettingC_T),mng,objc,objv);
48}
49// MQ: ObjNew feature: called to return a new or an already existing RUBY-SELF-Object
50// -> moved to: msgque_rb.h
51// OT_OBJ_T NS(LcSettingC_ObjNew) (MK_CFS hdl) {
52// return MK(AtomObjNew) (LcSettingC_X2obj(hdl));
53// }
54// MQ: ObjNew feature: selfCreate will be called from "ObjNew->MkSelfNew" if MkObj need a SELF pointer
55static MK_PTR NS(LcSettingC_selfCreate) (MK_RT_ARGS MK_OBJ obj, MK_PTR envP) {
56 OT_OBJ_T self = NS(LNG_CONSTR) (OT_CLASS, obj, 0, NULL);
57 return VAL2PTR(self);
58}
59// MQ: called on instance-destruction for a "selfCreate" instance → goal: destroy the SELF
60static void NS(LcSettingC_selfDelete) (MK_RT_ARGS MK_PTR ptr, MK_PTR envP) {
62}
63// MQ: called to destroy link from SELF to META
64static void NS(LcSettingC_selfUnlink) (MK_RT_ARGS MK_PTR ptr, MK_PTR envP) {
65 OT_OBJ_T self = PTR2VAL(ptr);
66 RDATA(self)->data = NULL;
67}
68// initialize the RUBY and MO class specific object
69#define S_INIT NS(sInit)(MK_RT_CALL_ONLY)
70static void NS(sInit)(MK_RT_ARGS_ONLY) {
71
72 // add "selfCreate" and "selfDelete" feature to the MQ-LcSettingC-Type
73 LcSettingCTT->selfCreate = NS(LcSettingC_selfCreate);
74 LcSettingCTT->selfDelete = NS(LcSettingC_selfDelete);
75 LcSettingCTT->selfUnlink = NS(LcSettingC_selfUnlink);
76
77 // create the RUBY class
78 OT_CLASS = rb_define_class_under(OT_PKG, "LcSettingC", MK_BASE_CLASS);
79 rb_undef_alloc_func(OT_CLASS);
80
81 /* define the "NULL" object */
82 VALUE nullO = TypedData_Wrap_Struct (OT_CLASS, &NS(LcSettingC_T), MK_NULL);
83 NS(LcSettingC_MK_NULL) = nullO;
85}
86
87#define OT_SETUP_hdl OT_SETUP_hdl_tmpl(LcSettingC);
88#define OT_SETUP_hdl__null_allow OT_SETUP_hdl_tmpl__null_allow(LcSettingC);
89#define OT_SETUP_hdl_constr AllRtSetup_NULL; \
90 OT_OBJ_T clazz = self; \
91 LcSettingC_type hdl = (LcSettingC_type) &MkERROR;
92#define OT_SETUP_hdl_destr OT_SETUP_hdl_tmpl__null_allow(LcSettingC);
93#define OT_SETUP_hdl_static AllRtSetup_NULL; \
94 __attribute__((unused)) MK_TYP hdl = LcSettingC##_TT;
95#define OT_SETUP_hdl_static_constr OT_SETUP_hdl_static
96
97#if !defined(SetupRtFromObj_X)
98 #define SetupRtFromObj_X(hdl) AllRtSetup_X(hdl)
99 #define SetupRtFromObj_XN(hdl) AllRtSetup_XN(hdl)
100#endif
101
102/* LABEL-END */
103
104// BEGIN-DOC - created by 'rb_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
105
106// doc-key: LcSettingC,LcSetting,sc_,func
107#define GetNull_doc "LcSettingC LcSettingC.GetNull()"
108#define HandleResolve_doc "LcSettingC LcSettingC.HandleResolve(netHdl:MK_HDL)"
109#define Instances_doc "LcSettingC LcSettingC.Instances()"
110
111// doc-key: LcSettingC,LcSetting,oC_,func
112#define Add_doc "LcSettingC parent.Add(name:string, __type:LcConfigTypeE)"
113
114// doc-key: LcSettingC,LcSetting,oc_,func
115#define AddIfNotExists_doc "LcSettingC setting.AddIfNotExists(name:string, cfgtype:LcConfigTypeE)"
116#define GetConfig_doc "LcConfigC setting.GetConfig() (const)"
117#define GetElem_doc "LcSettingC setting.GetElem(idx:int32) (const)"
118#define GetMember_doc "LcSettingC setting.GetMember(name:string) (const)"
119#define Lookup_doc "LcSettingC setting.Lookup(path:string)"
120#define LookupAll_doc "MkBufferListC setting.LookupAll() (const)"
121#define Next_doc "LcSettingC cfs.Next()"
122#define Parent_doc "LcSettingC setting.Parent() (const)"
123#define Prev_doc "LcSettingC cfs.Prev()"
124#define SetBoolElem_doc "LcSettingC setting.SetBoolElem(idx:int32, value:int32)"
125#define SetFloatElem_doc "LcSettingC setting.SetFloatElem(idx:int32, value:double)"
126#define SetInt64Elem_doc "LcSettingC setting.SetInt64Elem(idx:int32, value:int64)"
127#define SetIntElem_doc "LcSettingC setting.SetIntElem(idx:int32, value:int32)"
128#define SetStringElem_doc "LcSettingC setting.SetStringElem(idx:int32, value:string)"
129
130// doc-key: LcSettingC,LcSetting,om_,func
131#define Exists_doc "bool setting.Exists(name:string)"
132#define GetBool_doc "bool setting.GetBool() (const)"
133#define GetBoolElem_doc "bool setting.GetBoolElem(idx:int32) (const)"
134#define GetFloat_doc "double setting.GetFloat() (const)"
135#define GetFloatElem_doc "double setting.GetFloatElem(idx:int32) (const)"
136#define GetFormat_doc "LcConfigFormatE setting.GetFormat() (const)"
137#define GetInt_doc "int32 setting.GetInt() (const)"
138#define GetInt64_doc "int64 setting.GetInt64() (const)"
139#define GetInt64Elem_doc "int64 setting.GetInt64Elem(idx:int32) (const)"
140#define GetIntElem_doc "int32 setting.GetIntElem(idx:int32) (const)"
141#define GetString_doc "string setting.GetString() (const)"
142#define GetStringElem_doc "string setting.GetStringElem(idx:int32) (const)"
143// skip class-overload: HandleGet → MkObjectHandleGet
144#define Index_doc "int32 setting.Index() (const)"
145#define IsAggregate_doc "bool setting.IsAggregate() (const)"
146#define IsArray_doc "bool setting.IsArray() (const)"
147#define IsGroup_doc "bool setting.IsGroup() (const)"
148#define IsList_doc "bool setting.IsList() (const)"
149#define IsNumber_doc "bool setting.IsNumber() (const)"
150#define IsRoot_doc "bool setting.IsRoot() (const)"
151#define IsScalar_doc "bool setting.IsScalar() (const)"
152#define Length_doc "int32 setting.Length() (const)"
153// skip class-overload: Log → MkObjectLog
154#define Name_doc "string setting.Name() (const)"
155#define Remove_doc "parent.Remove(name:string)"
156#define RemoveElem_doc "parent.RemoveElem(idx:int32)"
157#define SetBool_doc "setting.SetBool(value:bool)"
158#define SetFloat_doc "setting.SetFloat(value:double)"
159#define SetFormat_doc "setting.SetFormat(format:LcConfigFormatE)"
160#define SetInt_doc "setting.SetInt(value:int32)"
161#define SetInt64_doc "setting.SetInt64(value:int64)"
162#define SetString_doc "setting.SetString(value:string)"
163#define SourceFile_doc "string setting.SourceFile() (const)"
164#define SourceLine_doc "int32 setting.SourceLine() (const)"
165#define Type_doc "LcConfigTypeE setting.Type() (const)"
166
167// doc-key: LcSettingC,LcSetting,omo,func
168#define LookupBool_doc "bool setting.LookupBool(name:string) (const)"
169#define LookupFloat_doc "double setting.LookupFloat(name:string) (const)"
170#define LookupInt_doc "int32 setting.LookupInt(name:string) (const)"
171#define LookupInt64_doc "int64 setting.LookupInt64(name:string) (const)"
172#define LookupString_doc "string setting.LookupString(name:string) (const)"
173
174// END-DOC - created by 'rb_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
175
176/*****************************************************************************/
177/* */
178/* O B J E C T */
179/* */
180/*****************************************************************************/
181
182// BEGIN-LcSettingC - created by 'rb_MqC.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
183
187
188// doc-key: LcSettingC,LcSettingC-Class-Export,sc_
189
191static OT_ProcRet NS(LcSettingC_HandleResolve) (OtClass_ARGS) {
194 MK_HDL netHdl = 0;
197 LC_CFS retVal = LcSettingHandleResolve (netHdl);
198 OT_retObj_SET_CFS(retVal);
199 end: MK_UNUSED /* LONG JUMP on error */
201}
202
203// doc-key: LcSettingC,LcSettingC-Class-Export,om_
204
205// skip on class-overload: LcSettingHandleGet → MkObjectHandleGet
207static OT_ProcRet NS(LcSettingC_HandleGet) (LcSettingC_ARGS) {OT_ERROR_LNG_RETURN;}
208
210// LcSettingC_Class_RB_API
211
215
216// doc-key: LcSettingC,LcSettingC-Class-Introspection,oc_
217
219static OT_ProcRet NS(LcSettingC_Next) (LcSettingC_ARGS) {
223 LC_CFS retVal = LcSettingNext (hdl);
224 OT_retObj_SET_CFS(retVal);
225 end: MK_UNUSED /* LONG JUMP on error */
227}
228
230static OT_ProcRet NS(LcSettingC_Prev) (LcSettingC_ARGS) {
234 LC_CFS retVal = LcSettingPrev (hdl);
235 OT_retObj_SET_CFS(retVal);
236 end: MK_UNUSED /* LONG JUMP on error */
238}
239
240// doc-key: LcSettingC,LcSettingC-Class-Introspection,sc_
241
243static OT_ProcRet NS(LcSettingC_Instances) (OtClass_ARGS) {
247 LC_CFS retVal = LcSettingInstances ();
248 OT_retObj_SET_CFS(retVal);
249 end: MK_UNUSED /* LONG JUMP on error */
251}
252
254// LcSettingC_Class_RB_API
255
259
260// doc-key: LcSettingC,LcSettingC-Class-Misc,sc_
261
263static OT_ProcRet NS(LcSettingC_GetNull) (OtClass_ARGS) {
267 LC_CFS retVal = LcSettingGetNull ();
268 OT_retObj_SET_CFS(retVal);
269 end: MK_UNUSED /* LONG JUMP on error */
271}
272
274// LcSettingC_Class_RB_API
275
279
280// doc-key: LcSettingC,LcSettingC-Get,oc_
281
283static OT_ProcRet NS(LcSettingC_GetElem) (LcSettingC_ARGS) {
286 MK_I32 idx = 0;
289 LC_CFS retVal = LcSettingGetElem (hdl, idx);
290 if (retVal == NULL) {
291 OT_ERROR_SOFT_CONSTRUCTOR(LcSettingC);
292 }
293 OT_retObj_SET_CFS(retVal);
294 end: MK_UNUSED /* LONG JUMP on error */
296}
297
299static OT_ProcRet NS(LcSettingC_GetMember) (LcSettingC_ARGS) {
302 MK_STRN name = 0;
305 LC_CFS retVal = LcSettingGetMember (hdl, name);
306 if (retVal == NULL) {
307 OT_ERROR_SOFT_CONSTRUCTOR(LcSettingC);
308 }
309 OT_retObj_SET_CFS(retVal);
310 end: MK_UNUSED /* LONG JUMP on error */
312}
313
314// doc-key: LcSettingC,LcSettingC-Get,om_
315
317static OT_ProcRet NS(LcSettingC_GetBool) (LcSettingC_ARGS) {
322 end: MK_UNUSED /* LONG JUMP on error */
324}
325
327static OT_ProcRet NS(LcSettingC_GetBoolElem) (LcSettingC_ARGS) {
330 MK_I32 idx = 0;
334 end: MK_UNUSED /* LONG JUMP on error */
336}
337
339static OT_ProcRet NS(LcSettingC_GetFloat) (LcSettingC_ARGS) {
344 end: MK_UNUSED /* LONG JUMP on error */
346}
347
349static OT_ProcRet NS(LcSettingC_GetFloatElem) (LcSettingC_ARGS) {
352 MK_I32 idx = 0;
356 end: MK_UNUSED /* LONG JUMP on error */
358}
359
361static OT_ProcRet NS(LcSettingC_GetFormat) (LcSettingC_ARGS) {
366 end: MK_UNUSED /* LONG JUMP on error */
368}
369
371static OT_ProcRet NS(LcSettingC_GetInt) (LcSettingC_ARGS) {
376 end: MK_UNUSED /* LONG JUMP on error */
378}
379
381static OT_ProcRet NS(LcSettingC_GetInt64) (LcSettingC_ARGS) {
386 end: MK_UNUSED /* LONG JUMP on error */
388}
389
391static OT_ProcRet NS(LcSettingC_GetInt64Elem) (LcSettingC_ARGS) {
394 MK_I32 idx = 0;
398 end: MK_UNUSED /* LONG JUMP on error */
400}
401
403static OT_ProcRet NS(LcSettingC_GetIntElem) (LcSettingC_ARGS) {
406 MK_I32 idx = 0;
410 end: MK_UNUSED /* LONG JUMP on error */
412}
413
415static OT_ProcRet NS(LcSettingC_GetString) (LcSettingC_ARGS) {
420 end: MK_UNUSED /* LONG JUMP on error */
422}
423
425static OT_ProcRet NS(LcSettingC_GetStringElem) (LcSettingC_ARGS) {
428 MK_I32 idx = 0;
432 end: MK_UNUSED /* LONG JUMP on error */
434}
435
437// LcSettingC_Get_RB_API
438
442
443// doc-key: LcSettingC,LcSettingC-Is,om_
444
446static OT_ProcRet NS(LcSettingC_IsAggregate) (LcSettingC_ARGS) {
451 end: MK_UNUSED /* LONG JUMP on error */
453}
454
456static OT_ProcRet NS(LcSettingC_IsArray) (LcSettingC_ARGS) {
461 end: MK_UNUSED /* LONG JUMP on error */
463}
464
466static OT_ProcRet NS(LcSettingC_IsGroup) (LcSettingC_ARGS) {
471 end: MK_UNUSED /* LONG JUMP on error */
473}
474
476static OT_ProcRet NS(LcSettingC_IsList) (LcSettingC_ARGS) {
481 end: MK_UNUSED /* LONG JUMP on error */
483}
484
486static OT_ProcRet NS(LcSettingC_IsNumber) (LcSettingC_ARGS) {
491 end: MK_UNUSED /* LONG JUMP on error */
493}
494
496static OT_ProcRet NS(LcSettingC_IsRoot) (LcSettingC_ARGS) {
501 end: MK_UNUSED /* LONG JUMP on error */
503}
504
506static OT_ProcRet NS(LcSettingC_IsScalar) (LcSettingC_ARGS) {
511 end: MK_UNUSED /* LONG JUMP on error */
513}
514
516// LcSettingC_Is_RB_API
517
521
522// doc-key: LcSettingC,LcSettingC-Lookup,oc_
523
525static OT_ProcRet NS(LcSettingC_Lookup) (LcSettingC_ARGS) {
528 MK_STRN path = 0;
531 LC_CFS retVal = LcSettingLookup (hdl, path);
532 if (retVal == NULL) {
533 OT_ERROR_SOFT_CONSTRUCTOR(LcSettingC);
534 }
535 OT_retObj_SET_CFS(retVal);
536 end: MK_UNUSED /* LONG JUMP on error */
538}
539
541static OT_ProcRet NS(LcSettingC_LookupAll) (LcSettingC_ARGS) {
545 MK_BFL retVal = LcSettingLookupAll (hdl);
546 OT_retObj_SET_BFL(retVal);
547 end: MK_UNUSED /* LONG JUMP on error */
549}
550
551// doc-key: LcSettingC,LcSettingC-Lookup,omo
552
554static OT_ProcRet NS(LcSettingC_LookupBool) (LcSettingC_ARGS) {
557 MK_STRN name = 0;
560 MK_BOOL value_out;
561 MkErrorC_Check(hdl,LcSettingLookupBool (hdl, name, &value_out));
562 OT_retObj_SET_BOL(value_out);
563 end: MK_UNUSED /* LONG JUMP on error */
565}
566
568static OT_ProcRet NS(LcSettingC_LookupFloat) (LcSettingC_ARGS) {
571 MK_STRN name = 0;
574 MK_DBL value_out;
575 MkErrorC_Check(hdl,LcSettingLookupFloat (hdl, name, &value_out));
576 OT_retObj_SET_DBL(value_out);
577 end: MK_UNUSED /* LONG JUMP on error */
579}
580
582static OT_ProcRet NS(LcSettingC_LookupInt) (LcSettingC_ARGS) {
585 MK_STRN name = 0;
588 MK_I32 value_out;
589 MkErrorC_Check(hdl,LcSettingLookupInt (hdl, name, &value_out));
590 OT_retObj_SET_I32(value_out);
591 end: MK_UNUSED /* LONG JUMP on error */
593}
594
596static OT_ProcRet NS(LcSettingC_LookupInt64) (LcSettingC_ARGS) {
599 MK_STRN name = 0;
602 MK_I64 value_out;
603 MkErrorC_Check(hdl,LcSettingLookupInt64 (hdl, name, &value_out));
604 OT_retObj_SET_I64(value_out);
605 end: MK_UNUSED /* LONG JUMP on error */
607}
608
610static OT_ProcRet NS(LcSettingC_LookupString) (LcSettingC_ARGS) {
613 MK_STRN name = 0;
616 MK_STRN value_out;
617 MkErrorC_Check(hdl,LcSettingLookupString (hdl, name, &value_out));
618 OT_retObj_SET_STR(value_out);
619 end: MK_UNUSED /* LONG JUMP on error */
621}
622
624// LcSettingC_Lookup_RB_API
625
629
630// doc-key: LcSettingC,LcSettingC-Misc,oc_
631
633static OT_ProcRet NS(LcSettingC_AddIfNotExists) (LcSettingC_ARGS) {
636 MK_STRN name = 0;
638 enum LcConfigTypeE cfgtype = 0;
641 LC_CFS retVal = LcSettingAddIfNotExists (hdl, name, cfgtype);
642 OT_retObj_SET_CFS(retVal);
643 end: MK_UNUSED /* LONG JUMP on error */
645}
646
648static OT_ProcRet NS(LcSettingC_Parent) (LcSettingC_ARGS) {
652 LC_CFS retVal = LcSettingParent (hdl);
653 if (retVal == NULL) {
654 OT_ERROR_SOFT_CONSTRUCTOR(LcSettingC);
655 }
656 OT_retObj_SET_CFS(retVal);
657 end: MK_UNUSED /* LONG JUMP on error */
659}
660
661// doc-key: LcSettingC,LcSettingC-Misc,om_
662
664static OT_ProcRet NS(LcSettingC_Exists) (LcSettingC_ARGS) {
667 MK_STRN name = 0;
671 end: MK_UNUSED /* LONG JUMP on error */
673}
674
676static OT_ProcRet NS(LcSettingC_Index) (LcSettingC_ARGS) {
681 end: MK_UNUSED /* LONG JUMP on error */
683}
684
686static OT_ProcRet NS(LcSettingC_Length) (LcSettingC_ARGS) {
691 end: MK_UNUSED /* LONG JUMP on error */
693}
694
695// skip on class-overload: LcSettingLog → MkObjectLog
698
700static OT_ProcRet NS(LcSettingC_Name) (LcSettingC_ARGS) {
705 end: MK_UNUSED /* LONG JUMP on error */
707}
708
710static OT_ProcRet NS(LcSettingC_Remove) (LcSettingC_ARGS) {
713 MK_STRN name = 0;
716 MkErrorC_Check(hdl,LcSettingRemove (hdl, name));
718 end: MK_UNUSED /* LONG JUMP on error */
720}
721
723static OT_ProcRet NS(LcSettingC_RemoveElem) (LcSettingC_ARGS) {
726 MK_I32 idx = 0;
729 MkErrorC_Check(hdl,LcSettingRemoveElem (hdl, idx));
731 end: MK_UNUSED /* LONG JUMP on error */
733}
734
736static OT_ProcRet NS(LcSettingC_SourceFile) (LcSettingC_ARGS) {
741 end: MK_UNUSED /* LONG JUMP on error */
743}
744
746static OT_ProcRet NS(LcSettingC_SourceLine) (LcSettingC_ARGS) {
751 end: MK_UNUSED /* LONG JUMP on error */
753}
754
756static OT_ProcRet NS(LcSettingC_Type) (LcSettingC_ARGS) {
761 end: MK_UNUSED /* LONG JUMP on error */
763}
764
766// LcSettingC_Misc_RB_API
767
771
772// doc-key: LcSettingC,LcSettingC-Set,oc_
773
775static OT_ProcRet NS(LcSettingC_SetBoolElem) (LcSettingC_ARGS) {
778 MK_I32 idx = 0;
780 MK_I32 value = 0;
783 LC_CFS retVal = LcSettingSetBoolElem (hdl, idx, value);
784 if (retVal == NULL) {
785 OT_ERROR_SOFT_CONSTRUCTOR(LcSettingC);
786 }
787 OT_retObj_SET_CFS(retVal);
788 end: MK_UNUSED /* LONG JUMP on error */
790}
791
793static OT_ProcRet NS(LcSettingC_SetFloatElem) (LcSettingC_ARGS) {
796 MK_I32 idx = 0;
798 MK_DBL value = 0;
801 LC_CFS retVal = LcSettingSetFloatElem (hdl, idx, value);
802 if (retVal == NULL) {
803 OT_ERROR_SOFT_CONSTRUCTOR(LcSettingC);
804 }
805 OT_retObj_SET_CFS(retVal);
806 end: MK_UNUSED /* LONG JUMP on error */
808}
809
811static OT_ProcRet NS(LcSettingC_SetInt64Elem) (LcSettingC_ARGS) {
814 MK_I32 idx = 0;
816 MK_I64 value = 0;
819 LC_CFS retVal = LcSettingSetInt64Elem (hdl, idx, value);
820 if (retVal == NULL) {
821 OT_ERROR_SOFT_CONSTRUCTOR(LcSettingC);
822 }
823 OT_retObj_SET_CFS(retVal);
824 end: MK_UNUSED /* LONG JUMP on error */
826}
827
829static OT_ProcRet NS(LcSettingC_SetIntElem) (LcSettingC_ARGS) {
832 MK_I32 idx = 0;
834 MK_I32 value = 0;
837 LC_CFS retVal = LcSettingSetIntElem (hdl, idx, value);
838 if (retVal == NULL) {
839 OT_ERROR_SOFT_CONSTRUCTOR(LcSettingC);
840 }
841 OT_retObj_SET_CFS(retVal);
842 end: MK_UNUSED /* LONG JUMP on error */
844}
845
847static OT_ProcRet NS(LcSettingC_SetStringElem) (LcSettingC_ARGS) {
850 MK_I32 idx = 0;
852 MK_STRN value = 0;
855 LC_CFS retVal = LcSettingSetStringElem (hdl, idx, value);
856 if (retVal == NULL) {
857 OT_ERROR_SOFT_CONSTRUCTOR(LcSettingC);
858 }
859 OT_retObj_SET_CFS(retVal);
860 end: MK_UNUSED /* LONG JUMP on error */
862}
863
864// doc-key: LcSettingC,LcSettingC-Set,om_
865
867static OT_ProcRet NS(LcSettingC_SetBool) (LcSettingC_ARGS) {
870 MK_BOOL value = 0;
873 MkErrorC_Check(hdl,LcSettingSetBool (hdl, value));
875 end: MK_UNUSED /* LONG JUMP on error */
877}
878
880static OT_ProcRet NS(LcSettingC_SetFloat) (LcSettingC_ARGS) {
883 MK_DBL value = 0;
886 MkErrorC_Check(hdl,LcSettingSetFloat (hdl, value));
888 end: MK_UNUSED /* LONG JUMP on error */
890}
891
893static OT_ProcRet NS(LcSettingC_SetFormat) (LcSettingC_ARGS) {
896 enum LcConfigFormatE format = 0;
899 MkErrorC_Check(hdl,LcSettingSetFormat (hdl, format));
901 end: MK_UNUSED /* LONG JUMP on error */
903}
904
906static OT_ProcRet NS(LcSettingC_SetInt) (LcSettingC_ARGS) {
909 MK_I32 value = 0;
912 MkErrorC_Check(hdl,LcSettingSetInt (hdl, value));
914 end: MK_UNUSED /* LONG JUMP on error */
916}
917
919static OT_ProcRet NS(LcSettingC_SetInt64) (LcSettingC_ARGS) {
922 MK_I64 value = 0;
925 MkErrorC_Check(hdl,LcSettingSetInt64 (hdl, value));
927 end: MK_UNUSED /* LONG JUMP on error */
929}
930
932static OT_ProcRet NS(LcSettingC_SetString) (LcSettingC_ARGS) {
935 MK_STRN value = 0;
938 MkErrorC_Check(hdl,LcSettingSetString (hdl, value));
940 end: MK_UNUSED /* LONG JUMP on error */
942}
943
945// LcSettingC_Set_RB_API
946
950
951// doc-key: LcSettingC,LcSettingC-TOR,oC_
952
954static OT_ProcRet NS(LcSettingC_Add) (LcSettingC_ARGS) {
957 MK_STRN name = 0;
959 enum LcConfigTypeE __type = 0;
962 LC_CFS retVal = LcSettingAdd (hdl, name, __type);
963 if (retVal == NULL) {
964 OT_ERROR_CONSTRUCTOR(LcSettingC);
965 }
966 OT_retObj_SET_CFS(retVal);
967 end: MK_UNUSED /* LONG JUMP on error */
969}
970
971// doc-key: LcSettingC,LcSettingC-TOR,oc_
972
974static OT_ProcRet NS(LcSettingC_GetConfig) (LcSettingC_ARGS) {
978 LC_CFG retVal = LcSettingGetConfig (hdl);
979 OT_retObj_SET_CFG(retVal);
980 end: MK_UNUSED /* LONG JUMP on error */
982}
983
985// LcSettingC_TOR_RB_API
986
987// END-LcSettingC - created by 'rb_MqC.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
988
989/*****************************************************************************/
990/* */
991/* public */
992/* */
993/*****************************************************************************/
994
995void NS(sMark) (MK_PTR ptr) {
996}
997
998void LC(LcSettingC_Init) (MK_RT_ARGS_ONLY) {
999
1000 // init type
1002 S_INIT;
1003
1004// BEGIN-CLASS - created by 'rb_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
1005
1006// doc-key: LcSettingC,LcSetting,sc_
1007OT_METH_O ( LcSettingC, GetNull, LcSettingC_GetNull )
1008OT_METH_S ( LcSettingC, GetNull, LcSettingC_GetNull )
1009OT_METH_O ( LcSettingC, HandleResolve, LcSettingC_HandleResolve )
1010OT_METH_S ( LcSettingC, HandleResolve, LcSettingC_HandleResolve )
1011OT_METH_O ( LcSettingC, Instances, LcSettingC_Instances )
1012OT_METH_S ( LcSettingC, Instances, LcSettingC_Instances )
1013
1014// END-CLASS - created by 'rb_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
1015
1016// BEGIN-OBJ - created by 'rb_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
1017
1018// doc-key: LcSettingC,LcSetting,oC_
1019OT_METH_O ( LcSettingC, Add, LcSettingC_Add )
1020
1021// doc-key: LcSettingC,LcSetting,oc_
1022OT_METH_O ( LcSettingC, AddIfNotExists, LcSettingC_AddIfNotExists )
1023OT_METH_O ( LcSettingC, GetConfig, LcSettingC_GetConfig )
1024OT_METH_O ( LcSettingC, GetElem, LcSettingC_GetElem )
1025OT_METH_O ( LcSettingC, GetMember, LcSettingC_GetMember )
1026OT_METH_O ( LcSettingC, Lookup, LcSettingC_Lookup )
1027OT_METH_O ( LcSettingC, LookupAll, LcSettingC_LookupAll )
1028OT_METH_O ( LcSettingC, Next, LcSettingC_Next )
1029OT_METH_O ( LcSettingC, Parent, LcSettingC_Parent )
1030OT_METH_O ( LcSettingC, Prev, LcSettingC_Prev )
1031OT_METH_O ( LcSettingC, SetBoolElem, LcSettingC_SetBoolElem )
1032OT_METH_O ( LcSettingC, SetFloatElem, LcSettingC_SetFloatElem )
1033OT_METH_O ( LcSettingC, SetInt64Elem, LcSettingC_SetInt64Elem )
1034OT_METH_O ( LcSettingC, SetIntElem, LcSettingC_SetIntElem )
1035OT_METH_O ( LcSettingC, SetStringElem, LcSettingC_SetStringElem )
1036
1037// doc-key: LcSettingC,LcSetting,om_
1038OT_METH_O ( LcSettingC, Exists, LcSettingC_Exists )
1039OT_METH_O ( LcSettingC, GetBool, LcSettingC_GetBool )
1040OT_METH_O ( LcSettingC, GetBoolElem, LcSettingC_GetBoolElem )
1041OT_METH_O ( LcSettingC, GetFloat, LcSettingC_GetFloat )
1042OT_METH_O ( LcSettingC, GetFloatElem, LcSettingC_GetFloatElem )
1043OT_METH_O ( LcSettingC, GetFormat, LcSettingC_GetFormat )
1044OT_METH_O ( LcSettingC, GetInt, LcSettingC_GetInt )
1045OT_METH_O ( LcSettingC, GetInt64, LcSettingC_GetInt64 )
1046OT_METH_O ( LcSettingC, GetInt64Elem, LcSettingC_GetInt64Elem )
1047OT_METH_O ( LcSettingC, GetIntElem, LcSettingC_GetIntElem )
1048OT_METH_O ( LcSettingC, GetString, LcSettingC_GetString )
1049OT_METH_O ( LcSettingC, GetStringElem, LcSettingC_GetStringElem )
1050// skip class-overload: LcSettingHandleGet → HandleGet, LcSettingC_HandleGet
1051OT_METH_O ( LcSettingC, Index, LcSettingC_Index )
1052OT_METH_O ( LcSettingC, IsAggregate, LcSettingC_IsAggregate )
1053OT_METH_O ( LcSettingC, IsArray, LcSettingC_IsArray )
1054OT_METH_O ( LcSettingC, IsGroup, LcSettingC_IsGroup )
1055OT_METH_O ( LcSettingC, IsList, LcSettingC_IsList )
1056OT_METH_O ( LcSettingC, IsNumber, LcSettingC_IsNumber )
1057OT_METH_O ( LcSettingC, IsRoot, LcSettingC_IsRoot )
1058OT_METH_O ( LcSettingC, IsScalar, LcSettingC_IsScalar )
1059OT_METH_O ( LcSettingC, Length, LcSettingC_Length )
1060// skip class-overload: LcSettingLog → Log, LcSettingC_Log
1061OT_METH_O ( LcSettingC, Name, LcSettingC_Name )
1062OT_METH_O ( LcSettingC, Remove, LcSettingC_Remove )
1063OT_METH_O ( LcSettingC, RemoveElem, LcSettingC_RemoveElem )
1064OT_METH_O ( LcSettingC, SetBool, LcSettingC_SetBool )
1065OT_METH_O ( LcSettingC, SetFloat, LcSettingC_SetFloat )
1066OT_METH_O ( LcSettingC, SetFormat, LcSettingC_SetFormat )
1067OT_METH_O ( LcSettingC, SetInt, LcSettingC_SetInt )
1068OT_METH_O ( LcSettingC, SetInt64, LcSettingC_SetInt64 )
1069OT_METH_O ( LcSettingC, SetString, LcSettingC_SetString )
1070OT_METH_O ( LcSettingC, SourceFile, LcSettingC_SourceFile )
1071OT_METH_O ( LcSettingC, SourceLine, LcSettingC_SourceLine )
1072OT_METH_O ( LcSettingC, Type, LcSettingC_Type )
1073
1074// doc-key: LcSettingC,LcSetting,omo
1075OT_METH_O ( LcSettingC, LookupBool, LcSettingC_LookupBool )
1076OT_METH_O ( LcSettingC, LookupFloat, LcSettingC_LookupFloat )
1077OT_METH_O ( LcSettingC, LookupInt, LcSettingC_LookupInt )
1078OT_METH_O ( LcSettingC, LookupInt64, LcSettingC_LookupInt64 )
1079OT_METH_O ( LcSettingC, LookupString, LcSettingC_LookupString )
1080
1081// END-OBJ - created by 'rb_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
1082
1083}
#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
static MK_TYP LcSettingCTT
#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 S_INIT
#define Length_doc
#define GetElem_doc
#define RemoveElem_doc
#define Add_doc
#define SetInt64_doc
#define Name_doc
#define SetInt_doc
tag: nhi1-release-250425
#define OT_PKG
#define OT_retObj_SET_CFG(nat)
#define OT_NEW_Lc_enum_OBJ(typ, i)
#define LcSettingC_MK_NULL
#define OT_retObj_SET_CFS(nat)
#define NS(n)
#define LC(n)
#define LcSettingC_ARGS
#define OT_CHECK_bool(val)
#define MK(n)
#define OT_SETUP_VARARGS(min, max, d)
#define OT_retObj_SET_BOL(nat)
#define OT_ERROR_SOFT_CONSTRUCTOR(clazz)
#define OT_SETUP_NOARG(d)
#define OT_SETUP_ONEARG(d)
#define OT_ERROR_LNG_RETURN
#define PTR2VAL(nat)
#define OT_CHECK_NI4(val)
#define OT_CHECK_NI8(val)
#define OT_CHECK_NF8(val)
#define OT_METH_S(c, s, f)
#define MK_BASE_CLASS
#define OT_CLS_T
#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_METH_O(c, s, f)
#define INCR_REF(valP)
#define OT_OBJ_T
#define OT_retObj_SET_BFL(nat)
#define OT_retObj_RETURN
#define OT_OBJECT_DELETE_HARD(obj)
#define OT_retObj_SET_STR(nat)
#define OT_ERROR_CONSTRUCTOR(clazz)
#define OT_retObj_SET(val)
#define VAL2PTR(val)
#define OT_CHECK_NOARGS
#define MkErrorC_Check(mng, PROC)
#define OT_ProcRet
#define OtClass_ARGS
#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 …
__thread MK_TYP LcSettingC_TT
class as MkTypeDefS-class-type …
#define LcSettingC_T
class as MkTypeDefS-class-type (cast from LcSettingC_TT into MkTypeS) …
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_inline
#define MK_UNUSED
#define MK_NULL
#define MK_DEPRECATED
MK_PTRB * MK_PTR
const MK_STRB * MK_STRN
MK_PTRB * MK_MNG
signed long long MK_I64
bool MK_BOOL
double MK_DBL
int32_t MK_HDL
signed int MK_I32
#define MK_RT_ARGS
#define MK_RT_ARGS_ONLY
#define OT_CHECK_NIH(val)
#define OT_CHECK_ENUM(ename, val)
Struct to represent the data from the LcConfigC …
Struct to represent the data from the LcSettingC …
MkSelfUnlinkF selfUnlink
MkSelfDeleteF selfDelete
MkSelfCreateF selfCreate