theConfig 10.0
Loading...
Searching...
No Matches
LibLcConfig_py.h
Go to the documentation of this file.
1
9#pragma once
10
11#include "LibMkKernel_py.h"
12#include "LibLcConfig_lc.h"
13
14/*****************************************************************************/
15/* */
16/* Macro_API */
17/* */
18/*****************************************************************************/
19
20// BEGIN-HEADER - created by 'py_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
21
22#undef HEADER
23#define HEADER
24
25// If the source of liblcconfig is direct used in an external library
26// (without dynamic linking) and this library should *not* export
27// the symbol's of liblcconfig then the flag META_IGNORE_EXTERN have
28// to be set
29#undef LC_PY_EXTERN
30#if defined(META_IGNORE_EXTERN)
31# define LC_PY_EXTERN
32#elif defined(PIC)
33 // does we build a DLL ?
34# if defined(DLL_EXPORT)
35 // does we build the liblcconfig library ?
36# if defined(LC_PY_BUILD_DLL)
37# define LC_PY_EXTERN __declspec(dllexport)
38# else
39# define LC_PY_EXTERN __declspec(dllimport)
40# endif
41# else
42 // no DLL - architecture specific extern specifier
43# define LC_PY_EXTERN __attribute__ ((visibility("default")))
44# endif
45#else
47# define LC_PY_EXTERN
48#endif
49
50// external data lookup
51#undef LC_PY_EXTERN_DATA
52#if defined(META_PRIVATE)
53# define LC_PY_EXTERN_DATA extern
54#elif defined(META_IGNORE_EXTERN)
55# define LC_PY_EXTERN_DATA extern
56#elif defined(PIC)
57 // does we build a DLL ?
58# if defined(DLL_EXPORT)
59 // does we build the liblcconfig library ?
60# if defined(LC_PY_BUILD_DLL)
61# define LC_PY_EXTERN_DATA __declspec(dllexport)
62# else
63# define LC_PY_EXTERN_DATA __declspec(dllimport)
64# endif
65# else
66 // no DLL - architecture specific extern specifier
67# define LC_PY_EXTERN_DATA __attribute__ ((visibility("default"))) extern
68# endif
69#else
70# define LC_PY_EXTERN_DATA extern
71#endif
72
73#undef LC
74#define LC(n) pylcconfig_ ## n
75#undef NS
76#define NS(n) pylcconfig_ ## n
77
78// END-HEADER - created by 'py_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
79
80/*****************************************************************************/
81/* */
82/* Module API */
83/* */
84/*****************************************************************************/
85
86// BEGIN-CLASS-DEC - created by 'py_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
87
88int NS(pLcConfigC_Init) (MK_RT_ARGS OT_OBJ_T) ;
89int NS(pLcSettingC_Init) (MK_RT_ARGS OT_OBJ_T) ;
90
91// END-CLASS-DEC - created by 'py_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
92
93typedef struct {
94 // BEGIN-EnumThreadState - created by 'py_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
95
96 PyTypeObject* LcConfigFormatE;
97 PyTypeObject* LcConfigOptionsEF;
98 PyTypeObject* LcConfigTypeE;
99 PyTypeObject* LcErrorE;
100 PyTypeObject* LcErrorTypeE;
101
102 // END-EnumThreadState - created by 'py_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
103 // BEGIN-ClassThreadState - created by 'py_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
104
107
108 // END-ClassThreadState - created by 'py_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
109 // BEGIN-ClassThreadStateNull - created by 'py_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
110
113
114 // END-ClassThreadStateNull - created by 'py_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
115
117
119
120/*****************************************************************************/
121/* */
122/* Class_API */
123/* */
124/*****************************************************************************/
125
126// BEGIN-CLASS - created by 'py_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
127
128// ----------------------------------------------------------------------
129// class: LcConfigC
130
131 // class struct
132 typedef struct LcConfigC_Obj {
133 PyObject_HEAD
136
138 #define LcConfigC_lngO (&LC(LcConfigCR))
139 #define LcConfigC_base (&MK(MkObjectCR))
140
141 // MK_NULL singelton
142 #define LcConfigC_MK_NULL LC(LcConfigThreadState).LcConfigC_MK_NULL
143
144 // arguments
145 #define LcConfigC_ARGS LcConfigC_Obj *self, PyObject *objv
146 #define LcConfigC_ARGS_CALL self, objv
147
148 // return object
149 #define OT_retObj_SET_CFG(nat) retObj = LC(LcConfigC_ObjNew) (MK_RT_CALL &LC(LcConfigCR),nat)
150
151 // new objec
152 #define OT_TMP_CFG_OBJ(val) LC(LcConfigC_ObjNew)(MK_RT_CALL &LC(LcConfigCR),val)
155 return hdl ? MK(AtomObjNew)(MK_RT_CALL type,LcConfigC_X2obj(hdl)) : Py_NewRef(LcConfigC_MK_NULL);
156 }
157
158 // cast from LNG to MQ
159 #define VAL2CFG(val) ((LcConfigC_Obj*) (val))->hdl
160
161// ----------------------------------------------------------------------
162// class: LcSettingC
163
164 // class struct
165 typedef struct LcSettingC_Obj {
166 PyObject_HEAD
169
171 #define LcSettingC_lngO (&LC(LcSettingCR))
172 #define LcSettingC_base (&MK(MkObjectCR))
173
174 // MK_NULL singelton
175 #define LcSettingC_MK_NULL LC(LcConfigThreadState).LcSettingC_MK_NULL
176
177 // arguments
178 #define LcSettingC_ARGS LcSettingC_Obj *self, PyObject *objv
179 #define LcSettingC_ARGS_CALL self, objv
180
181 // return object
182 #define OT_retObj_SET_CFS(nat) retObj = LC(LcSettingC_ObjNew) (MK_RT_CALL &LC(LcSettingCR),nat)
183
184 // new objec
185 #define OT_TMP_CFS_OBJ(val) LC(LcSettingC_ObjNew)(MK_RT_CALL &LC(LcSettingCR),val)
188 return hdl ? MK(AtomObjNew)(MK_RT_CALL type,LcSettingC_X2obj(hdl)) : Py_NewRef(LcSettingC_MK_NULL);
189 }
190
191 // cast from LNG to MQ
192 #define VAL2CFS(val) ((LcSettingC_Obj*) (val))->hdl
193
194// END-CLASS - created by 'py_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
195
196// check *********************************************************************************
197
199
200/*****************************************************************************/
201/* */
202/* Enum_API */
203/* */
204/*****************************************************************************/
205
206#define OT_NEW_Lc_enum_OBJ(typ,val) PyObject_CallFunction((PyObject*)(Lc ## typ ## _lngO),"i",val)
207
208// BEGIN-EnumExtern - created by 'py_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
209
210#define LcConfigFormatE_lngO (LC(LcConfigThreadState).LcConfigFormatE)
211#define LcConfigOptionsEF_lngO (LC(LcConfigThreadState).LcConfigOptionsEF)
212#define LcConfigTypeE_lngO (LC(LcConfigThreadState).LcConfigTypeE)
213#define LcErrorE_lngO (LC(LcConfigThreadState).LcErrorE)
214#define LcErrorTypeE_lngO (LC(LcConfigThreadState).LcErrorTypeE)
215
216// END-EnumExtern - created by 'py_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
217
218/*****************************************************************************/
219/* */
220/* debugging */
221/* */
222/*****************************************************************************/
223
224#undef HEADER
tag: nhi1-release-250425
#define LcConfigC_MK_NULL
#define LcSettingC_MK_NULL
#define NS(n)
struct LcSettingC_Obj LcSettingC_Obj
struct LcConfigC_Obj LcConfigC_Obj
#define LC(n)
#define LC_PY_EXTERN_DATA
tag: nhi1-release-250425
#define MK(n)
#define MK_PY_EXTERN_DATA
PyTypeObject * OT_CLS_T
PyObject * OT_OBJ_T
#define OT_CLASS_TYPE_REF
static MK_ARTIFICIAL LC_CFG LcConfigC_ObjNew(config_t *hdl)
return Programming-Language-Micro-Kernel (PLMK) instance from native hdl …
#define LcConfigC_X2obj(x)
static MK_ARTIFICIAL LC_CFS LcSettingC_ObjNew(config_setting_t *hdl)
return Programming-Language-Micro-Kernel (PLMK) instance from native hdl …
#define LcSettingC_X2obj(x)
#define mk_inline
#define MK_ARTIFICIAL
#define MkThreadLocal
#define MK_RT_CALL
#define MK_RT_ARGS
tag: nhi1-release-250425
PyObject_HEAD LC_CFG hdl
Struct to represent the data from the LcConfigC …
PyObject * LcSettingC_MK_NULL
PyTypeObject * LcErrorE
PyTypeObject * LcConfigFormatE
PyTypeObject * LcErrorTypeE
PyTypeObject * LcConfigTypeE
PyTypeObject * LcConfigOptionsEF
PyObject_HEAD LC_CFS hdl
Struct to represent the data from the LcSettingC …