theConfig 10.0
Loading...
Searching...
No Matches
LcSettingC_def_lc.h
Go to the documentation of this file.
1
9/* LABEL-START */
10#pragma once
11
12#include "LibLcConfig_lc.h"
13/* LABEL-END */
14
16
17// BEGIN-Class-Doc-Order - created by 'c_Class.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
18
19// external
25
26// END-Class-Doc-Order - created by 'c_Class.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
27
28// MARK_C ==================================================================
29
33
35struct LcSettingS {
36 // BEGIN-LcSettingS-super - created by 'c_Class.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
37
38 union {
39 struct MkObjectS obj; // instance-base MkObjectS
41
42 // END-LcSettingS-super - created by 'c_Class.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
43
44 // BEGIN-LcSettingS-native - created by 'c_Class.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
45
47
48 // END-LcSettingS-native - created by 'c_Class.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
49};
50
51// MARK_D ==================================================================
52// BEGIN-LcSettingS-Definition - created by 'c_Class.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
53
57 __parser__push__(prefix=Class, doc-group=Define, doc-index=Class);
58
59// Signature --------------------------------------------------------------
62
63 #define LcSettingC_SIGNATURE (MkObjectC_SIGNATURE ^ (17u<<10))
64 #define LcSettingC_MASK (((1u<<22)-1)<<10)
65
67
68// CompileTimeCast --------------------------------------------------------------
71
72 #define LcSettingC_X2cfs(x) (x)
73 #define LcSettingC_X2obj(x) MkOBJ(x)
74
76
77// TypeDef --------------------------------------------------------------
80
82 __parser__(ignore) typedef struct LcSettingS LcSettingCR;
84 __parser__(ignore) typedef const struct LcSettingS LcSettingCNR;
88 #define LcSettingC_T ( (struct MkTypeDefS *) (LcSettingC_TT) )
90 #define LcSettingST LcSettingC_T
92 #define LcSettingSTT (MkTYP(LcSettingST))
94 #define LcSettingC_type LC_CFS
96 #define LcSettingCT_X(instance) ( (struct MkTypeDefS *) (MkOBJ_R(instance).type) )
98 #define LcSettingCTT_X(instance) (MkOBJ_R(instance).type)
100 #define LcSettingCT_TT(typ) ( (struct MkTypeDefS *) (typ) )
102 #define LcSettingC_NS LC
104 #define LcSettingCTT LcSettingCTT
106 #define LcSettingCT ( (struct MkTypeDefS *) LcSettingCTT )
107
109
110// TypeCheck --------------------------------------------------------------
113
114 #pragma GCC diagnostic push
115 #pragma GCC diagnostic ignored "-Wattributes"
116
119 __parser__(class=LcSettingC,static,hide)
122 return MkSanitizeCheck(LcSettingC,mng);
123 }
124
127 __parser__(class=LcSettingC,static,hide)
130 return MkSanitizeCheckO(LcSettingC,obj);
131 }
132
133 #pragma GCC diagnostic pop
134 #define LcSettingC_Check(mng) LcCfsCheck(mng)
135
137
138// RunTimeCast --------------------------------------------------------------
141
143 __parser__(class=LcSettingC,hide,static)
144 META_ATTRIBUTE_SANITIZE
147 return (LcCfsCheck(mng) ? (LC_CFS)mng : NULL);
148 }
149
151 __parser__(class=LcSettingC,hide,static)
152 META_ATTRIBUTE_SANITIZE
155 return (LcCfsCheck(mng) ? (LC_CFSN)mng : NULL);
156 }
157
159 #define LcCfsRaise(_cfs) if (!_MkCheckX(LcSettingC,_cfs)) { \
160 MkErrorSetC_1E("'LcSettingC' hdl is NULL"); \
161 goto error ; \
162 }
163
165 #define LcCFS_R(x) (*(x)).super.cfs
167 #define LcCFS(x) (&LcCFS_R(x))
168
170
173// LcSettingC_Class_Define_C_API
174
175// END-LcSettingS-Definition - created by 'c_Class.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
176
178
179// MARK_C ==================================================================
180
183#define LcGetCfsFromNat(_nat) LC_SET_T(LcSettingC,config_setting_get_hook,_nat)
184
185// =========================================================================
186// BEGIN-LcSettingS-Export - created by 'c_Class.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
187
190
193
194__parser__push__(doc-group=_ignore_,doc-index=Class,doc-name=Export,class=LcSettingC);
195
198__parser__(internal)
201 return LcGetCfsFromNat(hdl);
202}
203
205__parser__(internal)
208 return LcGetCfsFromNat(hdl);
209}
210
226__parser__(class-overload=MkObjectHandleGet)
230 LC_CFS const cfs __parser__(null-allowed)
231) {
232 return MkObjectHandleGet(cfs?MkOBJ(cfs):NULL);
233}
234
243__parser__(flags=new)
247 MK_HDL const netHdl
248) {
249 return LcCfs(MkObjectHandleResolve(netHdl));
250}
251
261#define LcSettingHandleResolve_e(netHdl) ({ \
262 MK_HDL tmpHdl=netHdl; \
263 LC_CFS tmp; \
264 if (tmpHdl==0) { \
265 tmp=NULL; \
266 } else { \
267 tmp=LcSettingHandleResolve(tmpHdl); \
268 if (tmp==NULL) { \
269 MkErrorSetC_1_NULL("ERROR: 'LcSettingC' handle is 'NULL'"); \
270 goto error; \
271 }; \
272 }; \
273 tmp; \
274})
275
277
279// Class export & import
280
284 __parser__(flags=new,doc-group=_ignore_,doc-index=Class,doc-name=Misc,class=LcSettingC,null-return-allow)
287 return (LC_CFS)MK_NULL;
288 }
290// LcSettingC - Misc - function
291
293// LcSettingC_Class_C_API
294
295// END-LcSettingS-Export - created by 'c_Class.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
296
297// =========================================================================
298// BEGIN-Class-Introspection - created by 'c_Class.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
299
304
305__parser__push__(doc-name=Introspection,doc-index=Class,class=LcSettingC,no-rpc,null-return-allow,flags=new);
306
314
318 MK_INSTANCE_HDL(cfs);
319 return (LC_CFS)LcSettingC_X2obj(cfs)->obj_protect.next;
320}
321
325 MK_INSTANCE_HDL(cfs);
326 return (LC_CFS)LcSettingC_X2obj(cfs)->obj_protect.prev;
327}
328
330
333// LcSettingC_Class_C_API
334
335// END-Class-Introspection - created by 'c_Class.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
336
tag: nhi1-release-250425
#define BEGIN_LC_C_DECLS
#define END_LC_C_DECLS
#define LC_EXTERN_DATA
#define LC_STATIC_RT
#define LcGetCfsFromNat(_nat)
helper for LcSettingC_ObjNew …
static MK_HDL LcSettingHandleGet_RT(MK_RT mkrt, LC_CFS const cfs)
Handle-Get-Slot - returns a export-hdl to the LcSettingC useable for external storage
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
static LC_CFS LcSettingInstances_RT(MK_RT mkrt)
get head-instance from linked-list of LcSettingS type …
static LC_CFS LcSettingHandleResolve_RT(MK_RT mkrt, MK_HDL const netHdl)
Handle-Resolve-Slot - return a LcSettingC from netHdl or "MK_NULL" if invalid…
static MK_ARTIFICIAL LC_CFS LcSettingC_ObjNew(config_setting_t *hdl)
return Programming-Language-Micro-Kernel (PLMK) instance from native hdl …
static LC_CFS LcSettingGetNull(void)
Null-Slot - return a LcSettingC typed NULL instance …
static LC_CFS LcSettingC_ObjCreate(config_setting_t *hdl)
return Programming-Language-Micro-Kernel (PLMK) instance from native hdl …
__thread MK_TYP LcSettingC_TT
class as MkTypeDefS-class-type …
static LC_CFS LcCfs(MK_MNG mng)
cast a unknown-object into an LcSettingS pointer or NULL if not possible
static bool LcCfsCheckO(MK_OBJN obj)
check LcSettingS -> MkObjectS::signature …
static LC_CFSN LcCfsN(MK_MNGN mng)
(const) cast a unknown-object into an LcSettingS pointer or NULL if not possible
#define LcSettingC_X2obj(x)
static bool LcCfsCheck(MK_MNGN mng)
check LcSettingS -> MkObjectS::signature …
#define MK_DECL
#define mk_inline
#define MK_ARTIFICIAL
#define MK_NULL
#define __parser__pop__
#define __parser__push__(...)
#define __parser__(...)
const MK_PTRB * MK_MNGN
MK_PTRB * MK_MNG
int32_t MK_HDL
#define MkSanitizeCheck(_root, _m)
#define MkSanitizeCheckO(_root, _o)
#define MkObjectHandleResolve(...)
#define MkObjectHandleGet(...)
#define MkOBJ(x)
#define MK_ATTR_STATIC
#define MK_ATTR_RT_INSTANCE
#define MK_ATTR_INSTANCE
#define MkThreadLocal
#define MK_PARSER_RT
#define MK_PARSER_RT_ONLY
#define MK_ATTR_RT_STATIC
#define MkRtSetup_NULL
#define MK_INSTANCE_HDL(x)
static MK_OBJ MkTypeInstances(MK_TYP const typ)
Struct to represent the data from the LcSettingC …
struct MkObjectS obj
union LcSettingS::@0 super
config_setting_t * nat
internal - link between LcSettingS and native library