theConfig 10.0 NHI1 - theKernel - theLink - theConfig - theSq3Lite - theCompiler - theBrain - theGuard
c - tcl - cs - py - rb - jv - cc
Loading...
Searching...
No Matches
LcSettingC_def_lc.h
Go to the documentation of this file.
1
12/* LABEL-START */
13#pragma once
14
15#include "LibLcConfig_lc.h"
16/* LABEL-END */
17
19
20// BEGIN-Class-Doc-Order - created by 'c_Class.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
21
22// external
28
29// END-Class-Doc-Order - created by 'c_Class.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
30
31// MARK_C ==================================================================
32
36
38struct LcSettingS {
39 // BEGIN-LcSettingS-super - created by 'c_Class.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
40
41 union {
42 struct MkObjectS obj; // instance-base MkObjectS
44
45 // END-LcSettingS-super - created by 'c_Class.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
46
47 // BEGIN-LcSettingS-native - created by 'c_Class.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
48
50
51 // END-LcSettingS-native - created by 'c_Class.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
52};
53
54// MARK_D ==================================================================
55// BEGIN-LcSettingS-Definition - created by 'c_Class.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
56
60 __parser__push__(prefix=Class, doc-group=Define, doc-index=Class);
61
62// Signature --------------------------------------------------------------
65
66 #define LcSettingC_SIGNATURE (MkObjectC_SIGNATURE ^ (16u<<10))
67 #define LcSettingC_MASK (((1u<<22)-1)<<10)
68
70
71// CompileTimeCast --------------------------------------------------------------
74
75 #define LcSettingC_X2cfs(x) (x)
76 #define LcSettingC_X2obj(x) MkOBJ(x)
77
79
80// TypeDef --------------------------------------------------------------
83
85 __parser__(ignore) typedef struct LcSettingS LcSettingCR;
87 __parser__(ignore) typedef const struct LcSettingS LcSettingCNR;
91 #define LcSettingC_T ( (struct MkSuperTypeS *) (LcSettingC_TT) )
93 #define LcSettingST LcSettingC_T
95 #define LcSettingSTT (MkTYP(LcSettingST))
97 #define LcSettingC_type LC_CFS
99 #define LcSettingCT_X(instance) ( (struct MkSuperTypeS *) (MkOBJ_R(instance).type) )
101 #define LcSettingCTT_X(instance) (MkOBJ_R(instance).type)
103 #define LcSettingCT_TT(typ) ( (struct MkSuperTypeS *) (typ) )
105 #define LcSettingC_NS LC
107 #define LcSettingCTT LcSettingCTT
109 #define LcSettingCT ( (struct MkSuperTypeS *) LcSettingCTT )
110
112
113// TypeCheck --------------------------------------------------------------
116
117 #pragma GCC diagnostic push
118 #pragma GCC diagnostic ignored "-Wattributes"
119
122 __parser__(class=LcSettingC,static,hide)
125 return MkSanitizeCheck(LcSettingC,mng);
126 }
127
130 __parser__(class=LcSettingC,static,hide)
133 return MkSanitizeCheckO(LcSettingC,obj);
134 }
135
136 #pragma GCC diagnostic pop
137 #define LcSettingC_Check(mng) LcCfsCheck(mng)
138
140
141// RunTimeCast --------------------------------------------------------------
144
146 __parser__(class=LcSettingC,hide,static)
147 META_ATTRIBUTE_SANITIZE
150 return (LcCfsCheck(mng) ? (LC_CFS)mng : NULL);
151 }
152
154 __parser__(class=LcSettingC,hide,static)
155 META_ATTRIBUTE_SANITIZE
158 return (LcCfsCheck(mng) ? (LC_CFSN)mng : NULL);
159 }
160
162 #define LcCfsRaise(_cfs) if (!_MkCheckX(LcSettingC,_cfs)) { \
163 MkErrorSetC_1E("'LcSettingC' hdl is NULL"); \
164 goto error ; \
165 }
166
168 #define LcCFS_R(x) (*(x)).super.cfs
170 #define LcCFS(x) (&LcCFS_R(x))
171
173
176// LcSettingC_Class_Define_C_API
177
178// END-LcSettingS-Definition - created by 'c_Class.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
179
181
182// MARK_C ==================================================================
183
186#define LcGetCfsFromNat(_nat) LC_SET_T(LcSettingC,config_setting_get_hook,_nat)
187
188// =========================================================================
189// BEGIN-LcSettingS-Export - created by 'c_Class.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
190
193
196
197__parser__push__(doc-group=_ignore_,doc-index=Class,doc-name=Export,class=LcSettingC);
198
201__parser__(internal)
204 return LcGetCfsFromNat(hdl);
205}
206
208__parser__(internal)
211 return LcGetCfsFromNat(hdl);
212}
213
229__parser__(class-overload=MkObjectHandleGet)
233 LC_CFS const cfs __parser__(null-allowed)
234) {
235 return MkObjectHandleGet(cfs?MkOBJ(cfs):NULL);
236}
237
246__parser__(flags=new)
250 MK_HDL const netHdl
251) {
252 return LcCfs(MkObjectHandleResolve(netHdl));
253}
254
264#define LcSettingHandleResolve_e(netHdl) ({ \
265 MK_HDL tmpHdl=netHdl; \
266 LC_CFS tmp; \
267 if (tmpHdl==0) { \
268 tmp=NULL; \
269 } else { \
270 tmp=LcSettingHandleResolve(tmpHdl); \
271 if (tmp==NULL) { \
272 MkErrorSetC_1_NULL("ERROR: 'LcSettingC' handle is 'NULL'"); \
273 goto error; \
274 }; \
275 }; \
276 tmp; \
277})
278
280
282// Class export & import
283
287 __parser__(flags=new,doc-group=_ignore_,doc-index=Class,doc-name=Misc,class=LcSettingC,null-return-allow)
290 return (LC_CFS)MK_NULL;
291 }
293// LcSettingC - Misc - function
294
296// LcSettingC_Class_C_API
297
298// END-LcSettingS-Export - created by 'c_Class.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
299
300// =========================================================================
301// BEGIN-Class-Introspection - created by 'c_Class.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
302
307
308__parser__push__(doc-name=Introspection,doc-index=Class,class=LcSettingC,no-rpc,null-return-allow,flags=new);
309
317
321 MK_INSTANCE_HDL(cfs);
322 return (LC_CFS)LcSettingC_X2obj(cfs)->obj_protect.next;
323}
324
328 MK_INSTANCE_HDL(cfs);
329 return (LC_CFS)LcSettingC_X2obj(cfs)->obj_protect.prev;
330}
331
333
336// LcSettingC_Class_C_API
337
338// END-Class-Introspection - created by 'c_Class.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
339
LibLcConfig_lc.h - 16 Nov 2024 - aotto1968.
#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 MkSuperTypeS-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)
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
MK_OBJ instances