theLink 10.0
Loading...
Searching...
No Matches
MqDumpC_atl.c
Go to the documentation of this file.
1
9/* LABEL-START */
10
11#define META_FILE_NAME "MqDumpC_atl.c"
12
14
15#define OT_CLASS amqrt->AtlMqDumpC
16#define OT_NULL amqrt->AtlMqDumpC_MK_NULL
17#define OT_CLASS_NAME "MqDumpC"
18
19#define SELF2HDL(O) MqDmp(VAL2MNG(O))
20
21// LNG: class
22// -> moved to LibMqMsgque_atl.h → OT_MQ_RT_S → AtlMqMsgqueCTT;
23
24// META: ObjNew feature: called to return a new or an already existing ATL-SELF-Object
25// -> moved to LibMqMsgque_atl.h → MqMsgqueC_ObjNew
26
27// META: ObjNew feature: selfCreate will be called from "ObjNew->MkSelfNew" if MkObj need a SELF pointer
28static MK_PTR NS(MqDumpC_selfCreate) (MK_RT_ARGS MK_OBJ const obj, MK_PTR const env) {
29 SETUP_amqrt(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(MqDumpC_selfDelete) (MK_RT_ARGS MK_PTR selfP, MK_PTR const env) {
35 OT_SELF_T selfO = selfP;
36 SETUP_amqrt(env);
37 MK(AtomDeleteHard) (OT_MK_CALL selfO);
38}
39
40// META: called to destroy link from SELF to META
41static void NS(MqDumpC_selfUnlink) (MK_RT_ARGS MK_PTR selfP, MK_PTR const env) {
42 OT_SELF_T selfO = selfP;
43 SETUP_amqrt(env);
44 return MK(AtomUnlink) (OT_MK_CALL selfO);
45}
46
47#define OT_SETUP_hdl SetupHdlFromMetaData_2(MQ_DMP)
48#define OT_SETUP_hdl__null_allow SetupHdlFromMetaData__null_allow_2(MQ_DMP)
49#define OT_SETUP_hdl_destr SetupHdlFromMetaData__null_allow_2(MQ_DMP)
50#define OT_SETUP_hdl_constr SetupHdlConstr(MqDumpC)
51#define OT_SETUP_hdl_static_constr OT_SETUP_hdl_static
52#define OT_SETUP_hdl_static SetupHdlStatic(MqDumpC)
53
54#define OT_retObj_CONSTR(x) OT_retObj_SET(AtomInit(OT_SELF,MqDumpC_X2obj(x),amqrt))
55
56// initialize the ATL and META class specific object
57#define ClassInit \
58 /* if not already done, initialize NEW META type */ \
59 if (MqDumpCTT == NULL) MqDumpCTT = MqDumpSTT; \
60 \
61 /* protect against double call */ \
62 if (MqDumpCTT->selfCreate == NS(MqDumpC_selfCreate)) return MK_OK; \
63 \
64 /* add "selfCreate" and "selfDelete" feature to the META-Class */ \
65 MqDumpCTT->selfCreate = NS(MqDumpC_selfCreate); \
66 MqDumpCTT->selfDelete = NS(MqDumpC_selfDelete); \
67 MqDumpCTT->selfUnlink = NS(MqDumpC_selfUnlink); \
68 \
69 /* create the ATL-class */ \
70 OT_CLASS = AltClassDef(MqDumpCTT,&amqrt->AtlMqDumpC_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),amqrt)) goto error; \
76 \
77 /* create the ATL instance Methods */ \
78 check_LNG(AtlUnknownSetup (NS(sInstanceDef),amqrt)) 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, "::MqDumpC::MK_NULL", (MK_PTR)amqrt); \
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/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
92
93// doc-key: MqDumpC,MqDump,sCi,func
94#define CTOR_doc "MqDumpC [MqDumpC::CTOR ctx:MqContextC ?dumpP_inout:MqDumpC=NULL?]"
95#define Error_doc "MqDumpC [MqDumpC::Error error:MqContextC ?dumpP_inout:MqDumpC=NULL?]"
96#define Export_doc "MqDumpC [MqDumpC::Export ctx:MqContextC ?dumpP_inout:MqDumpC=NULL?]"
97
98// doc-key: MqDumpC,MqDump,sCo,func
99#define BinSet_doc "MqDumpC [MqDumpC::BinSet data:binary]"
100
101// doc-key: MqDumpC,MqDump,sc_,func
102#define GetNull_doc "MqDumpC [MqDumpC::GetNull]"
103#define HandleResolve_doc "MqDumpC [MqDumpC::HandleResolve netHdl:MK_HDL]"
104#define Instances_doc "MqDumpC [MqDumpC::Instances]"
105
106// doc-key: MqDumpC,MqDump,oc_,func
107#define Next_doc "MqDumpC [MqDumpC::Next $dmp]"
108#define Prev_doc "MqDumpC [MqDumpC::Prev $dmp]"
109
110// doc-key: MqDumpC,MqDump,om_,func
111#define BinGet_doc "binary [MqDumpC::BinGet $dump] (const)"
112// skip class-overload: HandleGet → MkObjectHandleGet
113#define Import_doc "MqDumpC::Import $dump ctx:MqContextC"
114// skip class-overload: Log → MkObjectLog
115#define SizeGet_doc "long [MqDumpC::SizeGet $dump] (const)"
116#define TokenGet_doc "string [MqDumpC::TokenGet $dump] (const)"
117
118// END-DOC - created by 'atl_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
119
120/*****************************************************************************/
121/* */
122/* O B J E C T */
123/* */
124/*****************************************************************************/
125
126// BEGIN-MqDumpC - created by 'atl_MqC.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
127
131
132// doc-key: MqDumpC,MqDumpC-Class-Export,sc_
133
135static OT_ProcRet NS(MqDumpC_HandleResolve) (OtClass_ARGS) {
138 MK_HDL netHdl = 0;
141 MQ_DMP retVal = MqDumpHandleResolve (netHdl);
142 OT_retObj_SET_DMP(retVal);
143 goto end;
144 error:
146 end:
148}
149
150// doc-key: MqDumpC,MqDumpC-Class-Export,om_
151
152// skip on class-overload: MqDumpHandleGet → MkObjectHandleGet
154static OT_ProcRet NS(MqDumpC_HandleGet) (MqDumpC_ARGS) {OT_ERROR_LNG_RETURN;}
155
157// MqDumpC_Class_ATL_API
158
162
163// doc-key: MqDumpC,MqDumpC-Class-Introspection,oc_
164
166static OT_ProcRet NS(MqDumpC_Next) (MqDumpC_ARGS) {
170 MQ_DMP retVal = MqDumpNext (hdl);
171 OT_retObj_SET_DMP(retVal);
172 goto end;
173 error:
175 end:
177}
178
180static OT_ProcRet NS(MqDumpC_Prev) (MqDumpC_ARGS) {
184 MQ_DMP retVal = MqDumpPrev (hdl);
185 OT_retObj_SET_DMP(retVal);
186 goto end;
187 error:
189 end:
191}
192
193// doc-key: MqDumpC,MqDumpC-Class-Introspection,sc_
194
196static OT_ProcRet NS(MqDumpC_Instances) (OtClass_ARGS) {
200 MQ_DMP retVal = MqDumpInstances ();
201 OT_retObj_SET_DMP(retVal);
202 goto end;
203 error:
205 end:
207}
208
210// MqDumpC_Class_ATL_API
211
215
216// doc-key: MqDumpC,MqDumpC-Class-Misc,sc_
217
219static OT_ProcRet NS(MqDumpC_GetNull) (OtClass_ARGS) {
223 MQ_DMP retVal = MqDumpGetNull ();
224 OT_retObj_SET_DMP(retVal);
225 goto end;
226 error:
228 end:
230}
231
233// MqDumpC_Class_ATL_API
234
238
239// doc-key: MqDumpC,MqDumpC-Misc,om_
240
241// skip on class-overload: MqDumpLog → MkObjectLog
244
246static OT_ProcRet NS(MqDumpC_SizeGet) (MqDumpC_ARGS) {
251 goto end;
252 error:
254 end:
256}
257
259static OT_ProcRet NS(MqDumpC_TokenGet) (MqDumpC_ARGS) {
264 goto end;
265 error:
267 end:
269}
270
272// MqDumpC_Misc_ATL_API
273
277
278// doc-key: MqDumpC,MqDumpC-TOR,sCi
279
281static OT_ProcRet NS(MqDumpC_CTOR) (CONSTR_ARGS) {
284 MQ_CTX ctx = 0;
286 MQ_DMP dumpP_inout = NULL;
288 MkErrorC_Check(ctx,MqDumpExport (ctx, &dumpP_inout));
289 OT_CONSTRUCTOR_POST(dumpP_inout)
290 OT_retObj_CONSTR(dumpP_inout);
291 goto end;
292 error:
294 end:
296}
297
299static OT_ProcRet NS(MqDumpC_Error) (OtClass_ARGS) {
302 MQ_CTX error = 0;
304 MQ_DMP dumpP_inout = NULL;
307 MkErrorC_Check(error,MqDumpError (error, &dumpP_inout));
308 OT_retObj_SET_DMP(dumpP_inout);
309 goto end;
310 error:
312 end:
314}
315
317static OT_ProcRet NS(MqDumpC_Export) (OtClass_ARGS) {
320 MQ_CTX ctx = 0;
322 MQ_DMP dumpP_inout = NULL;
325 MkErrorC_Check(ctx,MqDumpExport (ctx, &dumpP_inout));
326 OT_CONSTRUCTOR_POST(dumpP_inout)
327 OT_retObj_SET_DMP(dumpP_inout);
328 goto end;
329 error:
331 end:
333}
334
335// doc-key: MqDumpC,MqDumpC-TOR,sCo
336
338static OT_ProcRet NS(MqDumpC_BinSet) (OtClass_ARGS) {
341 MkBinaryR data = {0};
344 MQ_DMP dmp_out;
346 OT_retObj_SET_DMP(dmp_out);
347 goto end;
348 error:
350 end:
352}
353
354// doc-key: MqDumpC,MqDumpC-TOR,om_
355
357static OT_ProcRet NS(MqDumpC_BinGet) (MqDumpC_ARGS) {
361 MkBinaryR retVal = MqDumpBinGet (hdl);
363 goto end;
364 error:
366 end:
368}
369
371static OT_ProcRet NS(MqDumpC_Import) (MqDumpC_ARGS) {
374 MQ_CTX ctx = 0;
377 MkErrorC_Check(hdl,MqDumpImport (hdl, ctx));
379 goto end;
380 error:
382 end:
384}
385
387// MqDumpC_TOR_ATL_API
388
389// END-MqDumpC - created by 'atl_MqC.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
390
391// ---------------------------------------------------------------------------------------
392
393static const OtObjProcDefS NS(sOtClassDef)[] = {
394 // BEGIN-CLASS - created by 'atl_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
395
396 // doc-key: MqDumpC,MqDump,sCi
397 { "::MqDumpC::Error" , NS(MqDumpC_Error) },
398 { "::MqDumpC::Export" , NS(MqDumpC_Export) },
399
400 // doc-key: MqDumpC,MqDump,sCo
401 { "::MqDumpC::BinSet" , NS(MqDumpC_BinSet) },
402
403 // doc-key: MqDumpC,MqDump,sc_
404 { "::MqDumpC::GetNull" , NS(MqDumpC_GetNull) },
405 { "::MqDumpC::HandleResolve" , NS(MqDumpC_HandleResolve) },
406 { "::MqDumpC::Instances" , NS(MqDumpC_Instances) },
407
408 // END-CLASS - created by 'atl_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
409 { NULL }
410};
411
412// ---------------------------------------------------------------------------------------
413
414static const OtObjProcDefS NS(sInstanceDef)[] = {
415 // BEGIN-OBJ - created by 'atl_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
416
417 // doc-key: MqDumpC,MqDump,oC_
418 { "::MqDumpC::MqDumpC" , NS(MqDumpC_CTOR) },
419
420 // doc-key: MqDumpC,MqDump,oc_
421 { "::MqDumpC::Next" , NS(MqDumpC_Next) },
422 { "::MqDumpC::Prev" , NS(MqDumpC_Prev) },
423
424 // doc-key: MqDumpC,MqDump,om_
425 { "::MqDumpC::BinGet" , NS(MqDumpC_BinGet) },
426 // skip class-overload: HandleGet → MkObjectHandleGet
427 { "::MqDumpC::Import" , NS(MqDumpC_Import) },
428 // skip class-overload: Log → MkObjectLog
429 { "::MqDumpC::SizeGet" , NS(MqDumpC_SizeGet) },
430 { "::MqDumpC::TokenGet" , NS(MqDumpC_TokenGet) },
431
432 // END-OBJ - created by 'atl_MqS.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
433 { NULL }
434};
435
441
442int NS(pMqDumpC_Init) ( OT_MQ_ARGS OT_NS_T ns )
443{
446
447 return TCL_OK;
448error:
449 return TCL_ERROR;
450}
#define MK(n)
#define AtomMake(...)
#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
MOX_NS_T OT_NS_T
#define OT_retObj_SET_Error
#define OT_retObj_SET_LONG(nat)
#define OT_CHECK_REQUIRED(val)
#define OT_retObj_SET_None
MOX_OBJ_T OT_SELF_T
#define OT_GET__ME_REF_MkBinaryR(b)
#define OT_SETUP_CONSTRUCTOR_ARGS(...)
#define OT_retObj_RETURN
#define OT_CHECK__ME_REF_MkBinaryR(val)
#define OT_MK_CALL
#define OT_retObj_SET_STR(nat)
#define OT_CHECK_OPTIONAL(val)
#define OT_retObj_SET(val)
#define OT_CHECK_NOARGS
#define MkErrorC_Check(mng, PROC)
#define OT_ProcRet
#define CONSTR_ARGS
#define OtClass_ARGS
#define SETUP_amqrt(r)
#define NS(n)
#define MqDumpC_ARGS
#define OT_MQ_ARGS
#define OT_retObj_SET_DMP(nat)
tag: nhi1-release-250425
#define OT_CONSTRUCTOR_POST(x)
#define Instances_doc
#define Import_doc
#define OT_SETUP_hdl_static_constr
Definition MqDumpC_atl.c:51
#define OT_SETUP_hdl
Definition MqDumpC_atl.c:47
#define GetNull_doc
#define Next_doc
#define Error_doc
Definition MqDumpC_atl.c:95
#define HandleResolve_doc
#define Prev_doc
#define OT_CLASS
Definition MqDumpC_atl.c:15
#define OT_SETUP_hdl_static
Definition MqDumpC_atl.c:52
#define OT_SETUP_hdl_constr
Definition MqDumpC_atl.c:50
#define Export_doc
Definition MqDumpC_atl.c:96
#define SizeGet_doc
#define TokenGet_doc
#define OT_retObj_CONSTR(x)
Definition MqDumpC_atl.c:54
#define CTOR_doc
Definition MqDumpC_atl.c:94
#define BinSet_doc
Definition MqDumpC_atl.c:99
#define ClassInit
Definition MqDumpC_atl.c:57
#define BinGet_doc
#define error
Definition high_lng.h:339
#define MK_ERROR_FORMAT
#define MK_NULL_NO
#define MK_NULL_YES
#define MK_UNUSED
#define MK_DEPRECATED
MK_PTRB * MK_PTR
int32_t MK_HDL
#define MK_RT_ARGS
#define MqDumpHandleResolve(...)
static MQ_DMP MqDumpGetNull(void)
Null-Slot - return a MqDumpC typed NULL instance …
#define MqDumpInstances()
static MQ_DMP MqDumpNext(MQ_DMP const dmp)
get next instance from linked-list of MqDumpS type
static MQ_DMP MqDumpPrev(MQ_DMP const dmp)
get previous instance from linked-list of MqDumpS type
MK_STRN MqDumpTokenGet(MQ_DMPN const dump)
return the MqContextC_ServiceApi_Identifer …
MK_SIZE MqDumpSizeGet(MQ_DMPN const dump)
report the binary data size from an MqDumpS object
#define MqDumpError(...)
#define MqDumpExport(...)
#define MqDumpBinSet(...)
#define MqDumpImport(...)
MkBinaryR MqDumpBinGet(MQ_DMPN const dump)
export the binary data from an MqDumpS object
#define MQ_STATIC_RT
MK_OBJ const obj
Definition high_lng.h:136
#define OT_CHECK_CTX(val, nullB)
#define OT_CHECK_DMP(val, nullB)
PUBLIC data structure for the atlmqmsgque-specific-data
MqDumpC - the class known as dmp or dump is used to export a atlmqmsgque data package as binary …