theConfig 10.0
Loading...
Searching...
No Matches
LcConfigC_py.c
Go to the documentation of this file.
1
9/* LABEL-START */
10
11#define META_FILE_NAME "LcConfigC_py.c"
12
14
15// PY class
16#define OT_CLASS (&NS(LcConfigCR))
17#define OT_CLASS_NAME "LcConfigC"
18
19#define OT_LNG2META(O) LcCfg(VAL2MNG(O))
20
21#define OT_retObj_CONSTR(mng) OT_retObj_SET(NS(LcConfigC_CTOR)(MK_RT_CALL (PyTypeObject*)class,mng))
22
23#define OT_SETUP_hdl OT_SETUP_hdl_tmpl(LcConfigC)
24#define OT_SETUP_hdl__null_allow OT_SETUP_hdl_tmpl__null_allow(LcConfigC)
25#define OT_SETUP_hdl_constr MK_RT_UNUSED AllRtSetup_NULL; \
26 LC_CFG hdl = (LC_CFG) OT_CLASS;
27#define OT_SETUP_hdl_destr OT_SETUP_hdl_tmpl__null_allow(LcConfigC)
28#define OT_SETUP_hdl_static MK_RT_UNUSED AllRtSetup_NULL; \
29 __attribute__((unused)) MK_TYP hdl = LcConfigC##_TT;
30
31#define OT_SETUP_hdl_static_constr OT_SETUP_hdl_static
32
33#if !defined(SetupRtFromObj_X)
34 #define SetupRtFromObj_X(hdl) AllRtSetup_X(hdl)
35 #define SetupRtFromObj_XN(hdl) AllRtSetup_XN(hdl)
36#endif
37
38// MO class
39#undef LcConfigCTT
40#define LcConfigCTT LC(LcConfigThreadState).LcConfigCTT
41/* LcConfigC_MK_NULL defined in LibLcConfig_py.h */
42
43__attribute__((unused)) mk_inline
44OT_OBJ_T NS(LcConfigC_CTOR) (MK_RT_ARGS OT_CLS_T type, LC_CFG hdl) {
45 return MK(AtomCreate)(MK_RT_CALL type,LcConfigC_X2obj(hdl));
46}
47
48// helper: mk_dbg_color_ln(MK_COLOR_YELLOW,"hdl<%p>, self<%p>", obj, self);
49
50// META: ObjNew feature: selfCreate will be called from "ObjNew->MkSelfNew" if MkObj need a SELF pointer
51static MK_PTR NS(LcConfigC_selfCreate) (MK_RT_ARGS MK_OBJ const obj, MK_PTR const env) {
52 return MK(AtomCreate) (MK_RT_CALL OT_CLASS,obj);
53}
54// META: called if MkObj must be destroyed and if the SELF is still alive → goal: destroy the SELF
55static void NS(LcConfigC_selfDelete) (MK_RT_ARGS MK_PTR self, MK_PTR const env) {
56 MK(AtomDeleteHard) (MK_RT_CALL OT_SELF);
57}
58// META: called to destroy link from SELF to META
59static void NS(LcConfigC_selfUnlink) (MK_RT_ARGS MK_PTR self, MK_PTR const env) {
60 MkObjectC_Obj *selfO = (MkObjectC_Obj*) self;
61 selfO->hdl = NULL;
62}
63
64// initialize the PY and MO class specific object
65#define ClassInit \
66 /* if not already done, initialize NEW META type */ \
67 if (LcConfigCTT == NULL) LcConfigCTT = LcConfigSTT; \
68 \
69 /* protect against double call */ \
70 if (LcConfigCTT->selfCreate == NS(LcConfigC_selfCreate)) return MK_OK; \
71 \
72 /* add "selfCreate" and "selfDelete" feature to the META-Class */ \
73 LcConfigCTT->selfCreate = NS(LcConfigC_selfCreate); \
74 LcConfigCTT->selfDelete = NS(LcConfigC_selfDelete); \
75 LcConfigCTT->selfUnlink = NS(LcConfigC_selfUnlink); \
76 \
77 if (!PyType_HasFeature(OT_CLASS,Py_TPFLAGS_READY)) { \
78 NS(LcConfigCR).tp_base = LcConfigC_base; \
79 OtErrorCheckLng (PyType_Ready(OT_CLASS)); \
80 } \
81 OtErrorCheckLng(PyModule_AddObjectRef(m, "LcConfigC", (PyObject *)OT_CLASS)); \
82 \
83 /* define the "NULL" object */ \
84 LcConfigC_MK_NULL = Py_NewRef(MK(AtomCreate) (MK_RT_CALL OT_CLASS, NULL /*obj*/));
85
86/* LABEL-END */
87
88#define META_CONTEXT_S MK_ERROR_DEFAULT
89
95
96// BEGIN-DOC - created by 'py_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
97
98// doc-key: LcConfigC,LcConfig,sCc,func
99#define Create_doc "LcConfigC LcConfigC.Create()"
100#define new_doc "LcConfigC LcConfigC.new()"
101
102// doc-key: LcConfigC,LcConfig,sc_,func
103#define GetNull_doc "LcConfigC LcConfigC.GetNull()"
104#define HandleResolve_doc "LcConfigC LcConfigC.HandleResolve(netHdl:MK_HDL)"
105#define Instances_doc "LcConfigC LcConfigC.Instances()"
106
107// doc-key: LcConfigC,LcConfig,oc_,func
108#define Lookup_doc "LcSettingC config.Lookup(path:string) (const)"
109#define Next_doc "LcConfigC cfg.Next()"
110#define Prev_doc "LcConfigC cfg.Prev()"
111#define RootSetting_doc "LcSettingC config.RootSetting() (const)"
112
113// doc-key: LcConfigC,LcConfig,om_,func
114#define Clear_doc "config.Clear()"
115#define ErrorType_doc "LcErrorTypeE config.ErrorType() (const)"
116#define GetDefaultFormat_doc "LcConfigFormatE config.GetDefaultFormat() (const)"
117#define GetFloatPrecision_doc "int16 config.GetFloatPrecision() (const)"
118#define GetIncludeDir_doc "string config.GetIncludeDir() (const)"
119#define GetOption_doc "bool config.GetOption(option:LcConfigOptionsEF) (const)"
120#define GetOptions_doc "LcConfigOptionsEF config.GetOptions() (const)"
121#define GetTabWidth_doc "int16 config.GetTabWidth() (const)"
122// skip class-overload: HandleGet → MkObjectHandleGet
123#define Log_doc "cfg.Log(?fmtobj:MkObjectC=None?, ?debug:int32=0?, ?callfunc:string=\"MK_NULL\"?, ?lvl:int32=0?) (const)"
124#define ReadFile_doc "config.ReadFile(filename:string)"
125#define ReadString_doc "config.ReadString(str:string)"
126#define SetDefaultFormat_doc "config.SetDefaultFormat(format:LcConfigFormatE)"
127#define SetFloatPrecision_doc "config.SetFloatPrecision(digits:int16)"
128#define SetIncludeDir_doc "config.SetIncludeDir(include_dir:string)"
129#define SetIncludeFunc_doc "cfg.SetIncludeFunc(?fConfigIncludeData:LC_CBP=None?)"
130#define SetOption_doc "config.SetOption(option:LcConfigOptionsEF, flag:bool)"
131#define SetOptions_doc "config.SetOptions(options:LcConfigOptionsEF)"
132#define SetSettingDeleteFunc_doc "cfg.SetSettingDeleteFunc(?fSettingDeleteData:LC_CBP=None?)"
133#define SetTabWidth_doc "config.SetTabWidth(width:int16)"
134#define WriteFile_doc "config.WriteFile(filename:string)"
135
136// doc-key: LcConfigC,LcConfig,omo,func
137#define LookupBool_doc "bool config.LookupBool(path:string) (const)"
138#define LookupFloat_doc "double config.LookupFloat(path:string) (const)"
139#define LookupInt_doc "int32 config.LookupInt(path:string) (const)"
140#define LookupInt64_doc "int64 config.LookupInt64(path:string) (const)"
141#define LookupString_doc "string config.LookupString(path:string) (const)"
142#define WriteString_doc "string cfg.WriteString() (const)"
143
144// END-DOC - created by 'py_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
145
146// ---------------------------------------------------------------------------------------
147
153
154// ---------------------------------------------------------------------------------------
155
156// BEGIN-LcConfigC - created by 'py_MqC.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
157
161
162// doc-key: LcConfigC,LcConfigC-Class-Export,sc_
163
165static OT_ProcRet NS(LcConfigC_HandleResolve) (OtClass_ARGS) {
168 MK_HDL netHdl = 0;
171 LC_CFG retVal = LcConfigHandleResolve (netHdl);
172 OT_retObj_SET_CFG(retVal);
173 goto end;
174 error:
176 end:
178}
179
180// doc-key: LcConfigC,LcConfigC-Class-Export,om_
181
182// skip on class-overload: LcConfigHandleGet → MkObjectHandleGet
184static OT_ProcRet NS(LcConfigC_HandleGet) (LcConfigC_ARGS) {OT_ERROR_LNG_RETURN;}
185
187// LcConfigC_Class_PY_API
188
192
193// doc-key: LcConfigC,LcConfigC-Class-Introspection,oc_
194
196static OT_ProcRet NS(LcConfigC_Next) (LcConfigC_ARGS) {
200 LC_CFG retVal = LcConfigNext (hdl);
201 OT_retObj_SET_CFG(retVal);
202 goto end;
203 error:
205 end:
207}
208
210static OT_ProcRet NS(LcConfigC_Prev) (LcConfigC_ARGS) {
214 LC_CFG retVal = LcConfigPrev (hdl);
215 OT_retObj_SET_CFG(retVal);
216 goto end;
217 error:
219 end:
221}
222
223// doc-key: LcConfigC,LcConfigC-Class-Introspection,sc_
224
226static OT_ProcRet NS(LcConfigC_Instances) (OtClass_ARGS) {
230 LC_CFG retVal = LcConfigInstances ();
231 OT_retObj_SET_CFG(retVal);
232 goto end;
233 error:
235 end:
237}
238
240// LcConfigC_Class_PY_API
241
245
246// doc-key: LcConfigC,LcConfigC-Class-Misc,sc_
247
249static OT_ProcRet NS(LcConfigC_GetNull) (OtClass_ARGS) {
253 LC_CFG retVal = LcConfigGetNull ();
254 OT_retObj_SET_CFG(retVal);
255 goto end;
256 error:
258 end:
260}
261
263// LcConfigC_Class_PY_API
264
268
269// doc-key: LcConfigC,LcConfigC-Error,om_
270
272static OT_ProcRet NS(LcConfigC_ErrorType) (LcConfigC_ARGS) {
277 goto end;
278 error:
280 end:
282}
283
285// LcConfigC_Error_PY_API
286
290
291// doc-key: LcConfigC,LcConfigC-Get,om_
292
294static OT_ProcRet NS(LcConfigC_GetDefaultFormat) (LcConfigC_ARGS) {
299 goto end;
300 error:
302 end:
304}
305
307static OT_ProcRet NS(LcConfigC_GetFloatPrecision) (LcConfigC_ARGS) {
312 goto end;
313 error:
315 end:
317}
318
320static OT_ProcRet NS(LcConfigC_GetIncludeDir) (LcConfigC_ARGS) {
325 goto end;
326 error:
328 end:
330}
331
333static OT_ProcRet NS(LcConfigC_GetOption) (LcConfigC_ARGS) {
336 enum LcConfigOptionsEF option = 0;
340 goto end;
341 error:
343 end:
345}
346
348static OT_ProcRet NS(LcConfigC_GetOptions) (LcConfigC_ARGS) {
353 goto end;
354 error:
356 end:
358}
359
361static OT_ProcRet NS(LcConfigC_GetTabWidth) (LcConfigC_ARGS) {
366 goto end;
367 error:
369 end:
371}
372
374// LcConfigC_Get_PY_API
375
379
380// doc-key: LcConfigC,LcConfigC-Lookup,oc_
381
383static OT_ProcRet NS(LcConfigC_Lookup) (LcConfigC_ARGS) {
386 MK_STRN path = 0;
389 LC_CFS retVal = LcConfigLookup (hdl, path);
390 OT_retObj_SET_CFS(retVal);
391 goto end;
392 error:
394 end:
396}
397
398// doc-key: LcConfigC,LcConfigC-Lookup,omo
399
401static OT_ProcRet NS(LcConfigC_LookupBool) (LcConfigC_ARGS) {
404 MK_STRN path = 0;
407 MK_BOOL value_out;
408 MkErrorC_Check(hdl,LcConfigLookupBool (hdl, path, &value_out));
409 OT_retObj_SET_BOL(value_out);
410 goto end;
411 error:
413 end:
415}
416
418static OT_ProcRet NS(LcConfigC_LookupFloat) (LcConfigC_ARGS) {
421 MK_STRN path = 0;
424 MK_DBL value_out;
425 MkErrorC_Check(hdl,LcConfigLookupFloat (hdl, path, &value_out));
426 OT_retObj_SET_DBL(value_out);
427 goto end;
428 error:
430 end:
432}
433
435static OT_ProcRet NS(LcConfigC_LookupInt) (LcConfigC_ARGS) {
438 MK_STRN path = 0;
441 MK_I32 value_out;
442 MkErrorC_Check(hdl,LcConfigLookupInt (hdl, path, &value_out));
443 OT_retObj_SET_I32(value_out);
444 goto end;
445 error:
447 end:
449}
450
452static OT_ProcRet NS(LcConfigC_LookupInt64) (LcConfigC_ARGS) {
455 MK_STRN path = 0;
458 MK_I64 value_out;
459 MkErrorC_Check(hdl,LcConfigLookupInt64 (hdl, path, &value_out));
460 OT_retObj_SET_I64(value_out);
461 goto end;
462 error:
464 end:
466}
467
469static OT_ProcRet NS(LcConfigC_LookupString) (LcConfigC_ARGS) {
472 MK_STRN path = 0;
475 MK_STRN value_out;
476 MkErrorC_Check(hdl,LcConfigLookupString (hdl, path, &value_out));
477 OT_retObj_SET_STR(value_out);
478 goto end;
479 error:
481 end:
483}
484
486// LcConfigC_Lookup_PY_API
487
491
492// doc-key: LcConfigC,LcConfigC-Misc,oc_
493
495static OT_ProcRet NS(LcConfigC_RootSetting) (LcConfigC_ARGS) {
499 LC_CFS retVal = LcConfigRootSetting (hdl);
500 OT_retObj_SET_CFS(retVal);
501 goto end;
502 error:
504 end:
506}
507
508// doc-key: LcConfigC,LcConfigC-Misc,om_
509
511static OT_ProcRet NS(LcConfigC_Clear) (LcConfigC_ARGS) {
515 LcConfigClear (hdl);
517 goto end;
518 error:
520 end:
522}
523
525static OT_ProcRet NS(LcConfigC_Log) (LcConfigC_ARGS) {
528 MK_OBJN fmtobj = NULL;
530 MK_DBG debug = 0;
532 MK_STRN callfunc = NULL;
534 MK_I32 lvl = 0;
537 if (debug > MkRuntimeDebugGet()) {
539 goto end;
540 }
541 if (MkSysStringIsNULL(callfunc)) {callfunc = OT_GET_CALL_PROC;}
542 LcConfigLog (hdl, fmtobj, debug, callfunc, lvl);
544 goto end;
545 error:
547 end:
550}
551
553static OT_ProcRet NS(LcConfigC_ReadFile) (LcConfigC_ARGS) {
556 MK_STRN filename = 0;
559 MkErrorC_Check(hdl,LcConfigReadFile (hdl, filename));
561 goto end;
562 error:
564 end:
566}
567
569static OT_ProcRet NS(LcConfigC_ReadString) (LcConfigC_ARGS) {
572 MK_STRN str = 0;
575 MkErrorC_Check(hdl,LcConfigReadString (hdl, str));
577 goto end;
578 error:
580 end:
582}
583
585static OT_ProcRet NS(LcConfigC_WriteFile) (LcConfigC_ARGS) {
588 MK_STRN filename = 0;
591 MkErrorC_Check(hdl,LcConfigWriteFile (hdl, filename));
593 goto end;
594 error:
596 end:
598}
599
600// doc-key: LcConfigC,LcConfigC-Misc,omo
601
603static OT_ProcRet NS(LcConfigC_WriteString) (LcConfigC_ARGS) {
607 MK_STRN val_out;
608 MkErrorC_Check(hdl,LcConfigWriteString (hdl, &val_out));
609 OT_retObj_SET_STR(val_out);
610 goto end;
611 error:
613 end:
615}
616
618// LcConfigC_Misc_PY_API
619
623
624// doc-key: LcConfigC,LcConfigC-Set,om_
625
627static OT_ProcRet NS(LcConfigC_SetDefaultFormat) (LcConfigC_ARGS) {
630 enum LcConfigFormatE format = 0;
633 LcConfigSetDefaultFormat (hdl, format);
635 goto end;
636 error:
638 end:
640}
641
643static OT_ProcRet NS(LcConfigC_SetFloatPrecision) (LcConfigC_ARGS) {
646 MK_I16 digits = 0;
649 LcConfigSetFloatPrecision (hdl, digits);
651 goto end;
652 error:
654 end:
656}
657
659static OT_ProcRet NS(LcConfigC_SetIncludeDir) (LcConfigC_ARGS) {
662 MK_STRN include_dir = 0;
663 OT_CHECK_REQUIRED(OT_CHECK_STRN (include_dir))
665 LcConfigSetIncludeDir (hdl, include_dir);
667 goto end;
668 error:
670 end:
672}
673
675static OT_ProcRet NS(LcConfigC_SetIncludeFunc) (LcConfigC_ARGS) {
678 OT_SETUP_CALLABLE(fConfigIncludeData)
679 OT_CHECK_OPTIONAL(OT_CHECK_CALLABLE(fConfigIncludeData))
681 LcConfigIncludeCallF fConfigIncludeCall = (fConfigIncludeData == NULL ? NULL : NS(ConfigIncludeCall));
682 MkErrorC_Check(hdl,LcConfigSetIncludeFunc (hdl, fConfigIncludeCall, fConfigIncludeData, NS(ConfigIncludeFree)));
684 goto end;
685 error:
687 end:
688 OT_CLEANUP_CALLABLE(fConfigIncludeData)
690}
691
693static OT_ProcRet NS(LcConfigC_SetOption) (LcConfigC_ARGS) {
696 enum LcConfigOptionsEF option = 0;
698 MK_BOOL flag = 0;
701 LcConfigSetOption (hdl, option, flag);
703 goto end;
704 error:
706 end:
708}
709
711static OT_ProcRet NS(LcConfigC_SetOptions) (LcConfigC_ARGS) {
714 enum LcConfigOptionsEF options = 0;
717 LcConfigSetOptions (hdl, options);
719 goto end;
720 error:
722 end:
724}
725
727static OT_ProcRet NS(LcConfigC_SetSettingDeleteFunc) (LcConfigC_ARGS) {
730 OT_SETUP_CALLABLE(fSettingDeleteData)
731 OT_CHECK_OPTIONAL(OT_CHECK_CALLABLE(fSettingDeleteData))
733 LcSettingDeleteCallF fSettingDeleteCall = (fSettingDeleteData == NULL ? NULL : NS(SettingDeleteCall));
734 MkErrorC_Check(hdl,LcConfigSetSettingDeleteFunc (hdl, fSettingDeleteCall, fSettingDeleteData, NS(SettingDeleteFree)));
736 goto end;
737 error:
739 end:
740 OT_CLEANUP_CALLABLE(fSettingDeleteData)
742}
743
745static OT_ProcRet NS(LcConfigC_SetTabWidth) (LcConfigC_ARGS) {
748 MK_I16 width = 0;
751 LcConfigSetTabWidth (hdl, width);
753 goto end;
754 error:
756 end:
758}
759
761// LcConfigC_Set_PY_API
762
766
767// doc-key: LcConfigC,LcConfigC-TOR,sCc
768
770static OT_ProcRet NS(LcConfigC_Create) (OtClass_ARGS) {
774 LC_CFG retVal = LcConfigCreate (NULL, NULL);
775 if (retVal == NULL) {
776 OT_ERROR_CONSTRUCTOR(LcConfigC);
777 goto error;
778 }
779 OT_CONSTRUCTOR_POST(retVal)
780 OT_retObj_SET_CFG(retVal);
781 goto end;
782 error:
784 end:
786}
787
789static OT_ProcRet NS(LcConfigC_new) (CONSTR_ARGS) {
792 LC_CFG retVal = LcConfigCreate (NULL, NULL);
793 if (retVal == NULL) {
794 OT_ERROR_CONSTRUCTOR(LcConfigC);
795 goto error;
796 }
797 OT_CONSTRUCTOR_POST(retVal)
798 OT_retObj_CONSTR(retVal);
799 goto end;
800 error:
802 end:
804}
805
807// LcConfigC_TOR_PY_API
808
809// END-LcConfigC - created by 'py_MqC.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
810
811// vim: Marker(t)
817
818static PyMethodDef LcConfigC_Methods[] = {
819
820 // BEGIN-CLASS - created by 'py_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
821
822 // doc-key: LcConfigC,LcConfig,sCc
823 { "Create" , (PyCFunction) NS(LcConfigC_Create) , METH_NOARGS|METH_CLASS , Create_doc },
824
825 // doc-key: LcConfigC,LcConfig,sc_
826 { "GetNull" , (PyCFunction) NS(LcConfigC_GetNull) , METH_NOARGS|METH_CLASS , GetNull_doc },
827 { "HandleResolve" , (PyCFunction) NS(LcConfigC_HandleResolve) , METH_O|METH_CLASS , HandleResolve_doc },
828 { "Instances" , (PyCFunction) NS(LcConfigC_Instances) , METH_NOARGS|METH_CLASS , Instances_doc },
829
830 // END-CLASS - created by 'py_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
831
832 // BEGIN-OBJ - created by 'py_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
833
834 // doc-key: LcConfigC,LcConfig,oc_
835 { "Lookup" , (PyCFunction) NS(LcConfigC_Lookup) , METH_O , Lookup_doc },
836 { "Next" , (PyCFunction) NS(LcConfigC_Next) , METH_NOARGS , Next_doc },
837 { "Prev" , (PyCFunction) NS(LcConfigC_Prev) , METH_NOARGS , Prev_doc },
838 { "RootSetting" , (PyCFunction) NS(LcConfigC_RootSetting) , METH_NOARGS , RootSetting_doc },
839
840 // doc-key: LcConfigC,LcConfig,om_
841 { "Clear" , (PyCFunction) NS(LcConfigC_Clear) , METH_NOARGS , Clear_doc },
842 { "ErrorType" , (PyCFunction) NS(LcConfigC_ErrorType) , METH_NOARGS , ErrorType_doc },
843 { "GetDefaultFormat" , (PyCFunction) NS(LcConfigC_GetDefaultFormat) , METH_NOARGS , GetDefaultFormat_doc },
844 { "GetFloatPrecision" , (PyCFunction) NS(LcConfigC_GetFloatPrecision) , METH_NOARGS , GetFloatPrecision_doc },
845 { "GetIncludeDir" , (PyCFunction) NS(LcConfigC_GetIncludeDir) , METH_NOARGS , GetIncludeDir_doc },
846 { "GetOption" , (PyCFunction) NS(LcConfigC_GetOption) , METH_O , GetOption_doc },
847 { "GetOptions" , (PyCFunction) NS(LcConfigC_GetOptions) , METH_NOARGS , GetOptions_doc },
848 { "GetTabWidth" , (PyCFunction) NS(LcConfigC_GetTabWidth) , METH_NOARGS , GetTabWidth_doc },
849 // skip class-overload: LcConfigHandleGet → HandleGet, NS(LcConfigC_HandleGet)
850 { "Log" , (PyCFunction) NS(LcConfigC_Log) , METH_VARARGS , Log_doc },
851 { "ReadFile" , (PyCFunction) NS(LcConfigC_ReadFile) , METH_O , ReadFile_doc },
852 { "ReadString" , (PyCFunction) NS(LcConfigC_ReadString) , METH_O , ReadString_doc },
853 { "SetDefaultFormat" , (PyCFunction) NS(LcConfigC_SetDefaultFormat) , METH_O , SetDefaultFormat_doc },
854 { "SetFloatPrecision" , (PyCFunction) NS(LcConfigC_SetFloatPrecision) , METH_O , SetFloatPrecision_doc },
855 { "SetIncludeDir" , (PyCFunction) NS(LcConfigC_SetIncludeDir) , METH_O , SetIncludeDir_doc },
856 { "SetIncludeFunc" , (PyCFunction) NS(LcConfigC_SetIncludeFunc) , METH_VARARGS , SetIncludeFunc_doc },
857 { "SetOption" , (PyCFunction) NS(LcConfigC_SetOption) , METH_VARARGS , SetOption_doc },
858 { "SetOptions" , (PyCFunction) NS(LcConfigC_SetOptions) , METH_O , SetOptions_doc },
859 { "SetSettingDeleteFunc" , (PyCFunction) NS(LcConfigC_SetSettingDeleteFunc) , METH_VARARGS , SetSettingDeleteFunc_doc },
860 { "SetTabWidth" , (PyCFunction) NS(LcConfigC_SetTabWidth) , METH_O , SetTabWidth_doc },
861 { "WriteFile" , (PyCFunction) NS(LcConfigC_WriteFile) , METH_O , WriteFile_doc },
862
863 // doc-key: LcConfigC,LcConfig,omo
864 { "LookupBool" , (PyCFunction) NS(LcConfigC_LookupBool) , METH_O , LookupBool_doc },
865 { "LookupFloat" , (PyCFunction) NS(LcConfigC_LookupFloat) , METH_O , LookupFloat_doc },
866 { "LookupInt" , (PyCFunction) NS(LcConfigC_LookupInt) , METH_O , LookupInt_doc },
867 { "LookupInt64" , (PyCFunction) NS(LcConfigC_LookupInt64) , METH_O , LookupInt64_doc },
868 { "LookupString" , (PyCFunction) NS(LcConfigC_LookupString) , METH_O , LookupString_doc },
869 { "WriteString" , (PyCFunction) NS(LcConfigC_WriteString) , METH_NOARGS , WriteString_doc },
870
871 // END-OBJ - created by 'py_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
872
873 {NULL, NULL, 0, NULL} /* Sentinel */
874};
875
881
883 PyVarObject_HEAD_INIT(NULL, 0)
884 .tp_name = "pymsgque.LcConfigC",
885 .tp_doc = "PyMsgque LcConfigC Type",
886 .tp_basicsize = sizeof(LcConfigC_Obj),
887 .tp_itemsize = 0,
888 .tp_new = (newfunc) NS(LcConfigC_new),
889 .tp_flags = Py_TPFLAGS_DEFAULT,
890 .tp_methods = LcConfigC_Methods,
891 .tp_base = NULL
892};
893
894int NS(pLcConfigC_Init) ( MK_RT_ARGS PyObject* m)
895{
897
898 return 0;
899error:
900 return -1;
901}
902
903// vim: nowrap
#define Instances_doc
#define SetIncludeFunc_doc
#define WriteString_doc
#define ReadString_doc
#define ReadFile_doc
#define SetIncludeDir_doc
#define OT_SETUP_hdl_static_constr
#define Lookup_doc
#define SetOption_doc
#define OT_SETUP_hdl
#define LookupBool_doc
#define OT_retObj_CONSTR(mng)
#define LookupFloat_doc
#define ErrorType_doc
#define Log_doc
#define SetOptions_doc
#define SetTabWidth_doc
#define GetNull_doc
#define SetSettingDeleteFunc_doc
#define Next_doc
#define GetTabWidth_doc
#define Create_doc
#define HandleResolve_doc
#define LookupInt_doc
#define Prev_doc
#define SetFloatPrecision_doc
#define OT_CLASS
#define LookupString_doc
#define OT_SETUP_hdl_static
#define OT_SETUP_hdl_constr
#define GetFloatPrecision_doc
static PyMethodDef LcConfigC_Methods[]
#define WriteFile_doc
#define SetDefaultFormat_doc
#define new_doc
#define RootSetting_doc
#define LookupInt64_doc
#define GetOptions_doc
#define Clear_doc
#define GetOption_doc
#define ClassInit
#define GetDefaultFormat_doc
#define GetIncludeDir_doc
tag: nhi1-release-250425
#define LcConfigC_ARGS
#define OT_retObj_SET_CFG(nat)
#define OT_retObj_SET_CFS(nat)
#define NS(n)
struct LcConfigC_Obj LcConfigC_Obj
#define OT_NEW_Lc_enum_OBJ(typ, val)
#define OT_CHECK_bool(val)
#define OT_SELF
#define MK(n)
#define OT_SETUP_VARARGS(min, max, d)
#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_retObj_SET_I16(nat)
#define OT_retObj_SET_Error
#define OT_CONSTRUCTOR_POST(x)
#define OT_FRAME_CLEANUP
#define OT_ERROR_CONSTRUCTOR(class)
#define OT_retObj_SET_DBL(nat)
#define OT_retObj_SET_I64(nat)
#define OT_CHECK_REQUIRED(val)
#define OT_retObj_SET_None
#define OT_retObj_SET_I32(nat)
PyTypeObject * OT_CLS_T
#define OT_SETUP_CONSTRUCTOR_ARGS(...)
#define OT_retObj_RETURN
#define OT_GET_CALL_PROC
PyObject * OT_OBJ_T
#define OT_CHECK_NI2(val)
#define OT_retObj_SET_STR(nat)
#define OT_CLASS_TYPE_REF
#define OT_CHECK_OPTIONAL(val)
#define OT_retObj_SET(val)
#define OT_CHECK_NOARGS
#define MkErrorC_Check(mng, PROC)
#define OT_ProcRet
#define CONSTR_ARGS
#define OtClass_ARGS
#define OT_CHECK_STRN(val)
enum MkErrorE(* LcSettingDeleteCallF)(LcSettingDeleteCallF_ARGS)
enum MkErrorE(* LcConfigIncludeCallF)(LcConfigIncludeCallF_ARGS)
#define LcConfigInstances()
static LC_CFG LcConfigPrev(LC_CFG const cfg)
get previous instance from linked-list of LcConfigS type
static LC_CFG LcConfigNext(LC_CFG const cfg)
get next instance from linked-list of LcConfigS type
static LC_CFG LcConfigGetNull(void)
Null-Slot - return a LcConfigC typed NULL instance …
#define LcConfigHandleResolve(...)
#define LcConfigC_X2obj(x)
static enum LcErrorTypeE LcConfigErrorType(LC_CFGN config)
This function, which is implemented as a macro, returns the type of error that occurred during the la...
static enum LcConfigFormatE LcConfigGetDefaultFormat(LC_CFGN config)
These functions, which are implemented as macros, get and set the default external format for setting...
static MK_I16 LcConfigGetTabWidth(LC_CFGN config)
These functions, which are implemented as macros, get and set the tab width for the configuration con...
static MK_BOOL LcConfigGetOption(LC_CFGN config, enum LcConfigOptionsEF option)
Since v1.7 These functions get and set the given option of the configuration config …
static MK_I16 LcConfigGetFloatPrecision(LC_CFGN config)
Since v1.6 These functions get and set the number of decimal digits to output after the radix charact...
static enum LcConfigOptionsEF LcConfigGetOptions(LC_CFGN config)
These functions get and set the options for the configuration config …
static MK_STRN LcConfigGetIncludeDir(LC_CFGN config)
ConfigSetIncludeDir specifies the include directory, include_dir, relative to which the files specifi...
static enum MkErrorE LcConfigLookupFloat(LC_CFGN config, MK_STRN path, MK_DBL *value_out)
These functions look up the value of the setting in the configuration config specified by the path pa...
static enum MkErrorE LcConfigLookupBool(LC_CFGN config, MK_STRN path, MK_BOOL *value_out)
These functions look up the value of the setting in the configuration config specified by the path pa...
static enum MkErrorE LcConfigLookupString(LC_CFGN config, MK_STRN path, MK_STRN *value_out)
These functions look up the value of the setting in the configuration config specified by the path pa...
static enum MkErrorE LcConfigLookupInt(LC_CFGN config, MK_STRN path, MK_I32 *value_out)
These functions look up the value of the setting in the configuration config specified by the path pa...
static enum MkErrorE LcConfigLookupInt64(LC_CFGN config, MK_STRN path, MK_I64 *value_out)
These functions look up the value of the setting in the configuration config specified by the path pa...
static LC_CFS LcConfigLookup(LC_CFGN config, MK_STRN path)
This function locates the setting in the configuration config specified by the path path …
static enum MkErrorE LcConfigWriteFile(LC_CFG config, MK_STRN filename)
This function writes the configuration config to the file named filename …
#define LcConfigWriteString(...)
static LC_CFS LcConfigRootSetting(LC_CFGN config)
This function, which is implemented as a macro, returns the root setting for the configuration config...
#define LcConfigLog(...)
static void LcConfigClear(LC_CFG config)
Since v1.7 This function clears the configuration config …
static enum MkErrorE LcConfigReadFile(LC_CFG config, MK_STRN filename)
This function reads and parses a configuration from the file named filename into the configuration ob...
static enum MkErrorE LcConfigReadString(LC_CFG config, MK_STRN str)
This function reads and parses a configuration from the string str into the configuration object conf...
static void LcConfigSetTabWidth(LC_CFG config, MK_I16 width)
These functions, which are implemented as macros, get and set the tab width for the configuration con...
static void LcConfigSetFloatPrecision(LC_CFG config, MK_I16 digits)
Since v1.6 These functions get and set the number of decimal digits to output after the radix charact...
#define LcConfigSetSettingDeleteFunc(...)
static void LcConfigSetOptions(LC_CFG config, enum LcConfigOptionsEF options)
These functions get and set the options for the configuration config …
static void LcConfigSetOption(LC_CFG config, enum LcConfigOptionsEF option, MK_BOOL flag)
Since v1.7 These functions get and set the given option of the configuration config …
static void LcConfigSetIncludeDir(LC_CFG config, MK_STRN include_dir)
ConfigSetIncludeDir specifies the include directory, include_dir, relative to which the files specifi...
#define LcConfigSetIncludeFunc(...)
static void LcConfigSetDefaultFormat(LC_CFG config, enum LcConfigFormatE format)
These functions, which are implemented as macros, get and set the default external format for setting...
static LC_CFG LcConfigCreate(MK_TYP type, config_t *nat)
create a LcConfigC instance …
LcConfigFormatE
set the format of a LcSettingC …
Definition LcEnum_lc.h:30
LcConfigOptionsEF
define the configuration-option of a LcConfigC …
Definition LcEnum_lc.h:134
#define mk_inline
#define MK_NULL_YES
#define MK_UNUSED
#define MK_DEPRECATED
MK_PTRB * MK_PTR
const MK_STRB * MK_STRN
signed long long MK_I64
bool MK_BOOL
signed short int MK_I16
double MK_DBL
int32_t MK_HDL
signed int MK_I32
int MK_DBG
static bool MkSysStringIsNULL(MK_STRN str)
static MK_I32 MkRuntimeDebugGet(void)
#define MK_RT_CALL
#define MK_RT_ARGS
#define OT_CHECK_NIH(val)
#define OT_CHECK_CALLABLE(val)
#define OT_CLEANUP_CALLABLE(val)
#define OT_CHECK_ENUM(ename, val)
#define OT_SETUP_CALLABLE(val)
#define OT_CHECK_OBJN(val, nullB)
Struct to represent the data from the LcConfigC …
Struct to represent the data from the LcSettingC …
PyObject_HEAD MK_OBJ hdl