theSq3Lite 10.0
Loading...
Searching...
No Matches
Sq3FileC_atl.c
Go to the documentation of this file.
1
9/* LABEL-START */
10
11#define META_FILE_NAME "Sq3FileC_atl.c"
12
14
15#define OT_CLASS asq3rt->AtlSq3FileC
16#define OT_NULL asq3rt->AtlSq3FileC_MK_NULL
17#define OT_CLASS_NAME "Sq3FileC"
18
19#define SELF2HDL(O) Sq3File(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(Sq3FileC_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(Sq3FileC_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(Sq3FileC_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_FILE)
48#define OT_SETUP_hdl__null_allow SetupHdlFromMetaData__null_allow_2(SQ3_FILE)
49#define OT_SETUP_hdl_destr SetupHdlFromMetaData__null_allow_2(SQ3_FILE)
50#define OT_SETUP_hdl_constr SetupHdlConstr(Sq3FileC)
51#define OT_SETUP_hdl_static_constr OT_SETUP_hdl_static
52#define OT_SETUP_hdl_static SetupHdlStatic(Sq3FileC)
53
54#define OT_retObj_CONSTR(x) OT_retObj_SET(AtomInit(OT_SELF,Sq3FileC_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 (Sq3FileCTT == NULL) Sq3FileCTT = Sq3FileSTT; \
60 \
61 /* protect against double call */ \
62 if (Sq3FileCTT->selfCreate == NS(Sq3FileC_selfCreate)) return MK_OK; \
63 \
64 /* add "selfCreate" and "selfDelete" feature to the META-Class */ \
65 Sq3FileCTT->selfCreate = NS(Sq3FileC_selfCreate); \
66 Sq3FileCTT->selfDelete = NS(Sq3FileC_selfDelete); \
67 Sq3FileCTT->selfUnlink = NS(Sq3FileC_selfUnlink); \
68 \
69 /* create the ATL-class */ \
70 OT_CLASS = AltClassDef(Sq3FileCTT,&asq3rt->AtlSq3FileC_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, "::Sq3FileC::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: Sq3FileC,Sq3File,sCc,func
94#define DatabaseObject_doc "Sq3FileC [Sq3FileC::DatabaseObject X:string]"
95
96// doc-key: Sq3FileC,Sq3File,sc_,func
97#define GetNull_doc "Sq3FileC [Sq3FileC::GetNull]"
98#define HandleResolve_doc "Sq3FileC [Sq3FileC::HandleResolve netHdl:MK_HDL]"
99#define Instances_doc "Sq3FileC [Sq3FileC::Instances]"
100
101// doc-key: Sq3FileC,Sq3File,oc_,func
102#define Next_doc "Sq3FileC [Sq3FileC::Next $file]"
103#define Prev_doc "Sq3FileC [Sq3FileC::Prev $file]"
104
105// doc-key: Sq3FileC,Sq3File,om_,func
106// skip class-overload: HandleGet → MkObjectHandleGet
107
108// END-DOC - created by 'atl_MqS.tcl -i NHI1_HOME/theSq3Lite/c/gen/c_sq3lite.meta' - DO NOT change
109
110/*****************************************************************************/
111/* */
112/* O B J E C T */
113/* */
114/*****************************************************************************/
115
116// BEGIN-Sq3FileC - created by 'atl_MqC.tcl -i NHI1_HOME/theSq3Lite/c/gen/c_sq3lite.meta' - DO NOT change
117
121
122// doc-key: Sq3FileC,Sq3FileC-Class-Export,sc_
123
125static OT_ProcRet NS(Sq3FileC_HandleResolve) (OtClass_ARGS) {
128 MK_HDL netHdl = 0;
131 SQ3_FILE retVal = Sq3FileHandleResolve (netHdl);
132 OT_retObj_SET_FILE(retVal);
133 goto end;
134 error:
136 end:
138}
139
140// doc-key: Sq3FileC,Sq3FileC-Class-Export,om_
141
142// skip on class-overload: Sq3FileHandleGet → MkObjectHandleGet
144static OT_ProcRet NS(Sq3FileC_HandleGet) (Sq3FileC_ARGS) {OT_ERROR_LNG_RETURN;}
145
147// Sq3FileC_Class_ATL_API
148
152
153// doc-key: Sq3FileC,Sq3FileC-Class-Introspection,oc_
154
156static OT_ProcRet NS(Sq3FileC_Next) (Sq3FileC_ARGS) {
160 SQ3_FILE retVal = Sq3FileNext (hdl);
161 OT_retObj_SET_FILE(retVal);
162 goto end;
163 error:
165 end:
167}
168
170static OT_ProcRet NS(Sq3FileC_Prev) (Sq3FileC_ARGS) {
174 SQ3_FILE retVal = Sq3FilePrev (hdl);
175 OT_retObj_SET_FILE(retVal);
176 goto end;
177 error:
179 end:
181}
182
183// doc-key: Sq3FileC,Sq3FileC-Class-Introspection,sc_
184
186static OT_ProcRet NS(Sq3FileC_Instances) (OtClass_ARGS) {
190 SQ3_FILE retVal = Sq3FileInstances ();
191 OT_retObj_SET_FILE(retVal);
192 goto end;
193 error:
195 end:
197}
198
200// Sq3FileC_Class_ATL_API
201
205
206// doc-key: Sq3FileC,Sq3FileC-Class-Misc,sc_
207
209static OT_ProcRet NS(Sq3FileC_GetNull) (OtClass_ARGS) {
213 SQ3_FILE retVal = Sq3FileGetNull ();
214 OT_retObj_SET_FILE(retVal);
215 goto end;
216 error:
218 end:
220}
221
223// Sq3FileC_Class_ATL_API
224
228
229// doc-key: Sq3FileC,Sq3FileC-TOR,sCc
230
232static OT_ProcRet NS(Sq3FileC_DatabaseObject) (OtClass_ARGS) {
235 MK_STRN X = 0;
238 SQ3_FILE retVal = Sq3FileDatabaseObject (X);
239 if (retVal == NULL) {
240 OT_ERROR_CONSTRUCTOR(Sq3FileC);
241 goto error;
242 }
243 OT_retObj_SET_FILE(retVal);
244 goto end;
245 error:
247 end:
249}
250
252// Sq3FileC_TOR_ATL_API
253
254// END-Sq3FileC - created by 'atl_MqC.tcl -i NHI1_HOME/theSq3Lite/c/gen/c_sq3lite.meta' - DO NOT change
255
256// ---------------------------------------------------------------------------------------
257
258static const OtObjProcDefS NS(sOtClassDef)[] = {
259 // BEGIN-CLASS - created by 'atl_MqS.tcl -i NHI1_HOME/theSq3Lite/c/gen/c_sq3lite.meta' - DO NOT change
260
261 // doc-key: Sq3FileC,Sq3File,sCc
262 { "::Sq3FileC::DatabaseObject" , NS(Sq3FileC_DatabaseObject) },
263
264 // doc-key: Sq3FileC,Sq3File,sc_
265 { "::Sq3FileC::GetNull" , NS(Sq3FileC_GetNull) },
266 { "::Sq3FileC::HandleResolve" , NS(Sq3FileC_HandleResolve) },
267 { "::Sq3FileC::Instances" , NS(Sq3FileC_Instances) },
268
269 // END-CLASS - created by 'atl_MqS.tcl -i NHI1_HOME/theSq3Lite/c/gen/c_sq3lite.meta' - DO NOT change
270 { NULL }
271};
272
273// ---------------------------------------------------------------------------------------
274
275static const OtObjProcDefS NS(sInstanceDef)[] = {
276 // BEGIN-OBJ - created by 'atl_MqS.tcl -i NHI1_HOME/theSq3Lite/c/gen/c_sq3lite.meta' - DO NOT change
277
278 // doc-key: Sq3FileC,Sq3File,oc_
279 { "::Sq3FileC::Next" , NS(Sq3FileC_Next) },
280 { "::Sq3FileC::Prev" , NS(Sq3FileC_Prev) },
281
282 // doc-key: Sq3FileC,Sq3File,om_
283 // skip class-overload: HandleGet → MkObjectHandleGet
284
285 // END-OBJ - created by 'atl_MqS.tcl -i NHI1_HOME/theSq3Lite/c/gen/c_sq3lite.meta' - DO NOT change
286 { NULL }
287};
288
294
295int NS(pSq3FileC_Init) ( OT_SQ3_ARGS OT_NS_T ns )
296{
298
299 return TCL_OK;
300error:
301 return TCL_ERROR;
302}
#define MK(n)
#define AtomMake(...)
#define OT_CHECK_NIH(val)
#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_ERROR_CONSTRUCTOR(class)
#define OT_CHECK_REQUIRED(val)
MOX_OBJ_T OT_SELF_T
#define OT_retObj_RETURN
#define OT_MK_CALL
#define OT_CHECK_NOARGS
#define OT_ProcRet
#define OT_CHECK_STRN(val)
#define OtClass_ARGS
#define OT_SQ3_ARGS
#define NS(n)
#define OT_retObj_SET_FILE(nat)
#define SETUP_asq3rt(r)
#define Sq3FileC_ARGS
tag: nhi1-release-250425
#define Instances_doc
#define DatabaseObject_doc
#define OT_SETUP_hdl_static_constr
#define OT_SETUP_hdl
#define GetNull_doc
#define Next_doc
#define HandleResolve_doc
#define Prev_doc
#define OT_CLASS
#define OT_SETUP_hdl_static
#define ClassInit
#define MK_UNUSED
#define MK_DEPRECATED
MK_PTRB * MK_PTR
const MK_STRB * MK_STRN
int32_t MK_HDL
#define MK_RT_ARGS
static SQ3_FILE Sq3FilePrev(SQ3_FILE const file)
get previous instance from linked-list of Sq3FileS type
#define Sq3FileInstances()
#define Sq3FileHandleResolve(...)
static SQ3_FILE Sq3FileNext(SQ3_FILE const file)
get next instance from linked-list of Sq3FileS type
static SQ3_FILE Sq3FileGetNull(void)
Null-Slot - return a Sq3FileC typed NULL instance …
static SQ3_FILE Sq3FileDatabaseObject(MK_STRN X)
Database File Corresponding To A Journal …
Struct to represent the data of the Sq3FileC …