theKernel 10.0
Loading...
Searching...
No Matches
MkErrorC_atl.c
Go to the documentation of this file.
1
9/* LABEL-START */
10
11#define META_FILE_NAME "MkErrorC_atl.c"
12
14
15#define OT_CLASS amkrt->AtlMkErrorC
16#define OT_NULL amkrt->AtlMkErrorC_MK_NULL
17#define OT_CLASS_NAME "MkErrorC"
18
19#define SELF2HDL(O) MkErr(VAL2MNG(O))
20
21// LNG: class
22// -> moved to LibMkKernel_atl.h → OT_MK_RT_S → AtlMkKernelCTT;
23
24// META: ObjNew feature: called to return a new or an already existing ATL-SELF-Object
25// -> moved to LibMkKernel_atl.h → MkKernelC_ObjNew
26
27// META: ObjNew feature: selfCreate will be called from "ObjNew->MkSelfNew" if MkObj need a SELF pointer
28static MK_PTR NS(MkErrorC_selfCreate) (MK_RT_ARGS MK_OBJ const obj, MK_PTR const env) {
29 SETUP_amkrt(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(MkErrorC_selfDelete) (MK_RT_ARGS MK_PTR selfP, MK_PTR const env) {
35 OT_SELF_T selfO = selfP;
36 SETUP_amkrt(env);
37 MK(AtomDeleteHard) (OT_MK_CALL selfO);
38}
39
40// META: called to destroy link from SELF to META
41static void NS(MkErrorC_selfUnlink) (MK_RT_ARGS MK_PTR selfP, MK_PTR const env) {
42 OT_SELF_T selfO = selfP;
43 SETUP_amkrt(env);
44 return MK(AtomUnlink) (OT_MK_CALL selfO);
45}
46
47#define OT_SETUP_hdl SetupHdlFromMetaData_2(MK_ERR)
48#define OT_SETUP_hdl__null_allow SetupHdlFromMetaData__null_allow_2(MK_ERR)
49#define OT_SETUP_hdl_destr SetupHdlFromMetaData__null_allow_2(MK_ERR)
50#define OT_SETUP_hdl_constr SetupHdlConstr(MkErrorC)
51#define OT_SETUP_hdl_static_constr OT_SETUP_hdl_static
52#define OT_SETUP_hdl_static SetupHdlStatic(MkErrorC)
53
54#define OT_retObj_CONSTR(x) OT_retObj_SET(AtomInit(OT_SELF,MkErrorC_X2obj(x),amkrt))
55
56// initialize the ATL and META class specific object
57#define ClassInit \
58 /* if not already done, initialize NEW META type */ \
59 if (MkErrorCTT == NULL) MkErrorCTT = MkErrorSTT; \
60 \
61 /* protect against double call */ \
62 if (MkErrorCTT->selfCreate == NS(MkErrorC_selfCreate)) return MK_OK; \
63 \
64 /* add "selfCreate" and "selfDelete" feature to the META-Class */ \
65 MkErrorCTT->selfCreate = NS(MkErrorC_selfCreate); \
66 MkErrorCTT->selfDelete = NS(MkErrorC_selfDelete); \
67 MkErrorCTT->selfUnlink = NS(MkErrorC_selfUnlink); \
68 \
69 /* create the ATL-class */ \
70 OT_CLASS = AltClassDef(MkErrorCTT,&amkrt->AtlMkErrorC_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),amkrt)) goto error; \
76 \
77 /* create the ATL instance Methods */ \
78 check_LNG(AtlUnknownSetup (NS(sInstanceDef),amkrt)) 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, "::MkErrorC::MK_NULL", (MK_PTR)amkrt); \
87 if (OT_NULL == NULL) goto error; \
88 OT_REF_INCR(OT_NULL);
89/* LABEL-END */
90
91/*****************************************************************************/
92/* */
93/* D O C */
94/* */
95/*****************************************************************************/
96
97// BEGIN-DOC - created by 'atl_MqS.tcl -i NHI1_HOME/theKernel/c/gen/c_mkkernel.meta' - DO NOT change
98
99// doc-key: MkErrorC,MkError,sc_,func
100#define DEFAULT_doc "MkErrorC [MkErrorC::DEFAULT]"
101#define FORMAT_doc "MkErrorC [MkErrorC::FORMAT ?fmtobj:MkObjectC=NULL?]"
102#define GetNull_doc "MkErrorC [MkErrorC::GetNull]"
103#define HandleResolve_doc "MkErrorC [MkErrorC::HandleResolve netHdl:MK_HDL]"
104#define IGNORE_doc "MkErrorC [MkErrorC::IGNORE]"
105#define Instances_doc "MkErrorC [MkErrorC::Instances]"
106#define PRINT_doc "MkErrorC [MkErrorC::PRINT]"
107
108// doc-key: MkErrorC,MkError,oCx,func
109#define Dup_doc "MkErrorC [MkErrorC::Dup $srce] (const)"
110
111// doc-key: MkErrorC,MkError,oc_,func
112#define Catch_doc "MkErrorC [MkErrorC::Catch $err ?exception:errorCode=NULL? ?callfunc:string=\"MK_NULL\"?]"
113#define Next_doc "MkErrorC [MkErrorC::Next $err]"
114#define NoRaise_doc "MkErrorC [MkErrorC::NoRaise $err]"
115#define Prev_doc "MkErrorC [MkErrorC::Prev $err]"
116
117// doc-key: MkErrorC,MkError,om_,func
118#define AppendC_doc "MkErrorC::AppendC $err message:string"
119#define Cleanup_doc "MkErrorC::Cleanup $err ?callfunc:string=\"MK_NULL\"? ?callline:int32=-1?"
120#define Copy_doc "MkErrorC::Copy $dest srce:MkErrorC"
121#define GetCode_doc "MkErrorE [MkErrorC::GetCode $err] (const)"
122#define GetNum_doc "int32 [MkErrorC::GetNum $err] (const)"
123#define GetSize_doc "long [MkErrorC::GetSize $err] (const)"
124#define GetText_doc "string [MkErrorC::GetText $err] (const)"
125// skip class-overload: HandleGet → MkObjectHandleGet
126#define IsABORT_doc "bool [MkErrorC::IsABORT $err] (const)"
127#define IsEXIT_doc "bool [MkErrorC::IsEXIT $err]"
128#define IsSOCKET_doc "bool [MkErrorC::IsSOCKET $err] (const)"
129#define IsTIMEOUT_doc "bool [MkErrorC::IsTIMEOUT $err] (const)"
130// skip class-overload: Log → MkObjectLog
131#define Println_doc "MkErrorC::Println $err ?msg:string=\"\"? ?callfunc:string=\"MK_NULL\"? ?callline:int32=-1?"
132#define Raise_doc "MkErrorC::Raise $err (const)"
133#define Reset_doc "MkErrorC::Reset $err ?callfunc:string=\"MK_NULL\"? ?callline:int32=-1? ?force:bool=false?"
134#define SetABORT_doc "MkErrorC::SetABORT $err ?detail:string=\"UNKNOWN\"? ?callfunc:string=\"MK_NULL\"?"
135#define SetC_doc "MkErrorC::SetC $err message:string ?callfunc:string=\"MK_NULL\"? ?errnum:int32=-1?"
136#define SetCONTINUE_doc "MkErrorC::SetCONTINUE $err"
137#define SetCode_doc "MkErrorC::SetCode $err code:MkErrorE"
138#define SetEXIT_doc "MkErrorC::SetEXIT $err ?callfunc:string=\"MK_NULL\"?"
139#define SetSOCKET_doc "MkErrorC::SetSOCKET $err ?detail:string=\"UNKNOWN\"? ?callfunc:string=\"MK_NULL\"?"
140#define Stack_doc "MkErrorE [MkErrorC::Stack $err ?callfunc:string=\"MK_NULL\"? ?callfile:string=\"MK_NULL\"? ?callline:int32=-1?]"
141#define StackFormat_doc "MkErrorC::StackFormat $err ?callfunc:string=\"MK_NULL\"? ?callfile:string=\"MK_NULL\"? ?callline:int32=-1?"
142// skip class-overload: ToString → MkObjectToString
143
144// doc-key: MkErrorC,MkPanic,sm_,func
145#define PanicC_doc "MkErrorC::PanicC fmtobj:MkObjectC callfunc:string errnum:int32 message:string"
146#define PanicDEFAULT_doc "MkErrorC::PanicDEFAULT ?fmtobj:MkObjectC=NULL? ?callfunc:string=\"MK_NULL\"?"
147
148// END-DOC - created by 'atl_MqS.tcl -i NHI1_HOME/theKernel/c/gen/c_mkkernel.meta' - DO NOT change
149
150/*****************************************************************************/
151/* */
152/* S T A R T */
153/* */
154/*****************************************************************************/
155
156// catch ignore MkErrorE
157#define MkErrorCatchTmpl(...) MK(MkExceptionC_Catch)(OT_Prefix_CALL __VA_ARGS__)
158
159/*****************************************************************************/
160/* */
161/* O B J E C T */
162/* */
163/*****************************************************************************/
164
165// BEGIN-MkErrorC - created by 'atl_MqC.tcl -i NHI1_HOME/theKernel/c/gen/c_mkkernel.meta' - DO NOT change
166
170
171// doc-key: MkErrorC,MkErrorC-Class-Export,sc_
172
174static OT_ProcRet NS(MkErrorC_HandleResolve) (OtClass_ARGS) {
177 MK_HDL netHdl = 0;
180 MK_ERR retVal = MkErrorHandleResolve (netHdl);
181 OT_retObj_SET_ERR(retVal);
182 goto end;
183 error:
185 end:
187}
188
189// doc-key: MkErrorC,MkErrorC-Class-Export,om_
190
191// skip on class-overload: MkErrorHandleGet → MkObjectHandleGet
193static OT_ProcRet NS(MkErrorC_HandleGet) (MkErrorC_ARGS) {OT_ERROR_LNG_RETURN;}
194
196// MkErrorC_Class_ATL_API
197
201
202// doc-key: MkErrorC,MkErrorC-Class-Introspection,oc_
203
205static OT_ProcRet NS(MkErrorC_Next) (MkErrorC_ARGS) {
209 MK_ERR retVal = MkErrorNext (hdl);
210 OT_retObj_SET_ERR(retVal);
211 goto end;
212 error:
214 end:
216}
217
219static OT_ProcRet NS(MkErrorC_Prev) (MkErrorC_ARGS) {
223 MK_ERR retVal = MkErrorPrev (hdl);
224 OT_retObj_SET_ERR(retVal);
225 goto end;
226 error:
228 end:
230}
231
232// doc-key: MkErrorC,MkErrorC-Class-Introspection,sc_
233
235static OT_ProcRet NS(MkErrorC_Instances) (OtClass_ARGS) {
239 MK_ERR retVal = MkErrorInstances ();
240 OT_retObj_SET_ERR(retVal);
241 goto end;
242 error:
244 end:
246}
247
249// MkErrorC_Class_ATL_API
250
254
255// doc-key: MkErrorC,MkErrorC-Class-Misc,sc_
256
258static OT_ProcRet NS(MkErrorC_GetNull) (OtClass_ARGS) {
262 MK_ERR retVal = MkErrorGetNull ();
263 OT_retObj_SET_ERR(retVal);
264 goto end;
265 error:
267 end:
269}
270
272// MkErrorC_Class_ATL_API
273
277
278// doc-key: MkErrorC,MkErrorC-Get,om_
279
281static OT_ProcRet NS(MkErrorC_GetCode) (MkErrorC_ARGS) {
286 goto end;
287 error:
289 end:
291}
292
294static OT_ProcRet NS(MkErrorC_GetNum) (MkErrorC_ARGS) {
299 goto end;
300 error:
302 end:
304}
305
307static OT_ProcRet NS(MkErrorC_GetSize) (MkErrorC_ARGS) {
312 goto end;
313 error:
315 end:
317}
318
320static OT_ProcRet NS(MkErrorC_GetText) (MkErrorC_ARGS) {
325 goto end;
326 error:
328 end:
330}
331
333// MkErrorC_Get_ATL_API
334
338
339// doc-key: MkErrorC,MkErrorC-Misc,oc_
340
342static OT_ProcRet NS(MkErrorC_Catch) (MkErrorC_ARGS) {
345 MK_EXP exception = NULL;
347 MK_STRN callfunc = NULL;
350 if (MkSysStringIsNULL(callfunc)) {callfunc = OT_GET_CALL_PROC;}
351 MK_ERR retVal = MkErrorCatchTmpl (hdl, exception, callfunc);
352 OT_retObj_SET_ERR(retVal);
353 goto end;
354 error:
356 end:
359}
360
361// doc-key: MkErrorC,MkErrorC-Misc,om_
362
364static OT_ProcRet NS(MkErrorC_Cleanup) (MkErrorC_ARGS) {
367 MK_STRN callfunc = NULL;
369 MK_I32 callline = -1;
372 if (callline == -1 ) {callline = OT_GET_CALL_LINE;}
373 if (MkSysStringIsNULL(callfunc)) {callfunc = OT_GET_CALL_PROC;}
374 MkErrorCleanup (hdl, callfunc, callline);
376 goto end;
377 error:
379 end:
382}
383
384// skip on class-overload: MkErrorLog → MkObjectLog
387
389static OT_ProcRet NS(MkErrorC_Println) (MkErrorC_ARGS) {
392 MK_STRN msg = "";
394 MK_STRN callfunc = NULL;
396 MK_I32 callline = -1;
399 if (callline == -1 ) {callline = OT_GET_CALL_LINE;}
400 if (MkSysStringIsNULL(callfunc)) {callfunc = OT_GET_CALL_PROC;}
401 MkErrorPrintln (hdl, msg, callfunc, callline);
403 goto end;
404 error:
406 end:
409}
410
412static OT_ProcRet NS(MkErrorC_Reset) (MkErrorC_ARGS) {
415 MK_STRN callfunc = NULL;
417 MK_I32 callline = -1;
419 MK_BOOL force = false;
422 if (callline == -1 ) {callline = OT_GET_CALL_LINE;}
423 if (MkSysStringIsNULL(callfunc)) {callfunc = OT_GET_CALL_PROC;}
424 MkErrorC_Check(hdl,MkErrorReset (hdl, callfunc, callline, force));
426 goto end;
427 error:
429 end:
432}
433
435static OT_ProcRet NS(MkErrorC_Stack) (MkErrorC_ARGS) {
438 MK_STRN callfunc = NULL;
440 MK_STRN callfile = NULL;
442 MK_I32 callline = -1;
445 if (callline == -1 ) {callline = OT_GET_CALL_LINE;}
446 if (MkSysStringIsNULL(callfile)) {callfile = OT_GET_CALL_FILE;}
447 if (MkSysStringIsNULL(callfunc)) {callfunc = OT_GET_CALL_PROC;}
448 OT_retObj_SET(OT_NEW_Mk_enum_OBJ(ErrorE,MkErrorStack (hdl, callfunc, callfile, callline)));
449 goto end;
450 error:
452 end:
455}
456
458static OT_ProcRet NS(MkErrorC_StackFormat) (MkErrorC_ARGS) {
461 MK_STRN callfunc = NULL;
463 MK_STRN callfile = NULL;
465 MK_I32 callline = -1;
468 if (callline == -1 ) {callline = OT_GET_CALL_LINE;}
469 if (MkSysStringIsNULL(callfile)) {callfile = OT_GET_CALL_FILE;}
470 if (MkSysStringIsNULL(callfunc)) {callfunc = OT_GET_CALL_PROC;}
471 MkErrorStackFormat (hdl, callfunc, callfile, callline);
473 goto end;
474 error:
476 end:
479}
480
481// skip on class-overload: MkErrorToString → MkObjectToString
483static OT_ProcRet NS(MkErrorC_ToString) (MkErrorC_ARGS) {OT_ERROR_LNG_RETURN;}
484
486// MkErrorC_Misc_ATL_API
487
491
492// doc-key: MkErrorC,MkErrorC-Raise,oc_
493
495static OT_ProcRet NS(MkErrorC_NoRaise) (MkErrorC_ARGS) {
499 MK_ERR retVal = MkErrorNoRaise (hdl);
500 OT_retObj_SET_ERR(retVal);
501 goto end;
502 error:
504 end:
506}
507
508// doc-key: MkErrorC,MkErrorC-Raise,om_
509
511static OT_ProcRet NS(MkErrorC_AppendC) (MkErrorC_ARGS) {
514 MK_STRN message = 0;
517 MkErrorAppendC (hdl, message);
519 goto end;
520 error:
522 end:
524}
525
527static OT_ProcRet NS(MkErrorC_Raise) (MkErrorC_ARGS) {
531 MkErrorC_Check(hdl,MkErrorRaise (hdl));
533 goto end;
534 error:
536 end:
538}
539
541static OT_ProcRet NS(MkErrorC_SetC) (MkErrorC_ARGS) {
544 MK_STRN message = 0;
546 MK_STRN callfunc = NULL;
548 MK_I32 errnum = -1;
551 if (MkSysStringIsNULL(callfunc)) {callfunc = OT_GET_CALL_PROC;}
552 MkErrorC_Check(hdl,MkErrorSetC (hdl, message, callfunc, errnum));
554 goto end;
555 error:
557 end:
560}
561
562// doc-key: MkErrorC,MkErrorC-Raise,sm_
563
565static OT_ProcRet NS(MkErrorC_PanicC) (OtClass_ARGS) {
568 MK_OBJN fmtobj = NULL;
570 MK_STRN callfunc = NULL;
572 MK_I32 errnum = -1;
574 MK_STRN message = 0;
577 if (MkSysStringIsNULL(callfunc)) {callfunc = OT_GET_CALL_PROC;}
578 MkPanicC (fmtobj, callfunc, errnum, message);
580 goto end;
581 error:
583 end:
586}
587
589static OT_ProcRet NS(MkErrorC_PanicDEFAULT) (OtClass_ARGS) {
592 MK_OBJN fmtobj = NULL;
594 MK_STRN callfunc = NULL;
597 if (MkSysStringIsNULL(callfunc)) {callfunc = OT_GET_CALL_PROC;}
598 MkPanicDEFAULT (fmtobj, callfunc);
600 goto end;
601 error:
603 end:
606}
607
609// MkErrorC_Raise_ATL_API
610
614
615// doc-key: MkErrorC,MkErrorC-Signal,om_
616
618static OT_ProcRet NS(MkErrorC_IsABORT) (MkErrorC_ARGS) {
623 goto end;
624 error:
626 end:
628}
629
631static OT_ProcRet NS(MkErrorC_IsEXIT) (MkErrorC_ARGS) {
636 goto end;
637 error:
639 end:
641}
642
644static OT_ProcRet NS(MkErrorC_IsSOCKET) (MkErrorC_ARGS) {
649 goto end;
650 error:
652 end:
654}
655
657static OT_ProcRet NS(MkErrorC_IsTIMEOUT) (MkErrorC_ARGS) {
662 goto end;
663 error:
665 end:
667}
668
670static OT_ProcRet NS(MkErrorC_SetABORT) (MkErrorC_ARGS) {
673 MK_STRN detail = "UNKNOWN";
675 MK_STRN callfunc = NULL;
678 if (MkSysStringIsNULL(callfunc)) {callfunc = OT_GET_CALL_PROC;}
679 MkErrorC_Check(hdl,MkErrorSetABORT (hdl, detail, callfunc));
681 goto end;
682 error:
684 end:
687}
688
690static OT_ProcRet NS(MkErrorC_SetCONTINUE) (MkErrorC_ARGS) {
694 MkErrorSetCONTINUE (hdl);
696 goto end;
697 error:
699 end:
701}
702
704static OT_ProcRet NS(MkErrorC_SetCode) (MkErrorC_ARGS) {
707 enum MkErrorE code = 0;
710 MkErrorSetCode (hdl, code);
712 goto end;
713 error:
715 end:
717}
718
720static OT_ProcRet NS(MkErrorC_SetEXIT) (MkErrorC_ARGS) {
723 MK_STRN callfunc = NULL;
726 if (MkSysStringIsNULL(callfunc)) {callfunc = OT_GET_CALL_PROC;}
727 MkErrorC_Check(hdl,MkErrorSetEXIT (hdl, callfunc));
729 goto end;
730 error:
732 end:
735}
736
738static OT_ProcRet NS(MkErrorC_SetSOCKET) (MkErrorC_ARGS) {
741 MK_STRN detail = "UNKNOWN";
743 MK_STRN callfunc = NULL;
746 if (MkSysStringIsNULL(callfunc)) {callfunc = OT_GET_CALL_PROC;}
747 MkErrorC_Check(hdl,MkErrorSetSOCKET (hdl, detail, callfunc));
749 goto end;
750 error:
752 end:
755}
756
758// MkErrorC_Signal_ATL_API
759
763
764// doc-key: MkErrorC,MkErrorC-System,sc_
765
767static OT_ProcRet NS(MkErrorC_DEFAULT) (OtClass_ARGS) {
771 MK_ERR retVal = MkErrorDEFAULT ();
772 OT_retObj_SET_ERR(retVal);
773 goto end;
774 error:
776 end:
778}
779
781static OT_ProcRet NS(MkErrorC_FORMAT) (OtClass_ARGS) {
784 MK_OBJN fmtobj = NULL;
787 MK_ERR retVal = MkErrorFORMAT (fmtobj);
788 OT_retObj_SET_ERR(retVal);
789 goto end;
790 error:
792 end:
794}
795
797static OT_ProcRet NS(MkErrorC_IGNORE) (OtClass_ARGS) {
801 MK_ERR retVal = MkErrorIGNORE ();
802 OT_retObj_SET_ERR(retVal);
803 goto end;
804 error:
806 end:
808}
809
811static OT_ProcRet NS(MkErrorC_PRINT) (OtClass_ARGS) {
815 MK_ERR retVal = MkErrorPRINT ();
816 OT_retObj_SET_ERR(retVal);
817 goto end;
818 error:
820 end:
822}
823
825// MkErrorC_System_ATL_API
826
830
831// doc-key: MkErrorC,MkErrorC-TOR,oCx
832
834static OT_ProcRet NS(MkErrorC_Dup) (MkErrorC_ARGS) {
838 MK_ERR retVal = MkErrorDup (hdl);
839 if (retVal == NULL) {
840 OT_ERROR_CONSTRUCTOR(MkErrorC);
841 goto error;
842 }
843 OT_retObj_SET_ERR(retVal);
844 goto end;
845 error:
847 end:
849}
850
851// doc-key: MkErrorC,MkErrorC-TOR,om_
852
854static OT_ProcRet NS(MkErrorC_Copy) (MkErrorC_ARGS) {
857 MK_ERRN srce = 0;
860 MkErrorCopy (hdl, srce);
862 goto end;
863 error:
865 end:
867}
868
870// MkErrorC_TOR_ATL_API
871
872// END-MkErrorC - created by 'atl_MqC.tcl -i NHI1_HOME/theKernel/c/gen/c_mkkernel.meta' - DO NOT change
873
879
880static const OtObjProcDefS NS(sOtClassDef)[] = {
881 // BEGIN-CLASS - created by 'atl_MqS.tcl -i NHI1_HOME/theKernel/c/gen/c_mkkernel.meta' - DO NOT change
882
883 // doc-key: MkErrorC,MkError,sc_
884 { "::MkErrorC::DEFAULT" , NS(MkErrorC_DEFAULT) },
885 { "::MkErrorC::FORMAT" , NS(MkErrorC_FORMAT) },
886 { "::MkErrorC::GetNull" , NS(MkErrorC_GetNull) },
887 { "::MkErrorC::HandleResolve" , NS(MkErrorC_HandleResolve) },
888 { "::MkErrorC::IGNORE" , NS(MkErrorC_IGNORE) },
889 { "::MkErrorC::Instances" , NS(MkErrorC_Instances) },
890 { "::MkErrorC::PRINT" , NS(MkErrorC_PRINT) },
891
892 // doc-key: MkErrorC,MkPanic,sm_
893 { "::MkErrorC::PanicC" , NS(MkErrorC_PanicC) },
894 { "::MkErrorC::PanicDEFAULT" , NS(MkErrorC_PanicDEFAULT) },
895
896 // END-CLASS - created by 'atl_MqS.tcl -i NHI1_HOME/theKernel/c/gen/c_mkkernel.meta' - DO NOT change
897 { NULL }
898};
899
900// ---------------------------------------------------------------------------------------
901
902static const OtObjProcDefS NS(sInstanceDef)[] = {
903 // BEGIN-OBJ - created by 'atl_MqS.tcl -i NHI1_HOME/theKernel/c/gen/c_mkkernel.meta' - DO NOT change
904
905 // doc-key: MkErrorC,MkError,oCx
906 { "::MkErrorC::Dup" , NS(MkErrorC_Dup) },
907
908 // doc-key: MkErrorC,MkError,oc_
909 { "::MkErrorC::Catch" , NS(MkErrorC_Catch) },
910 { "::MkErrorC::Next" , NS(MkErrorC_Next) },
911 { "::MkErrorC::NoRaise" , NS(MkErrorC_NoRaise) },
912 { "::MkErrorC::Prev" , NS(MkErrorC_Prev) },
913
914 // doc-key: MkErrorC,MkError,om_
915 { "::MkErrorC::AppendC" , NS(MkErrorC_AppendC) },
916 { "::MkErrorC::Cleanup" , NS(MkErrorC_Cleanup) },
917 { "::MkErrorC::Copy" , NS(MkErrorC_Copy) },
918 { "::MkErrorC::GetCode" , NS(MkErrorC_GetCode) },
919 { "::MkErrorC::GetNum" , NS(MkErrorC_GetNum) },
920 { "::MkErrorC::GetSize" , NS(MkErrorC_GetSize) },
921 { "::MkErrorC::GetText" , NS(MkErrorC_GetText) },
922 // skip class-overload: HandleGet → MkObjectHandleGet
923 { "::MkErrorC::IsABORT" , NS(MkErrorC_IsABORT) },
924 { "::MkErrorC::IsEXIT" , NS(MkErrorC_IsEXIT) },
925 { "::MkErrorC::IsSOCKET" , NS(MkErrorC_IsSOCKET) },
926 { "::MkErrorC::IsTIMEOUT" , NS(MkErrorC_IsTIMEOUT) },
927 // skip class-overload: Log → MkObjectLog
928 { "::MkErrorC::Println" , NS(MkErrorC_Println) },
929 { "::MkErrorC::Raise" , NS(MkErrorC_Raise) },
930 { "::MkErrorC::Reset" , NS(MkErrorC_Reset) },
931 { "::MkErrorC::SetABORT" , NS(MkErrorC_SetABORT) },
932 { "::MkErrorC::SetC" , NS(MkErrorC_SetC) },
933 { "::MkErrorC::SetCONTINUE" , NS(MkErrorC_SetCONTINUE) },
934 { "::MkErrorC::SetCode" , NS(MkErrorC_SetCode) },
935 { "::MkErrorC::SetEXIT" , NS(MkErrorC_SetEXIT) },
936 { "::MkErrorC::SetSOCKET" , NS(MkErrorC_SetSOCKET) },
937 { "::MkErrorC::Stack" , NS(MkErrorC_Stack) },
938 { "::MkErrorC::StackFormat" , NS(MkErrorC_StackFormat) },
939 // skip class-overload: ToString → MkObjectToString
940
941 // END-OBJ - created by 'atl_MqS.tcl -i NHI1_HOME/theKernel/c/gen/c_mkkernel.meta' - DO NOT change
942 { NULL }
943};
944
950
951// script2code.atl MkErrorC_atl MkErrorC.atl
952// #include "MkErrorC.h"
953
959
960int NS(pMkErrorC_Init) ( OT_MK_ARGS OT_NS_T ns )
961{
963
964 MkErrorDefaultC_TT->selfCreate = NS(MkErrorC_selfCreate);
965 MkErrorDefaultC_TT->selfDelete = NS(MkErrorC_selfDelete);
966 MkErrorDefaultC_TT->selfUnlink = NS(MkErrorC_selfUnlink);
967
968 return TCL_OK;
969error:
970 return TCL_ERROR;
971}
#define OtClass_ARGS
#define OT_CHECK_bool(val)
#define MK(n)
#define AtomMake(...)
#define OT_SETUP_VARARGS(min, max, d)
#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
#define OT_CHECK_NI4(val)
MOX_NS_T OT_NS_T
#define OT_retObj_SET_Error
#define OT_GET_CALL_LINE
#define OT_FRAME_CLEANUP
#define OT_ERROR_CONSTRUCTOR(class)
#define OT_retObj_SET_LONG(nat)
#define OT_CHECK_REQUIRED(val)
#define OT_retObj_SET_None
#define OT_retObj_SET_I32(nat)
MOX_OBJ_T OT_SELF_T
#define OT_GET_CALL_FILE
#define NS(n)
#define OT_CHECK_ENUM(ename, val)
#define OT_retObj_RETURN
#define OT_GET_CALL_PROC
#define OT_MK_CALL
#define OT_MK_ARGS
#define OT_retObj_SET_STR(nat)
#define SETUP_amkrt(r)
#define OT_NEW_Mk_enum_OBJ(typ, val)
#define OT_CHECK_OPTIONAL(val)
#define OT_retObj_SET_ERR(nat)
#define MkErrorC_ARGS
#define OT_retObj_SET(val)
#define OT_CHECK_NOARGS
#define MkErrorC_Check(mng, PROC)
#define OT_ProcRet
#define OT_CHECK_STRN(val)
tag: nhi1-release-250425
#define Instances_doc
#define SetSOCKET_doc
#define Stack_doc
#define StackFormat_doc
#define PanicDEFAULT_doc
#define GetText_doc
#define DEFAULT_doc
#define Reset_doc
#define IsABORT_doc
#define Raise_doc
#define OT_SETUP_hdl
#define SetEXIT_doc
#define NoRaise_doc
#define SetC_doc
#define Dup_doc
#define Catch_doc
#define IsSOCKET_doc
#define GetNull_doc
#define SetABORT_doc
#define Next_doc
#define GetSize_doc
#define SetCode_doc
#define GetCode_doc
#define HandleResolve_doc
#define Prev_doc
#define OT_CLASS
#define Println_doc
#define OT_SETUP_hdl_static
#define MkErrorCatchTmpl(...)
#define IsEXIT_doc
#define GetNum_doc
#define IGNORE_doc
#define IsTIMEOUT_doc
#define OT_SETUP_hdl__null_allow
#define FORMAT_doc
#define Cleanup_doc
#define SetCONTINUE_doc
#define PanicC_doc
#define PRINT_doc
#define AppendC_doc
#define ClassInit
#define Copy_doc
static MK_ERR MkErrorNext(MK_ERR const err)
get next instance from linked-list of MkErrorS type
#define MkErrorHandleResolve(...)
static MK_ERR MkErrorGetNull(void)
Null-Slot - return a MkErrorC typed NULL instance …
static MK_ERR MkErrorPrev(MK_ERR const err)
get previous instance from linked-list of MkErrorS type
#define MkErrorInstances()
#define MkErrorGetSizeI(e)
get the error-message-size from the exception-object …
#define MkErrorGetCodeI(e)
get the value of MkErrorS::code …
#define MkErrorGetTextI(e)
get the MkErrorS::text …
#define MkErrorGetNumI(e)
get the MkErrorS::num. The number can be used as exit-code …
#define MkErrorStackFormat(...)
#define MkErrorPrintln(...)
#define MkErrorCleanup(...)
#define MkErrorStack(...)
#define MkErrorReset(...)
#define MkErrorSetC(...)
#define MkPanicDEFAULT(...)
#define MkErrorRaise(...)
#define MkPanicC(...)
#define MkErrorAppendC(...)
#define MkErrorNoRaise(...)
bool MkErrorIsSOCKET(MK_ERRN const err)
check on SOCKET-DOWN error …
bool MkErrorIsABORT(MK_ERRN const err)
check on ABORT signal …
bool MkErrorIsEXIT(MK_ERR const err)
check on APPLICATION-EXIT error …
#define MkErrorSetCONTINUE(...)
bool MkErrorIsTIMEOUT(MK_ERRN const err)
check on TIMEOUT error …
#define MkErrorSetCode(...)
#define MkErrorSetEXIT(...)
#define MkErrorSetSOCKET(...)
#define MkErrorSetABORT(...)
#define MkErrorIGNORE()
#define MkErrorDEFAULT()
#define MkErrorPRINT()
MK_ERR MkErrorFORMAT(MK_OBJN fmtobj)
system-error-format - format and return the default-error …
#define MkErrorCopy(...)
#define MkErrorDup(...)
#define MkErrorDefaultC_TT
class as MkTypeS-class-type, useable in a class-macro as: class##_TT …
#define MK_NULL_NO
flag, not allow NULL
#define MK_NULL_YES
flag, allow NULL
#define MK_UNUSED
mark unnused variables and functions
#define MK_DEPRECATED
MkErrorE
collection for the different error-codes …
MK_PTRB * MK_PTR
generic pointer data-type
const MK_STRB * MK_STRN
constant string pointer data-type
MK_PTRB const * MK_EXP
exception object pointer
bool MK_BOOL
real bool data-type
int32_t MK_HDL
4 byte int handle data-type
signed int MK_I32
4 byte integer data-type
static bool MkSysStringIsNULL(MK_STRN str)
test if string is NULL or EMPTY …
#define MK_RT_ARGS
#define OT_CHECK_ERRN(val, nullB)
#define OT_CHECK_OBJN(val, nullB)
#define OT_CHECK_EXP(val)
The data-type to store and handle the error-condition …
object header …