theSq3Lite 10.0
Loading...
Searching...
No Matches
Sq3FileC_def_sq3.h
Go to the documentation of this file.
1
9/* LABEL-START */
10#pragma once
11
12#include "LibSq3Lite_sq3.h"
13/* LABEL-END */
14
16
17// BEGIN-Class-Doc-Order - created by 'c_Class.tcl -i NHI1_HOME/theSq3Lite/c/gen/c_sq3lite.meta' - DO NOT change
18
19// external
25
26// END-Class-Doc-Order - created by 'c_Class.tcl -i NHI1_HOME/theSq3Lite/c/gen/c_sq3lite.meta' - DO NOT change
27
28// MARK_C ==================================================================
29
34
36struct Sq3FileS {
37 // BEGIN-Sq3FileS-super - created by 'c_Class.tcl -i NHI1_HOME/theSq3Lite/c/gen/c_sq3lite.meta' - DO NOT change
38
39 union {
40 struct MkObjectS obj; // instance-base MkObjectS
42
43 // END-Sq3FileS-super - created by 'c_Class.tcl -i NHI1_HOME/theSq3Lite/c/gen/c_sq3lite.meta' - DO NOT change
44
45 // BEGIN-Sq3FileS-native - created by 'c_Class.tcl -i NHI1_HOME/theSq3Lite/c/gen/c_sq3lite.meta' - DO NOT change
46
48
49 // END-Sq3FileS-native - created by 'c_Class.tcl -i NHI1_HOME/theSq3Lite/c/gen/c_sq3lite.meta' - DO NOT change
50};
51
52// MARK_D ==================================================================
53// BEGIN-Sq3FileS-Definition - created by 'c_Class.tcl -i NHI1_HOME/theSq3Lite/c/gen/c_sq3lite.meta' - DO NOT change
54
58 __parser__push__(prefix=Class, doc-group=Define, doc-index=Class);
59
60// Signature --------------------------------------------------------------
63
64 #define Sq3FileC_SIGNATURE (MkObjectC_SIGNATURE ^ (21u<<10))
65 #define Sq3FileC_MASK (((1u<<22)-1)<<10)
66
68
69// CompileTimeCast --------------------------------------------------------------
72
73 #define Sq3FileC_X2file(x) (x)
74 #define Sq3FileC_X2obj(x) MkOBJ(x)
75
77
78// TypeDef --------------------------------------------------------------
81
83 __parser__(ignore) typedef struct Sq3FileS Sq3FileCR;
85 __parser__(ignore) typedef const struct Sq3FileS Sq3FileCNR;
89 #define Sq3FileC_T ( (struct MkTypeDefS *) (Sq3FileC_TT) )
91 #define Sq3FileST Sq3FileC_T
93 #define Sq3FileSTT (MkTYP(Sq3FileST))
95 #define Sq3FileC_type SQ3_FILE
97 #define Sq3FileCT_X(instance) ( (struct MkTypeDefS *) (MkOBJ_R(instance).type) )
99 #define Sq3FileCTT_X(instance) (MkOBJ_R(instance).type)
101 #define Sq3FileCT_TT(typ) ( (struct MkTypeDefS *) (typ) )
103 #define Sq3FileC_NS SQ3
105 #define Sq3FileCTT Sq3FileCTT
107 #define Sq3FileCT ( (struct MkTypeDefS *) Sq3FileCTT )
108
110
111// TypeCheck --------------------------------------------------------------
114
115 #pragma GCC diagnostic push
116 #pragma GCC diagnostic ignored "-Wattributes"
117
120 __parser__(class=Sq3FileC,static,hide)
123 return MkSanitizeCheck(Sq3FileC,mng);
124 }
125
128 __parser__(class=Sq3FileC,static,hide)
131 return MkSanitizeCheckO(Sq3FileC,obj);
132 }
133
134 #pragma GCC diagnostic pop
135 #define Sq3FileC_Check(mng) Sq3FileCheck(mng)
136
138
139// RunTimeCast --------------------------------------------------------------
142
144 __parser__(class=Sq3FileC,hide,static)
145 META_ATTRIBUTE_SANITIZE
148 return (Sq3FileCheck(mng) ? (SQ3_FILE)mng : NULL);
149 }
150
152 __parser__(class=Sq3FileC,hide,static)
153 META_ATTRIBUTE_SANITIZE
156 return (Sq3FileCheck(mng) ? (SQ3_FILEN)mng : NULL);
157 }
158
160 #define Sq3FileRaise(_file) if (!_MkCheckX(Sq3FileC,_file)) { \
161 MkErrorSetC_1E("'Sq3FileC' hdl is NULL"); \
162 goto error ; \
163 }
164
166 #define Sq3FILE_R(x) (*(x)).super.file
168 #define Sq3FILE(x) (&Sq3FILE_R(x))
169
171
174// Sq3FileC_Class_Define_C_API
175
176// END-Sq3FileS-Definition - created by 'c_Class.tcl -i NHI1_HOME/theSq3Lite/c/gen/c_sq3lite.meta' - DO NOT change
177
179
180// MARK_C ==================================================================
181
184#define Sq3GetFileFromNat(_nat) SQ3_SET_T(Sq3FileC,some_api__hook,_nat)
185
186// =========================================================================
187// BEGIN-Sq3FileS-Export - created by 'c_Class.tcl -i NHI1_HOME/theSq3Lite/c/gen/c_sq3lite.meta' - DO NOT change
188
191
194
195__parser__push__(doc-group=_ignore_,doc-index=Class,doc-name=Export,class=Sq3FileC);
196
199__parser__(internal)
202 return Sq3GetFileFromNat(hdl);
203}
204
206__parser__(internal)
209 return Sq3GetFileFromNat(hdl);
210}
211
227__parser__(class-overload=MkObjectHandleGet)
231 SQ3_FILE const file __parser__(null-allowed)
232) {
233 return MkObjectHandleGet(file?MkOBJ(file):NULL);
234}
235
244__parser__(flags=new)
248 MK_HDL const netHdl
249) {
250 return Sq3File(MkObjectHandleResolve(netHdl));
251}
252
262#define Sq3FileHandleResolve_e(netHdl) ({ \
263 MK_HDL tmpHdl=netHdl; \
264 SQ3_FILE tmp; \
265 if (tmpHdl==0) { \
266 tmp=NULL; \
267 } else { \
268 tmp=Sq3FileHandleResolve(tmpHdl); \
269 if (tmp==NULL) { \
270 MkErrorSetC_1_NULL("ERROR: 'Sq3FileC' handle is 'NULL'"); \
271 goto error; \
272 }; \
273 }; \
274 tmp; \
275})
276
278
280// Class export & import
281
285 __parser__(flags=new,doc-group=_ignore_,doc-index=Class,doc-name=Misc,class=Sq3FileC,null-return-allow)
288 return (SQ3_FILE)MK_NULL;
289 }
291// Sq3FileC - Misc - function
292
294// Sq3FileC_Class_C_API
295
296// END-Sq3FileS-Export - created by 'c_Class.tcl -i NHI1_HOME/theSq3Lite/c/gen/c_sq3lite.meta' - DO NOT change
297
298// =========================================================================
299// BEGIN-Class-Introspection - created by 'c_Class.tcl -i NHI1_HOME/theSq3Lite/c/gen/c_sq3lite.meta' - DO NOT change
300
305
306__parser__push__(doc-name=Introspection,doc-index=Class,class=Sq3FileC,no-rpc,null-return-allow,flags=new);
307
315
319 MK_INSTANCE_HDL(file);
320 return (SQ3_FILE)Sq3FileC_X2obj(file)->obj_protect.next;
321}
322
326 MK_INSTANCE_HDL(file);
327 return (SQ3_FILE)Sq3FileC_X2obj(file)->obj_protect.prev;
328}
329
331
334// Sq3FileC_Class_C_API
335
336// END-Class-Introspection - created by 'c_Class.tcl -i NHI1_HOME/theSq3Lite/c/gen/c_sq3lite.meta' - DO NOT change
337
tag: nhi1-release-250425
#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_FILE Sq3FileHandleResolve_RT(MK_RT mkrt, MK_HDL const netHdl)
Handle-Resolve-Slot - return a Sq3FileC from netHdl or null if invalid…
static SQ3_FILE Sq3FileC_ObjCreate(sqlite3_file *hdl)
return Programming-Language-Micro-Kernel (PLMK) instance from native hdl …
static SQ3_FILE Sq3FilePrev(SQ3_FILE const file)
get previous instance from linked-list of Sq3FileS type
#define Sq3GetFileFromNat(_nat)
helper for Sq3FileC_ObjNew …
static MK_ARTIFICIAL SQ3_FILE Sq3FileC_ObjNew(sqlite3_file *hdl)
return Programming-Language-Micro-Kernel (PLMK) instance from native hdl …
static SQ3_FILE Sq3FileNext(SQ3_FILE const file)
get next instance from linked-list of Sq3FileS type
static MK_HDL Sq3FileHandleGet_RT(MK_RT mkrt, SQ3_FILE const file)
Handle-Get-Slot - returns a export-hdl to the Sq3FileC useable for external storage
static SQ3_FILE Sq3FileGetNull(void)
Null-Slot - return a Sq3FileC typed NULL instance …
static SQ3_FILE Sq3FileInstances_RT(MK_RT mkrt)
get head-instance from linked-list of Sq3FileS type …
#define Sq3FileC_X2obj(x)
static bool Sq3FileCheck(MK_MNGN mng)
check Sq3FileS -> MkObjectS::signature …
__thread MK_TYP Sq3FileC_TT
class as MkTypeDefS-class-type …
static bool Sq3FileCheckO(MK_OBJN obj)
check Sq3FileS -> MkObjectS::signature …
static SQ3_FILEN Sq3FileN(MK_MNGN mng)
(const) cast a unknown-object into an Sq3FileS pointer or NULL if not possible
static SQ3_FILE Sq3File(MK_MNG mng)
cast a unknown-object into an Sq3FileS pointer or NULL if not possible
#define SQ3_EXTERN_DATA
#define SQ3_STATIC_RT
Struct to represent the data of the Sq3FileC …
struct MkObjectS obj
sqlite3_file * nat
internal - link between Sq3FileS and native library
union Sq3FileS::@1 super