11#define META_FILE_NAME "Sq3BlobC_tcl.c"
15#define OT_CLASS NS(Sq3BlobC)
16#define OT_CLASS_NAME "Sq3BlobC"
18#define OBJECT2BLOB(O) MkAssertCastM(Sq3BlobC,(Tcl_ObjectGetMetadata(O, &MK(AtomMeta))))
48#define OT_SETUP_hdl_static_constr_pre
49#define OT_SETUP_hdl_static_constr \
50 OT_SETUP_hdl_static_constr_pre; \
53#define OT_SETUP_hdl_static \
54 int __skip=Tcl_ObjectContextSkippedArgs(objCtx); \
56 __attribute__((unused)) OT_SELF_T selfO = Tcl_ObjectContextObject(objCtx); \
57 __attribute__((unused)) MK_TYP hdl = Sq3BlobC##_TT;
59#define OT_SETUP_hdl SetupHdlFromMetaData_2(BLOB,SQ3_BLOB);
60#define OT_SETUP_hdl__null_allow SetupHdlFromMetaData__null_allow_2(BLOB,SQ3_BLOB);
61#define OT_SETUP_hdl_destr SetupHdlFromMetaData__null_allow_2(BLOB,SQ3_BLOB);
63#define OT_SETUP_hdl_constr_pre
64#define OT_SETUP_hdl_constr \
65 OT_SETUP_hdl_constr_pre; \
66 int __skip=Tcl_ObjectContextSkippedArgs(objCtx); \
68 MK_RT_UNUSED OT_SELF_T selfO = Tcl_ObjectContextObject(objCtx); \
69 SQ3_BLOB hdl = (SQ3_BLOB) &MkERROR;
71#if !defined(SetupRtFromHdl_XN)
72 #define SetupRtFromHdl_XN(hdl) AllRtSetup_XN(hdl)
73 #define SetupRtFromHdl_X(hdl) AllRtSetup_X(hdl)
79 if (Sq3BlobCTT == NULL) Sq3BlobCTT = Sq3BlobSTT; \
82 if (Sq3BlobCTT->selfCreate == NS(Sq3BlobC_selfCreate)) return MK_OK; \
85 Sq3BlobCTT->selfCreate = NS(Sq3BlobC_selfCreate); \
86 Sq3BlobCTT->selfDelete = NS(Sq3BlobC_selfDelete); \
87 Sq3BlobCTT->selfUnlink = NS(Sq3BlobC_selfUnlink); \
90 OT_SELF_T classO = MK(ClassDef)(interp,ns,Sq3BlobCTT); \
91 check_NULL(classO) goto error; \
92 OT_CLASS = Tcl_GetObjectAsClass(classO); \
95 static MkThreadLocal OtUnknownS NS(sClassUnknown) = {OT_UNKNOWN_CLASS}; \
96 check_LNG(MK(UnknownSetup) (interp,classO,NS(sOtClassDef),&NS(sClassUnknown))) goto error; \
99 static MkThreadLocal OtUnknownS NS(sInstanceUnknown) = {OT_UNKNOWN_INSTANCE}; \
100 check_LNG(MK(UnknownSetup) (interp,classO,NS(sInstanceDef),&NS(sInstanceUnknown))) goto error; \
103 SQ3(Sq3BlobC_MK_NULL) = Tcl_GetObjectName(interp, \
104 MK(AtomCreate) (MK_RT_CALL interp, NULL , OT_CLASS, "MK_NULL" , "::tclsq3lite::Sq3BlobC" ) \
106 Tcl_IncrRefCount(SQ3(Sq3BlobC_MK_NULL));
108#define VER TCL_OO_METHOD_VERSION_CURRENT
115#define CTOR_doc "Sq3BlobC [Sq3BlobC CTOR sq3lite:Sq3LiteC zDb:string zTable:string zColumn:string iRow:int64 flags:int32]"
116#define Open_doc "Sq3BlobC [Sq3BlobC Open sq3lite:Sq3LiteC zDb:string zTable:string zColumn:string iRow:int64 flags:int32]"
119#define GetNull_doc "Sq3BlobC [Sq3BlobC GetNull]"
120#define HandleResolve_doc "Sq3BlobC [Sq3BlobC HandleResolve netHdl:MK_HDL]"
121#define Instances_doc "Sq3BlobC [Sq3BlobC Instances]"
124#define Next_doc "Sq3BlobC [$blob Next]"
125#define Prev_doc "Sq3BlobC [$blob Prev]"
128#define Read_doc "MkBufferC [$sq3blob Read Z_inout:MkBufferC iOffset:int32]"
131#define Bytes_doc "int32 [$sq3blob Bytes]"
133#define Reopen_doc "$sq3blob Reopen arg1:int64"
134#define Write_doc "$sq3blob Write z:MkBufferC iOffset:int32"
409static Tcl_MethodType
NS(sOtClassDef)[] = {
413 {
VER,
"Open" ,
NS(Sq3BlobC_Open) , NULL, NULL},
416 {
VER,
"GetNull" ,
NS(Sq3BlobC_GetNull) , NULL, NULL},
417 {
VER,
"HandleResolve" ,
NS(Sq3BlobC_HandleResolve) , NULL, NULL},
418 {
VER,
"Instances" ,
NS(Sq3BlobC_Instances) , NULL, NULL},
421 {0, NULL, NULL, NULL}
426static Tcl_MethodType
NS(sInstanceDef)[] = {
430 {
VER,
"<constructor>" ,
NS(Sq3BlobC_CTOR) , NULL, NULL},
433 {
VER,
"Next" ,
NS(Sq3BlobC_Next) , NULL, NULL},
434 {
VER,
"Prev" ,
NS(Sq3BlobC_Prev) , NULL, NULL},
437 {
VER,
"Read" ,
NS(Sq3BlobC_Read) , NULL, NULL},
440 {
VER,
"Bytes" ,
NS(Sq3BlobC_Bytes) , NULL, NULL},
442 {
VER,
"Reopen" ,
NS(Sq3BlobC_Reopen) , NULL, NULL},
443 {
VER,
"Write" ,
NS(Sq3BlobC_Write) , NULL, NULL},
446 {0, NULL, NULL, NULL, NULL}
455int NS(pSq3BlobC_Init) (
MK_RT_ARGS Tcl_Interp *interp, Tcl_Namespace *ns)
#define OT_SETUP_VARARGS(min, max, d)
#define OT_CHECK_NIH(val)
#define OT_SETUP_NOARG(d)
#define OT_SETUP_ONEARG(d)
#define OT_ERROR_LNG_RETURN
#define OT_CHECK_NI4(val)
#define OT_CHECK_NI8(val)
#define OT_retObj_SET_Error
#define OT_CONSTRUCTOR_POST(x)
#define OT_retObj_SET_BUF(nat)
#define OT_CHECK_REQUIRED(val)
#define OT_retObj_SET_None
#define OT_retObj_SET_I32(nat)
#define OT_SETUP_CONSTRUCTOR_ARGS(...)
#define OT_CHECK_OPTIONAL(val)
#define OT_retObj_CONSTR(x)
#define MkErrorC_Check(mng, PROC)
#define OT_CHECK_STRN(val)
#define OT_retObj_SET_BLOB(nat)
static __thread MK_TYP Sq3BlobCTT
#define OT_SETUP_hdl_static_constr
#define HandleResolve_doc
#define OT_SETUP_hdl_static
#define OT_SETUP_hdl_constr
#define Sq3BlobHandleResolve(...)
static SQ3_BLOB Sq3BlobPrev(SQ3_BLOB const blob)
get previous instance from linked-list of Sq3BlobS type
#define Sq3BlobInstances()
static SQ3_BLOB Sq3BlobNext(SQ3_BLOB const blob)
get next instance from linked-list of Sq3BlobS type
static SQ3_BLOB Sq3BlobGetNull(void)
Null-Slot - return a Sq3BlobC typed NULL instance …
static MK_I32 Sq3BlobBytes(SQ3_BLOB sq3blob)
Return The Size Of An Open BLOB …
#define Sq3BlobWrite(...)
static enum MkErrorE Sq3BlobReopen(SQ3_BLOB sq3blob, MK_I64 arg1)
Move a BLOB Handle to a New Row …
static enum MkErrorE Sq3BlobOpen(SQ3_LITE sq3lite, MK_STRN zDb, MK_STRN zTable, MK_STRN zColumn, MK_I64 iRow, MK_I32 flags, SQ3_BLOB *ppBlob)
Open A BLOB For Incremental I/O …
#define OT_CHECK_BUF(val, nullB)
#define OT_CHECK_LITE(val, nullB)
Struct to represent the data of the Sq3BlobC …
Struct to represent the data of the Sq3LiteC …