11#define META_FILE_NAME "LcConfigC_py.c"
16#define OT_CLASS (&NS(LcConfigCR))
17#define OT_CLASS_NAME "LcConfigC"
19#define OT_LNG2META(O) LcCfg(VAL2MNG(O))
21#define OT_retObj_CONSTR(mng) OT_retObj_SET(NS(LcConfigC_CTOR)(MK_RT_CALL (PyTypeObject*)class,mng))
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;
31#define OT_SETUP_hdl_static_constr OT_SETUP_hdl_static
33#if !defined(SetupRtFromObj_X)
34 #define SetupRtFromObj_X(hdl) AllRtSetup_X(hdl)
35 #define SetupRtFromObj_XN(hdl) AllRtSetup_XN(hdl)
40#define LcConfigCTT LC(LcConfigThreadState).LcConfigCTT
67 if (LcConfigCTT == NULL) LcConfigCTT = LcConfigSTT; \
70 if (LcConfigCTT->selfCreate == NS(LcConfigC_selfCreate)) return MK_OK; \
73 LcConfigCTT->selfCreate = NS(LcConfigC_selfCreate); \
74 LcConfigCTT->selfDelete = NS(LcConfigC_selfDelete); \
75 LcConfigCTT->selfUnlink = NS(LcConfigC_selfUnlink); \
77 if (!PyType_HasFeature(OT_CLASS,Py_TPFLAGS_READY)) { \
78 NS(LcConfigCR).tp_base = LcConfigC_base; \
79 OtErrorCheckLng (PyType_Ready(OT_CLASS)); \
81 OtErrorCheckLng(PyModule_AddObjectRef(m, "LcConfigC", (PyObject *)OT_CLASS)); \
84 LcConfigC_MK_NULL = Py_NewRef(MK(AtomCreate) (MK_RT_CALL OT_CLASS, NULL ));
88#define META_CONTEXT_S MK_ERROR_DEFAULT
99#define Create_doc "LcConfigC LcConfigC.Create()"
100#define new_doc "LcConfigC LcConfigC.new()"
103#define GetNull_doc "LcConfigC LcConfigC.GetNull()"
104#define HandleResolve_doc "LcConfigC LcConfigC.HandleResolve(netHdl:MK_HDL)"
105#define Instances_doc "LcConfigC LcConfigC.Instances()"
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)"
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)"
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)"
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)"
775 if (retVal == NULL) {
793 if (retVal == NULL) {
823 {
"Create" , (PyCFunction)
NS(LcConfigC_Create) , METH_NOARGS|METH_CLASS ,
Create_doc },
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 },
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 },
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 },
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 },
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 },
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 },
860 {
"SetTabWidth" , (PyCFunction)
NS(LcConfigC_SetTabWidth) , METH_O ,
SetTabWidth_doc },
861 {
"WriteFile" , (PyCFunction)
NS(LcConfigC_WriteFile) , METH_O ,
WriteFile_doc },
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 },
873 {NULL, NULL, 0, NULL}
883 PyVarObject_HEAD_INIT(NULL, 0)
884 .tp_name =
"pymsgque.LcConfigC",
885 .tp_doc =
"PyMsgque LcConfigC Type",
888 .tp_new = (newfunc)
NS(LcConfigC_new),
889 .tp_flags = Py_TPFLAGS_DEFAULT,
#define SetIncludeFunc_doc
#define SetIncludeDir_doc
#define OT_SETUP_hdl_static_constr
#define OT_retObj_CONSTR(mng)
#define SetSettingDeleteFunc_doc
#define HandleResolve_doc
#define SetFloatPrecision_doc
#define OT_SETUP_hdl_static
#define OT_SETUP_hdl_constr
#define GetFloatPrecision_doc
static PyMethodDef LcConfigC_Methods[]
#define SetDefaultFormat_doc
#define GetDefaultFormat_doc
#define GetIncludeDir_doc
#define OT_retObj_SET_CFG(nat)
#define OT_retObj_SET_CFS(nat)
struct LcConfigC_Obj LcConfigC_Obj
#define OT_NEW_Lc_enum_OBJ(typ, val)
#define OT_CHECK_bool(val)
#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_ERROR_CONSTRUCTOR(class)
#define OT_retObj_SET_DBL(nat)
#define OT_retObj_SET_I64(nat)
#define OT_CHECK_REQUIRED(val)
#define OT_retObj_SET_None
#define OT_retObj_SET_I32(nat)
#define OT_SETUP_CONSTRUCTOR_ARGS(...)
#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 MkErrorC_Check(mng, PROC)
#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...
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 …
LcConfigOptionsEF
define the configuration-option of a LcConfigC …
static bool MkSysStringIsNULL(MK_STRN str)
static MK_I32 MkRuntimeDebugGet(void)
#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 …