theSq3Lite 10.0 NHI1 - theKernel - theLink - theConfig - theSq3Lite - theCompiler - theBrain - theGuard - theLib - theATL
c - tcl - atl - cs - py - rb - jv - cc
Loading...
Searching...
No Matches
Sq3LiteC_def_sq3.h
Go to the documentation of this file.
1
12/* LABEL-START */
13#pragma once
14
15#include "LibSq3Lite_sq3.h"
16/* LABEL-END */
17
19
20// BEGIN-Class-Doc-Order - created by 'c_Class.tcl -i NHI1_HOME/theSq3Lite/c/gen/c_sq3lite.meta' - DO NOT change
21
22// external
28
29// END-Class-Doc-Order - created by 'c_Class.tcl -i NHI1_HOME/theSq3Lite/c/gen/c_sq3lite.meta' - DO NOT change
30
31// MARK_C ==================================================================
32
37
39struct Sq3LiteS {
40 // BEGIN-Sq3LiteS-super - created by 'c_Class.tcl -i NHI1_HOME/theSq3Lite/c/gen/c_sq3lite.meta' - DO NOT change
41
42 union {
43 struct MkObjectS obj; // instance-base MkObjectS
45
46 // END-Sq3LiteS-super - created by 'c_Class.tcl -i NHI1_HOME/theSq3Lite/c/gen/c_sq3lite.meta' - DO NOT change
47
48 // BEGIN-Sq3LiteS-native - created by 'c_Class.tcl -i NHI1_HOME/theSq3Lite/c/gen/c_sq3lite.meta' - DO NOT change
49
51
52 // END-Sq3LiteS-native - created by 'c_Class.tcl -i NHI1_HOME/theSq3Lite/c/gen/c_sq3lite.meta' - DO NOT change
53};
54
55// MARK_D ==================================================================
56// BEGIN-Sq3LiteS-Definition - created by 'c_Class.tcl -i NHI1_HOME/theSq3Lite/c/gen/c_sq3lite.meta' - DO NOT change
57
61 __parser__push__(prefix=Class, doc-group=Define, doc-index=Class);
62
63// Signature --------------------------------------------------------------
66
67 #define Sq3LiteC_SIGNATURE (MkObjectC_SIGNATURE ^ (22u<<10))
68 #define Sq3LiteC_MASK (((1u<<22)-1)<<10)
69
71
72// CompileTimeCast --------------------------------------------------------------
75
76 #define Sq3LiteC_X2lite(x) (x)
77 #define Sq3LiteC_X2obj(x) MkOBJ(x)
78
80
81// TypeDef --------------------------------------------------------------
84
86 __parser__(ignore) typedef struct Sq3LiteS Sq3LiteCR;
88 __parser__(ignore) typedef const struct Sq3LiteS Sq3LiteCNR;
92 #define Sq3LiteC_T ( (struct MkTypeDefS *) (Sq3LiteC_TT) )
94 #define Sq3LiteST Sq3LiteC_T
96 #define Sq3LiteSTT (MkTYP(Sq3LiteST))
98 #define Sq3LiteC_type SQ3_LITE
100 #define Sq3LiteCT_X(instance) ( (struct MkTypeDefS *) (MkOBJ_R(instance).type) )
102 #define Sq3LiteCTT_X(instance) (MkOBJ_R(instance).type)
104 #define Sq3LiteCT_TT(typ) ( (struct MkTypeDefS *) (typ) )
106 #define Sq3LiteC_NS SQ3
108 #define Sq3LiteCTT Sq3LiteCTT
110 #define Sq3LiteCT ( (struct MkTypeDefS *) Sq3LiteCTT )
111
113
114// TypeCheck --------------------------------------------------------------
117
118 #pragma GCC diagnostic push
119 #pragma GCC diagnostic ignored "-Wattributes"
120
123 __parser__(class=Sq3LiteC,static,hide)
126 return MkSanitizeCheck(Sq3LiteC,mng);
127 }
128
131 __parser__(class=Sq3LiteC,static,hide)
134 return MkSanitizeCheckO(Sq3LiteC,obj);
135 }
136
137 #pragma GCC diagnostic pop
138 #define Sq3LiteC_Check(mng) Sq3LiteCheck(mng)
139
141
142// RunTimeCast --------------------------------------------------------------
145
147 __parser__(class=Sq3LiteC,hide,static)
148 META_ATTRIBUTE_SANITIZE
151 return (Sq3LiteCheck(mng) ? (SQ3_LITE)mng : NULL);
152 }
153
155 __parser__(class=Sq3LiteC,hide,static)
156 META_ATTRIBUTE_SANITIZE
159 return (Sq3LiteCheck(mng) ? (SQ3_LITEN)mng : NULL);
160 }
161
163 #define Sq3LiteRaise(_lite) if (!_MkCheckX(Sq3LiteC,_lite)) { \
164 MkErrorSetC_1E("'Sq3LiteC' hdl is NULL"); \
165 goto error ; \
166 }
167
169 #define Sq3LITE_R(x) (*(x)).super.lite
171 #define Sq3LITE(x) (&Sq3LITE_R(x))
172
174
177// Sq3LiteC_Class_Define_C_API
178
179// END-Sq3LiteS-Definition - created by 'c_Class.tcl -i NHI1_HOME/theSq3Lite/c/gen/c_sq3lite.meta' - DO NOT change
180
182
183// MARK_C ==================================================================
184
187#define Sq3GetLiteFromNat(_nat) SQ3_SET_T(Sq3LiteC,some_api__hook,_nat)
188
189// =========================================================================
190// BEGIN-Sq3LiteS-Export - created by 'c_Class.tcl -i NHI1_HOME/theSq3Lite/c/gen/c_sq3lite.meta' - DO NOT change
191
194
197
198__parser__push__(doc-group=_ignore_,doc-index=Class,doc-name=Export,class=Sq3LiteC);
199
202__parser__(internal)
205 return Sq3GetLiteFromNat(hdl);
206}
207
209__parser__(internal)
212 return Sq3GetLiteFromNat(hdl);
213}
214
230__parser__(class-overload=MkObjectHandleGet)
234 SQ3_LITE const lite __parser__(null-allowed)
235) {
236 return MkObjectHandleGet(lite?MkOBJ(lite):NULL);
237}
238
247__parser__(flags=new)
251 MK_HDL const netHdl
252) {
253 return Sq3Lite(MkObjectHandleResolve(netHdl));
254}
255
265#define Sq3LiteHandleResolve_e(netHdl) ({ \
266 MK_HDL tmpHdl=netHdl; \
267 SQ3_LITE tmp; \
268 if (tmpHdl==0) { \
269 tmp=NULL; \
270 } else { \
271 tmp=Sq3LiteHandleResolve(tmpHdl); \
272 if (tmp==NULL) { \
273 MkErrorSetC_1_NULL("ERROR: 'Sq3LiteC' handle is 'NULL'"); \
274 goto error; \
275 }; \
276 }; \
277 tmp; \
278})
279
281
283// Class export & import
284
288 __parser__(flags=new,doc-group=_ignore_,doc-index=Class,doc-name=Misc,class=Sq3LiteC,null-return-allow)
291 return (SQ3_LITE)MK_NULL;
292 }
294// Sq3LiteC - Misc - function
295
297// Sq3LiteC_Class_C_API
298
299// END-Sq3LiteS-Export - created by 'c_Class.tcl -i NHI1_HOME/theSq3Lite/c/gen/c_sq3lite.meta' - DO NOT change
300
301// =========================================================================
302// BEGIN-Class-Introspection - created by 'c_Class.tcl -i NHI1_HOME/theSq3Lite/c/gen/c_sq3lite.meta' - DO NOT change
303
308
309__parser__push__(doc-name=Introspection,doc-index=Class,class=Sq3LiteC,no-rpc,null-return-allow,flags=new);
310
318
322 MK_INSTANCE_HDL(lite);
323 return (SQ3_LITE)Sq3LiteC_X2obj(lite)->obj_protect.next;
324}
325
329 MK_INSTANCE_HDL(lite);
330 return (SQ3_LITE)Sq3LiteC_X2obj(lite)->obj_protect.prev;
331}
332
334
337// Sq3LiteC_Class_C_API
338
339// END-Class-Introspection - created by 'c_Class.tcl -i NHI1_HOME/theSq3Lite/c/gen/c_sq3lite.meta' - DO NOT change
340
LibSq3Lite_sq3.h - 10 Apr 2025 - aotto1968.
#define BEGIN_SQ3_C_DECLS
#define END_SQ3_C_DECLS
#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)
static SQ3_LITE Sq3LiteNext(SQ3_LITE const lite)
get next instance from linked-list of Sq3LiteS type
static MK_ARTIFICIAL SQ3_LITE Sq3LiteC_ObjNew(sqlite3 *hdl)
return Programming-Language-Micro-Kernel (PLMK) instance from native hdl …
static SQ3_LITE Sq3LiteInstances_RT(MK_RT mkrt)
get head-instance from linked-list of Sq3LiteS type …
#define Sq3GetLiteFromNat(_nat)
helper for Sq3LiteC_ObjNew …
static SQ3_LITE Sq3LiteGetNull(void)
Null-Slot - return a Sq3LiteC typed NULL instance …
static SQ3_LITE Sq3LiteC_ObjCreate(sqlite3 *hdl)
return Programming-Language-Micro-Kernel (PLMK) instance from native hdl …
static SQ3_LITE Sq3LiteHandleResolve_RT(MK_RT mkrt, MK_HDL const netHdl)
Handle-Resolve-Slot - return a Sq3LiteC from netHdl or "MK_NULL" if invalid…
static SQ3_LITE Sq3LitePrev(SQ3_LITE const lite)
get previous instance from linked-list of Sq3LiteS type
static MK_HDL Sq3LiteHandleGet_RT(MK_RT mkrt, SQ3_LITE const lite)
Handle-Get-Slot - returns a export-hdl to the Sq3LiteC useable for external storage
__thread MK_TYP Sq3LiteC_TT
class as MkTypeDefS-class-type …
static bool Sq3LiteCheckO(MK_OBJN obj)
check Sq3LiteS -> MkObjectS::signature …
#define Sq3LiteC_X2obj(x)
static bool Sq3LiteCheck(MK_MNGN mng)
check Sq3LiteS -> MkObjectS::signature …
static SQ3_LITE Sq3Lite(MK_MNG mng)
cast a unknown-object into an Sq3LiteS pointer or NULL if not possible
static SQ3_LITEN Sq3LiteN(MK_MNGN mng)
(const) cast a unknown-object into an Sq3LiteS pointer or NULL if not possible
#define SQ3_EXTERN_DATA
#define SQ3_STATIC_RT
struct sqlite3 sqlite3
Struct to represent the data of the Sq3LiteC …
union Sq3LiteS::@2 super
struct MkObjectS obj
sqlite3 * nat
internal - link between Sq3LiteS and native library