theSq3Lite 10.0
Loading...
Searching...
No Matches
Sq3ValueC_atl.c
Go to the documentation of this file.
1
9/* LABEL-START */
10
11#define META_FILE_NAME "Sq3ValueC_atl.c"
12
14
15#define OT_CLASS asq3rt->AtlSq3ValueC
16#define OT_NULL asq3rt->AtlSq3ValueC_MK_NULL
17#define OT_CLASS_NAME "Sq3ValueC"
18
19#define SELF2HDL(O) Sq3Val(VAL2MNG(O))
20
21// LNG: class
22// -> moved to LibSq3Lite_atl.h → OT_SQ3_RT_S → AtlSq3LiteCTT;
23
24// META: ObjNew feature: called to return a new or an already existing ATL-SELF-Object
25// -> moved to LibSq3Lite_atl.h → Sq3LiteC_ObjNew
26
27// META: ObjNew feature: selfCreate will be called from "ObjNew->MkSelfNew" if MkObj need a SELF pointer
28static MK_PTR NS(Sq3ValueC_selfCreate) (MK_RT_ARGS MK_OBJ const obj, MK_PTR const env) {
29 SETUP_asq3rt(env);
30 return AtomMake(obj,OT_CLASS,NULL,NULL,env);
31}
32
33// META: called if MkObj must be destroyed and if the SELF is still alive → goal: destroy the SELF
34static void NS(Sq3ValueC_selfDelete) (MK_RT_ARGS MK_PTR selfP, MK_PTR const env) {
35 OT_SELF_T selfO = selfP;
36 SETUP_asq3rt(env);
37 MK(AtomDeleteHard) (OT_MK_CALL selfO);
38}
39
40// META: called to destroy link from SELF to META
41static void NS(Sq3ValueC_selfUnlink) (MK_RT_ARGS MK_PTR selfP, MK_PTR const env) {
42 OT_SELF_T selfO = selfP;
43 SETUP_asq3rt(env);
44 return MK(AtomUnlink) (OT_MK_CALL selfO);
45}
46
47#define OT_SETUP_hdl SetupHdlFromMetaData_2(SQ3_VAL)
48#define OT_SETUP_hdl__null_allow SetupHdlFromMetaData__null_allow_2(SQ3_VAL)
49#define OT_SETUP_hdl_destr SetupHdlFromMetaData__null_allow_2(SQ3_VAL)
50#define OT_SETUP_hdl_constr SetupHdlConstr(Sq3ValueC)
51#define OT_SETUP_hdl_static_constr OT_SETUP_hdl_static
52#define OT_SETUP_hdl_static SetupHdlStatic(Sq3ValueC)
53
54#define OT_retObj_CONSTR(x) OT_retObj_SET(AtomInit(OT_SELF,Sq3ValueC_X2obj(x),asq3rt))
55
56// initialize the ATL and META class specific object
57#define ClassInit \
58 /* if not already done, initialize NEW META type */ \
59 if (Sq3ValueCTT == NULL) Sq3ValueCTT = Sq3ValueSTT; \
60 \
61 /* protect against double call */ \
62 if (Sq3ValueCTT->selfCreate == NS(Sq3ValueC_selfCreate)) return MK_OK; \
63 \
64 /* add "selfCreate" and "selfDelete" feature to the META-Class */ \
65 Sq3ValueCTT->selfCreate = NS(Sq3ValueC_selfCreate); \
66 Sq3ValueCTT->selfDelete = NS(Sq3ValueC_selfDelete); \
67 Sq3ValueCTT->selfUnlink = NS(Sq3ValueC_selfUnlink); \
68 \
69 /* create the ATL-class */ \
70 OT_CLASS = AltClassDef(Sq3ValueCTT,&asq3rt->AtlSq3ValueC_NS); \
71 if (OT_CLASS == NULL) goto error; \
72 OT_REF_INCR(OT_CLASS); \
73 \
74 /* create the ATL static Methods */ \
75 check_LNG(AtlUnknownSetup (NS(sOtClassDef),asq3rt)) goto error; \
76 \
77 /* create the ATL instance Methods */ \
78 check_LNG(AtlUnknownSetup (NS(sInstanceDef),asq3rt)) goto error; \
79 \
80 /* after class was modified, recompile the class */ \
81 RL_init(2, recompile, RL_T(0,RecompileN)); RL_O(1,OT_CLASS) ; \
82 int retI = RL_EvalEx(0); \
83 if (retI != TCL_OK) return retI; \
84 \
85 /* define the "NULL" object */ \
86 OT_NULL = AtomCreateNULL(OT_CLASS, "::Sq3ValueC::MK_NULL", (MK_PTR)asq3rt); \
87 if (OT_NULL == NULL) goto error; \
88 OT_REF_INCR(OT_NULL);
89/* LABEL-END */
90
91// BEGIN-DOC - created by 'atl_MqS.tcl -i NHI1_HOME/theSq3Lite/c/gen/c_sq3lite.meta' - DO NOT change
92
93// doc-key: Sq3ValueC,Sq3Value,sc_,func
94#define GetNull_doc "Sq3ValueC [Sq3ValueC::GetNull]"
95#define HandleResolve_doc "Sq3ValueC [Sq3ValueC::HandleResolve netHdl:MK_HDL]"
96#define Instances_doc "Sq3ValueC [Sq3ValueC::Instances]"
97
98// doc-key: Sq3ValueC,Sq3Value,oCx,func
99#define Dup_doc "Sq3ValueC [Sq3ValueC::Dup $sq3val] (const)"
100
101// doc-key: Sq3ValueC,Sq3Value,oc_,func
102#define BUF_doc "MkBufferC [Sq3ValueC::BUF $val] (const)"
103#define Blob_doc "MkBufferC [Sq3ValueC::Blob $sq3val] (const)"
104#define Next_doc "Sq3ValueC [Sq3ValueC::Next $val]"
105#define Prev_doc "Sq3ValueC [Sq3ValueC::Prev $val]"
106
107// doc-key: Sq3ValueC,Sq3Value,oco,func
108#define VtabInFirst_doc "Sq3ValueC [Sq3ValueC::VtabInFirst $pVal]"
109#define VtabInNext_doc "Sq3ValueC [Sq3ValueC::VtabInNext $pVal]"
110
111// doc-key: Sq3ValueC,Sq3Value,om_,func
112#define BinaryR_doc "binary [Sq3ValueC::BinaryR $sq3val] (const)"
113#define Bytes_doc "Sq3TextE [Sq3ValueC::Bytes $sq3val] (const)"
114#define Double_doc "double [Sq3ValueC::Double $sq3val] (const)"
115#define Encoding_doc "Sq3TextE [Sq3ValueC::Encoding $sq3val] (const)"
116#define FromBind_doc "bool [Sq3ValueC::FromBind $sq3val] (const)"
117// skip class-overload: HandleGet → MkObjectHandleGet
118#define Int_doc "int32 [Sq3ValueC::Int $sq3val] (const)"
119#define Int64_doc "int64 [Sq3ValueC::Int64 $sq3val] (const)"
120// skip class-overload: Log → MkObjectLog
121#define NoChange_doc "bool [Sq3ValueC::NoChange $sq3val] (const)"
122#define NumericType_doc "Sq3TypeE [Sq3ValueC::NumericType $sq3val] (const)"
123#define StringR_doc "string [Sq3ValueC::StringR $sq3val] (const)"
124#define SubType_doc "int32 [Sq3ValueC::SubType $sq3val] (const)"
125#define Text_doc "string [Sq3ValueC::Text $sq3val] (const)"
126#define Type_doc "Sq3TypeE [Sq3ValueC::Type $sq3val] (const)"
127
128// END-DOC - created by 'atl_MqS.tcl -i NHI1_HOME/theSq3Lite/c/gen/c_sq3lite.meta' - DO NOT change
129
130/*****************************************************************************/
131/* */
132/* O B J E C T */
133/* */
134/*****************************************************************************/
135
136// BEGIN-Sq3ValueC - created by 'atl_MqC.tcl -i NHI1_HOME/theSq3Lite/c/gen/c_sq3lite.meta' - DO NOT change
137
141
142// doc-key: Sq3ValueC,Sq3ValueC-Class-Export,sc_
143
145static OT_ProcRet NS(Sq3ValueC_HandleResolve) (OtClass_ARGS) {
148 MK_HDL netHdl = 0;
151 SQ3_VAL retVal = Sq3ValueHandleResolve (netHdl);
152 OT_retObj_SET_VAL(retVal);
153 goto end;
154 error:
156 end:
158}
159
160// doc-key: Sq3ValueC,Sq3ValueC-Class-Export,om_
161
162// skip on class-overload: Sq3ValueHandleGet → MkObjectHandleGet
164static OT_ProcRet NS(Sq3ValueC_HandleGet) (Sq3ValueC_ARGS) {OT_ERROR_LNG_RETURN;}
165
167// Sq3ValueC_Class_ATL_API
168
172
173// doc-key: Sq3ValueC,Sq3ValueC-Class-Introspection,oc_
174
176static OT_ProcRet NS(Sq3ValueC_Next) (Sq3ValueC_ARGS) {
180 SQ3_VAL retVal = Sq3ValueNext (hdl);
181 OT_retObj_SET_VAL(retVal);
182 goto end;
183 error:
185 end:
187}
188
190static OT_ProcRet NS(Sq3ValueC_Prev) (Sq3ValueC_ARGS) {
194 SQ3_VAL retVal = Sq3ValuePrev (hdl);
195 OT_retObj_SET_VAL(retVal);
196 goto end;
197 error:
199 end:
201}
202
203// doc-key: Sq3ValueC,Sq3ValueC-Class-Introspection,sc_
204
206static OT_ProcRet NS(Sq3ValueC_Instances) (OtClass_ARGS) {
210 SQ3_VAL retVal = Sq3ValueInstances ();
211 OT_retObj_SET_VAL(retVal);
212 goto end;
213 error:
215 end:
217}
218
220// Sq3ValueC_Class_ATL_API
221
225
226// doc-key: Sq3ValueC,Sq3ValueC-Class-Misc,sc_
227
229static OT_ProcRet NS(Sq3ValueC_GetNull) (OtClass_ARGS) {
233 SQ3_VAL retVal = Sq3ValueGetNull ();
234 OT_retObj_SET_VAL(retVal);
235 goto end;
236 error:
238 end:
240}
241
243// Sq3ValueC_Class_ATL_API
244
248
249// doc-key: Sq3ValueC,Sq3ValueC-Info,om_
250
252static OT_ProcRet NS(Sq3ValueC_Bytes) (Sq3ValueC_ARGS) {
257 goto end;
258 error:
260 end:
262}
263
265static OT_ProcRet NS(Sq3ValueC_Encoding) (Sq3ValueC_ARGS) {
270 goto end;
271 error:
273 end:
275}
276
278static OT_ProcRet NS(Sq3ValueC_FromBind) (Sq3ValueC_ARGS) {
283 goto end;
284 error:
286 end:
288}
289
290// skip on class-overload: Sq3ValueLog → MkObjectLog
293
295static OT_ProcRet NS(Sq3ValueC_NoChange) (Sq3ValueC_ARGS) {
300 goto end;
301 error:
303 end:
305}
306
308static OT_ProcRet NS(Sq3ValueC_NumericType) (Sq3ValueC_ARGS) {
313 goto end;
314 error:
316 end:
318}
319
321static OT_ProcRet NS(Sq3ValueC_SubType) (Sq3ValueC_ARGS) {
326 goto end;
327 error:
329 end:
331}
332
334static OT_ProcRet NS(Sq3ValueC_Type) (Sq3ValueC_ARGS) {
339 goto end;
340 error:
342 end:
344}
345
347// Sq3ValueC_Info_ATL_API
348
352
353// doc-key: Sq3ValueC,Sq3ValueC-TOR,oCx
354
356static OT_ProcRet NS(Sq3ValueC_Dup) (Sq3ValueC_ARGS) {
360 SQ3_VAL retVal = Sq3ValueDup (hdl);
361 if (retVal == NULL) {
362 OT_ERROR_CONSTRUCTOR(Sq3ValueC);
363 goto error;
364 }
365 OT_retObj_SET_VAL(retVal);
366 goto end;
367 error:
369 end:
371}
372
374// Sq3ValueC_TOR_ATL_API
375
379
380// doc-key: Sq3ValueC,Sq3ValueC-Types,oc_
381
383static OT_ProcRet NS(Sq3ValueC_BUF) (Sq3ValueC_ARGS) {
387 MK_BUF retVal = Sq3ValueBUF (hdl);
388 OT_retObj_SET_BUF(retVal);
389 goto end;
390 error:
392 end:
394}
395
397static OT_ProcRet NS(Sq3ValueC_Blob) (Sq3ValueC_ARGS) {
401 MK_BUF retVal = Sq3ValueBlob (hdl);
402 OT_retObj_SET_BUF(retVal);
403 goto end;
404 error:
406 end:
408}
409
410// doc-key: Sq3ValueC,Sq3ValueC-Types,om_
411
413static OT_ProcRet NS(Sq3ValueC_BinaryR) (Sq3ValueC_ARGS) {
417 MkBinaryR retVal = Sq3ValueBinaryR (hdl);
419 goto end;
420 error:
422 end:
424}
425
427static OT_ProcRet NS(Sq3ValueC_Double) (Sq3ValueC_ARGS) {
432 goto end;
433 error:
435 end:
437}
438
440static OT_ProcRet NS(Sq3ValueC_Int) (Sq3ValueC_ARGS) {
445 goto end;
446 error:
448 end:
450}
451
453static OT_ProcRet NS(Sq3ValueC_Int64) (Sq3ValueC_ARGS) {
458 goto end;
459 error:
461 end:
463}
464
466static OT_ProcRet NS(Sq3ValueC_StringR) (Sq3ValueC_ARGS) {
470 MkStringR retVal = Sq3ValueStringR (hdl);
472 goto end;
473 error:
475 end:
477}
478
480static OT_ProcRet NS(Sq3ValueC_Text) (Sq3ValueC_ARGS) {
485 goto end;
486 error:
488 end:
490}
491
493// Sq3ValueC_Types_ATL_API
494
498
499// doc-key: Sq3ValueC,Sq3ValueC-Vtab,oco
500
502static OT_ProcRet NS(Sq3ValueC_VtabInFirst) (Sq3ValueC_ARGS) {
506 SQ3_VAL ppOut;
507 MkErrorC_Check(hdl,Sq3ValueVtabInFirst (hdl, &ppOut));
508 OT_retObj_SET_VAL(ppOut);
509 goto end;
510 error:
512 end:
514}
515
517static OT_ProcRet NS(Sq3ValueC_VtabInNext) (Sq3ValueC_ARGS) {
521 SQ3_VAL ppOut;
522 MkErrorC_Check(hdl,Sq3ValueVtabInNext (hdl, &ppOut));
523 OT_retObj_SET_VAL(ppOut);
524 goto end;
525 error:
527 end:
529}
530
532// Sq3ValueC_Vtab_ATL_API
533
534// END-Sq3ValueC - created by 'atl_MqC.tcl -i NHI1_HOME/theSq3Lite/c/gen/c_sq3lite.meta' - DO NOT change
535
536// ---------------------------------------------------------------------------------------
537
538static const OtObjProcDefS NS(sOtClassDef)[] = {
539 // BEGIN-CLASS - created by 'atl_MqS.tcl -i NHI1_HOME/theSq3Lite/c/gen/c_sq3lite.meta' - DO NOT change
540
541 // doc-key: Sq3ValueC,Sq3Value,sc_
542 { "::Sq3ValueC::GetNull" , NS(Sq3ValueC_GetNull) },
543 { "::Sq3ValueC::HandleResolve" , NS(Sq3ValueC_HandleResolve) },
544 { "::Sq3ValueC::Instances" , NS(Sq3ValueC_Instances) },
545
546 // END-CLASS - created by 'atl_MqS.tcl -i NHI1_HOME/theSq3Lite/c/gen/c_sq3lite.meta' - DO NOT change
547 { NULL }
548};
549
550// ---------------------------------------------------------------------------------------
551
552static const OtObjProcDefS NS(sInstanceDef)[] = {
553 // BEGIN-OBJ - created by 'atl_MqS.tcl -i NHI1_HOME/theSq3Lite/c/gen/c_sq3lite.meta' - DO NOT change
554
555 // doc-key: Sq3ValueC,Sq3Value,oCx
556 { "::Sq3ValueC::Dup" , NS(Sq3ValueC_Dup) },
557
558 // doc-key: Sq3ValueC,Sq3Value,oc_
559 { "::Sq3ValueC::BUF" , NS(Sq3ValueC_BUF) },
560 { "::Sq3ValueC::Blob" , NS(Sq3ValueC_Blob) },
561 { "::Sq3ValueC::Next" , NS(Sq3ValueC_Next) },
562 { "::Sq3ValueC::Prev" , NS(Sq3ValueC_Prev) },
563
564 // doc-key: Sq3ValueC,Sq3Value,oco
565 { "::Sq3ValueC::VtabInFirst" , NS(Sq3ValueC_VtabInFirst) },
566 { "::Sq3ValueC::VtabInNext" , NS(Sq3ValueC_VtabInNext) },
567
568 // doc-key: Sq3ValueC,Sq3Value,om_
569 { "::Sq3ValueC::BinaryR" , NS(Sq3ValueC_BinaryR) },
570 { "::Sq3ValueC::Bytes" , NS(Sq3ValueC_Bytes) },
571 { "::Sq3ValueC::Double" , NS(Sq3ValueC_Double) },
572 { "::Sq3ValueC::Encoding" , NS(Sq3ValueC_Encoding) },
573 { "::Sq3ValueC::FromBind" , NS(Sq3ValueC_FromBind) },
574 // skip class-overload: HandleGet → MkObjectHandleGet
575 { "::Sq3ValueC::Int" , NS(Sq3ValueC_Int) },
576 { "::Sq3ValueC::Int64" , NS(Sq3ValueC_Int64) },
577 // skip class-overload: Log → MkObjectLog
578 { "::Sq3ValueC::NoChange" , NS(Sq3ValueC_NoChange) },
579 { "::Sq3ValueC::NumericType" , NS(Sq3ValueC_NumericType) },
580 { "::Sq3ValueC::StringR" , NS(Sq3ValueC_StringR) },
581 { "::Sq3ValueC::SubType" , NS(Sq3ValueC_SubType) },
582 { "::Sq3ValueC::Text" , NS(Sq3ValueC_Text) },
583 { "::Sq3ValueC::Type" , NS(Sq3ValueC_Type) },
584
585 // END-OBJ - created by 'atl_MqS.tcl -i NHI1_HOME/theSq3Lite/c/gen/c_sq3lite.meta' - DO NOT change
586 { NULL }
587};
588
594
595int NS(pSq3ValueC_Init) ( OT_SQ3_ARGS OT_NS_T ns )
596{
598
599 return TCL_OK;
600error:
601 return TCL_ERROR;
602}
#define MK(n)
#define AtomMake(...)
#define OT_CHECK_NIH(val)
#define OT_retObj_SET_BOL(nat)
#define OT_SETUP_NOARG(d)
#define OT_SETUP_ONEARG(d)
#define OT_ERROR_LNG_RETURN
MOX_NS_T OT_NS_T
#define OT_retObj_SET_Error
#define OT_retObj_SET_BUF(nat)
#define OT_ERROR_CONSTRUCTOR(class)
#define OT_retObj_SET_DBL(nat)
#define OT_retObj_SET_I64(nat)
#define OT_CHECK_REQUIRED(val)
#define OT_retObj_SET_I32(nat)
MOX_OBJ_T OT_SELF_T
#define OT_GET__ME_REF_MkStringR(s)
#define OT_GET__ME_REF_MkBinaryR(b)
#define OT_retObj_RETURN
#define OT_MK_CALL
#define OT_retObj_SET_STR(nat)
#define OT_retObj_SET(val)
#define OT_CHECK_NOARGS
#define MkErrorC_Check(mng, PROC)
#define OT_ProcRet
#define OtClass_ARGS
#define OT_SQ3_ARGS
#define OT_NEW_Sq3_enum_OBJ(typ, val)
#define NS(n)
#define OT_retObj_SET_VAL(nat)
#define SETUP_asq3rt(r)
#define Sq3ValueC_ARGS
tag: nhi1-release-250425
#define Instances_doc
#define Int64_doc
#define BinaryR_doc
#define Blob_doc
#define OT_SETUP_hdl
#define Int_doc
#define Text_doc
#define Dup_doc
#define NumericType_doc
#define GetNull_doc
#define Next_doc
#define HandleResolve_doc
#define VtabInFirst_doc
#define Prev_doc
#define OT_CLASS
#define OT_SETUP_hdl_static
#define Type_doc
#define BUF_doc
#define StringR_doc
#define SubType_doc
#define FromBind_doc
#define VtabInNext_doc
#define Double_doc
#define ClassInit
#define NoChange_doc
#define Bytes_doc
#define Encoding_doc
#define MK_UNUSED
#define MK_DEPRECATED
MK_PTRB * MK_PTR
int32_t MK_HDL
#define MK_RT_ARGS
static SQ3_VAL Sq3ValueGetNull(void)
Null-Slot - return a Sq3ValueC typed NULL instance …
#define Sq3ValueInstances()
#define Sq3ValueHandleResolve(...)
static SQ3_VAL Sq3ValueNext(SQ3_VAL const val)
get next instance from linked-list of Sq3ValueS type
static SQ3_VAL Sq3ValuePrev(SQ3_VAL const val)
get previous instance from linked-list of Sq3ValueS type
static enum Sq3TextE Sq3ValueEncoding(SQ3_VALN sq3val)
Report the internal text encoding state of an sqlite3_value object …
static enum Sq3TypeE Sq3ValueType(SQ3_VALN sq3val)
Obtaining SQL Values …
static enum Sq3TextE Sq3ValueBytes(SQ3_VALN sq3val)
Obtaining SQL Values …
static MK_I32 Sq3ValueSubType(SQ3_VALN sq3val)
Finding The Subtype Of SQL Values …
static MK_BOOL Sq3ValueFromBind(SQ3_VALN sq3val)
Obtaining SQL Values …
static MK_BOOL Sq3ValueNoChange(SQ3_VALN sq3val)
Obtaining SQL Values …
static enum Sq3TypeE Sq3ValueNumericType(SQ3_VALN sq3val)
Obtaining SQL Values …
static SQ3_VAL Sq3ValueDup(SQ3_VALN sq3val)
Copy And Free SQL Values …
static MkStringR Sq3ValueStringR(SQ3_VALN sq3val)
Obtaining SQL Values …
#define Sq3ValueBUF(...)
static MkBinaryR Sq3ValueBinaryR(SQ3_VALN sq3val)
Obtaining SQL Values …
#define Sq3ValueBlob(...)
static MK_I64 Sq3ValueInt64(SQ3_VALN sq3val)
Obtaining SQL Values …
static MK_STRN Sq3ValueText(SQ3_VALN sq3val)
Obtaining SQL Values …
static MK_DBL Sq3ValueDouble(SQ3_VALN sq3val)
Obtaining SQL Values …
static MK_I32 Sq3ValueInt(SQ3_VALN sq3val)
Obtaining SQL Values …
static enum MkErrorE Sq3ValueVtabInNext(SQ3_VAL pVal, SQ3_VAL *ppOut)
Find all elements on the right-hand side of an IN constraint …
static enum MkErrorE Sq3ValueVtabInFirst(SQ3_VAL pVal, SQ3_VAL *ppOut)
Find all elements on the right-hand side of an IN constraint …
Struct to represent the data of the Sq3ValueC …