theSq3Lite 10.0 NHI1 - theKernel - theLink - theConfig - theSq3Lite - theCompiler - theBrain - theGuard - theLib - theATL
c - tcl - atl - cs - py - rb - jv - cc
Loading...
Searching...
No Matches
mk_misc_check_lng.h File Reference

mk_misc_check_lng.h - 21 Feb 2025 - aotto1968 More...

+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define OT_CHECK_LNG_T(val)
 
#define OT_CHECK_EXP(val)
 
#define OT_CHECK_MXC(val)
 
#define OT_CHECK_MK_OBJECT_C(val, nullB)
 
#define OT_CHECK_OBJ(val, nullB)
 
#define OT_CHECK_OBJN(val, nullB)
 
#define OT_CHECK_MNG(val)
 
#define OT_CHECK_ERC(val, nullB)
 
#define OT_CHECK_CLASS(val, classType, type, nullB)
 
#define OT_CHECK_BUF(val, nullB)
 
#define OT_CHECK_BUS(val, nullB)
 
#define OT_CHECK_ERR(val, nullB)
 
#define OT_CHECK_LFL(val, nullB)
 
#define OT_CHECK_RT(val, nullB)
 
#define OT_CHECK_BUFN(val, nullB)
 
#define OT_CHECK_BUSN(val, nullB)
 
#define OT_CHECK_ERRN(val, nullB)
 
#define OT_CHECK_LFLN(val, nullB)
 
#define OT_CHECK_RTN(val, nullB)
 
#define OT_CHECK_BAC(val)
 
#define OT_CHECK_BFL(val, nullB)
 
#define OT_CHECK_BFLN(val, nullB)
 
#define OT_CHECK_ENUM(ename, val)
 
#define OT_CHECK_ENUM_FLAG(ename, val)
 
#define OT_CHECK_TIME_T(val)
 
#define OT_SETUP_CALLABLE(val)
 
#define OT_SETUP_CALLABLE_ONCE(val)
 
#define OT_CLEANUP_CALLABLE(val)
 
#define OT_CLEANUP_CALLABLE_ONCE(val)
 
#define OT_CHECK_CALLABLE(val)
 
#define MkCallFree(cb)
 
#define MkCallFreeOnce(cb)
 
#define NullNotAllowd(_cls)
 
#define WrongTypeOfArgError(exp, got)
 
#define WrongCallableError(got)
 
#define SignaturError(str)
 
#define InternalError(str)
 
#define OT_LNG_OBJ_CLASS_IS_4(val, cls, objP, flagP)
 
#define OT_LNG_OBJECT_IS_3(objV, obj, flag)
 

Typedefs

typedef enum MkTestClassE MkTestClassE
 

Enumerations

enum  MkTestClassE {
  MkTestClassE_OK = 0 , MkTestClassE_NULL , MkTestClassE_INVALID_SIGNATURE , MkTestClassE_NONE_OBJECT ,
  MkTestClassE_WRONG_CLASS , MkTestClassE_INTERNAL
}
 

Functions

MK_EXTERN enum MkErrorE MK_DECL MK Check_MkObjectC (OT_Check_ARGS, MK_MNG *, bool)
 
MK_EXTERN enum MkErrorE MK_DECL MK CheckClass (OT_CLS_T, MK_TYP, OT_Check_ARGS, MK_MNG *, bool)
 
MK_EXTERN enum MkErrorE MK_DECL MK CheckBAC (OT_Check_ARGS, MK_BFL *, bool)
 
MK_EXTERN enum MkErrorE MK_DECL MK CheckBLC (OT_Check_ARGS, MK_BFL *, bool)
 
MK_EXTERN enum MkErrorE MK_DECL MK CheckEnum (OT_ENUM_T classType, OT_Check_ARGS, int *)
 
MK_EXTERN enum MkErrorE MK_DECL MK CheckEnumFlag (OT_ENUM_T classType, OT_Check_ARGS, int *)
 
MK_EXTERN enum MkErrorE MK_DECL MK CheckTimeT (OT_Check_ARGS, MK_TIME_T *)
 
MK_EXTERN enum MkErrorE MK_DECL MK CheckCallable (OT_Check_ARGS, MK_CBP *)
 
bool MK TestObject (OT_Prefix_ARGS OT_OBJ_T lngO, OT_CLS_T typeO, MK_OBJ *objP, MkTestClassE *flagP)
 

Detailed Description

mk_misc_check_lng.h - 21 Feb 2025 - aotto1968

Version
6c856cfe190dde1f058bd41b5f7213dd3e8c2fda
Date
Fri Feb 21 12:27:05 2025 +0100
Author
aotto1968 aotto.nosp@m.1968.nosp@m.@t-on.nosp@m.line.nosp@m..de

Definition in file mk_misc_check_lng.h.

Macro Definition Documentation

◆ InternalError

#define InternalError ( str)
Value:
do { \
MkErrorVD("InternalError", "%s", str); \
goto error; \
} while (0)

Definition at line 145 of file mk_misc_check_lng.h.

145#define InternalError(str) do { \
146 MkErrorVD("InternalError", "%s", str); \
147 goto error; \
148 } while (0)

◆ MkCallFree

#define MkCallFree ( cb)
Value:
if (cb) MK(CallFree)(&(cb))
#define MK(n)

Definition at line 121 of file mk_misc_check_lng.h.

◆ MkCallFreeOnce

#define MkCallFreeOnce ( cb)
Value:
if (cb) MK(CallFreeOnce)(&(cb))

Definition at line 122 of file mk_misc_check_lng.h.

◆ NullNotAllowd

#define NullNotAllowd ( _cls)
Value:
do { \
MkErrorVD("NullNotAllowedError", "'%s' hdl is NULL", OT_LNG_NAME_FROM_CLASS(_cls) ); \
goto error; \
} while (0)
#define OT_LNG_NAME_FROM_CLASS(cls)

Definition at line 125 of file mk_misc_check_lng.h.

125#define NullNotAllowd(_cls) do { \
126 MkErrorVD("NullNotAllowedError", "'%s' hdl is NULL", OT_LNG_NAME_FROM_CLASS(_cls) ); \
127 goto error; \
128 } while (0)

◆ OT_CHECK_BAC

#define OT_CHECK_BAC ( val)
Value:
#define OT_Check_CALL(arg)
#define MkErrorC_CheckD(PROC)
MK_EXTERN enum MkErrorE MK_DECL MK CheckBAC(OT_Check_ARGS, MK_BFL *, bool)

Definition at line 80 of file mk_misc_check_lng.h.

80#define OT_CHECK_BAC(val) \
81 MkErrorC_CheckD(MK(CheckBAC(OT_Check_CALL(#val),&val,true)));

◆ OT_CHECK_BFL

#define OT_CHECK_BFL ( val,
nullB )
Value:
MkErrorC_CheckD(MK(CheckBLC) (OT_Check_CALL(#val), &val, nullB));
MK_EXTERN enum MkErrorE MK_DECL MK CheckBLC(OT_Check_ARGS, MK_BFL *, bool)

Definition at line 84 of file mk_misc_check_lng.h.

84#define OT_CHECK_BFL(val,nullB) \
85 MkErrorC_CheckD(MK(CheckBLC) (OT_Check_CALL(#val), &val, nullB));

◆ OT_CHECK_BFLN

#define OT_CHECK_BFLN ( val,
nullB )
Value:
MkErrorC_CheckD(MK(CheckBLC) (OT_Check_CALL(#val), &val, nullB));

Definition at line 86 of file mk_misc_check_lng.h.

86#define OT_CHECK_BFLN(val,nullB) \
87 MkErrorC_CheckD(MK(CheckBLC) (OT_Check_CALL(#val), &val, nullB));

◆ OT_CHECK_BUF

#define OT_CHECK_BUF ( val,
nullB )
Value:
#define OT_OBJ_TO_CLASS(str)
#define MkBufferC_lngO
#define MkBufferC_TT
#define OT_CHECK_CLASS(val, classType, type, nullB)

Definition at line 67 of file mk_misc_check_lng.h.

◆ OT_CHECK_BUFN

#define OT_CHECK_BUFN ( val,
nullB )
Value:

Definition at line 73 of file mk_misc_check_lng.h.

◆ OT_CHECK_BUS

#define OT_CHECK_BUS ( val,
nullB )
Value:
#define MkBufferStreamC_lngO
#define MkBufferStreamC_TT

Definition at line 68 of file mk_misc_check_lng.h.

◆ OT_CHECK_BUSN

#define OT_CHECK_BUSN ( val,
nullB )

◆ OT_CHECK_CALLABLE

#define OT_CHECK_CALLABLE ( val)
Value:
MK_EXTERN enum MkErrorE MK_DECL MK CheckCallable(OT_Check_ARGS, MK_CBP *)

Definition at line 120 of file mk_misc_check_lng.h.

◆ OT_CHECK_CLASS

#define OT_CHECK_CLASS ( val,
classType,
type,
nullB )
Value:
MkErrorC_CheckD(MK(CheckClass) (classType, type, OT_Check_CALL(#val), (MK_PTR*)&val, nullB));
MK_PTRB * MK_PTR
MK_EXTERN enum MkErrorE MK_DECL MK CheckClass(OT_CLS_T, MK_TYP, OT_Check_ARGS, MK_MNG *, bool)

Definition at line 64 of file mk_misc_check_lng.h.

64#define OT_CHECK_CLASS(val,classType,type,nullB) \
65 MkErrorC_CheckD(MK(CheckClass) (classType, type, OT_Check_CALL(#val), (MK_PTR*)&val, nullB));

◆ OT_CHECK_ENUM

#define OT_CHECK_ENUM ( ename,
val )
Value:
{ \
MK_I32 i; \
MkErrorC_CheckD(MK(CheckEnum)(OT_OBJ_TO_ENUM(ename),OT_Check_CALL(#val),&i)); \
MkErrorC_CheckD(ename##_FromInt(i,&val)); \
};
#define OT_OBJ_TO_ENUM(str)
signed int MK_I32
MK_EXTERN enum MkErrorE MK_DECL MK CheckEnum(OT_ENUM_T classType, OT_Check_ARGS, int *)

Definition at line 91 of file mk_misc_check_lng.h.

91 #define OT_CHECK_ENUM(ename,val) { \
92 MK_I32 i; \
93 MkErrorC_CheckD(MK(CheckEnum)(OT_OBJ_TO_ENUM(ename),OT_Check_CALL(#val),&i)); \
94 MkErrorC_CheckD(ename##_FromInt(i,&val)); \
95 };

◆ OT_CHECK_ENUM_FLAG

#define OT_CHECK_ENUM_FLAG ( ename,
val )
Value:
{ \
MK_I32 i; \
MkErrorC_CheckD(MK(CheckEnumFlag)(OT_OBJ_TO_ENUM(ename),OT_Check_CALL(#val),&i)); \
val = (enum ename) i; \
};
MK_EXTERN enum MkErrorE MK_DECL MK CheckEnumFlag(OT_ENUM_T classType, OT_Check_ARGS, int *)

Definition at line 100 of file mk_misc_check_lng.h.

100 #define OT_CHECK_ENUM_FLAG(ename,val) { \
101 MK_I32 i; \
102 MkErrorC_CheckD(MK(CheckEnumFlag)(OT_OBJ_TO_ENUM(ename),OT_Check_CALL(#val),&i)); \
103 val = (enum ename) i; \
104 };

◆ OT_CHECK_ERC

#define OT_CHECK_ERC ( val,
nullB )
Value:
#define OT_CHECK_MK_OBJECT_C(val, nullB)

Definition at line 61 of file mk_misc_check_lng.h.

◆ OT_CHECK_ERR

#define OT_CHECK_ERR ( val,
nullB )
Value:
#define MkErrorC_lngO
#define MkErrorC_TT

Definition at line 69 of file mk_misc_check_lng.h.

◆ OT_CHECK_ERRN

#define OT_CHECK_ERRN ( val,
nullB )
Value:

Definition at line 75 of file mk_misc_check_lng.h.

◆ OT_CHECK_EXP

#define OT_CHECK_EXP ( val)
Value:
#define OT_CHECK_LNG_T(val)

Definition at line 50 of file mk_misc_check_lng.h.

◆ OT_CHECK_LFL

#define OT_CHECK_LFL ( val,
nullB )
Value:
#define MkLogFileC_lngO
#define MkLogFileC_TT

Definition at line 70 of file mk_misc_check_lng.h.

◆ OT_CHECK_LFLN

#define OT_CHECK_LFLN ( val,
nullB )
Value:

Definition at line 76 of file mk_misc_check_lng.h.

◆ OT_CHECK_LNG_T

#define OT_CHECK_LNG_T ( val)
Value:
if (__skip >= objc) { \
MkErrorC_CheckD(WrongNumArgs(hdl,__skip, objc, -999, +999, #val)); \
} else { \
val = (typeof(val)) OT_LNG_OBJV(__skip++); \
}
#define OT_LNG_OBJV(idx)
#define WrongNumArgs(...)

Definition at line 43 of file mk_misc_check_lng.h.

43#define OT_CHECK_LNG_T(val) \
44 if (__skip >= objc) { \
45 MkErrorC_CheckD(WrongNumArgs(hdl,__skip, objc, -999, +999, #val)); \
46 } else { \
47 val = (typeof(val)) OT_LNG_OBJV(__skip++); \
48 }

◆ OT_CHECK_MK_OBJECT_C

#define OT_CHECK_MK_OBJECT_C ( val,
nullB )
Value:
MK_EXTERN enum MkErrorE MK_DECL MK Check_MkObjectC(OT_Check_ARGS, MK_MNG *, bool)

Definition at line 55 of file mk_misc_check_lng.h.

55#define OT_CHECK_MK_OBJECT_C(val,nullB) \
56 MkErrorC_CheckD(MK(Check_MkObjectC) (OT_Check_CALL(#val), (MK_PTR*)&val, nullB));

◆ OT_CHECK_MNG

#define OT_CHECK_MNG ( val)
Value:

Definition at line 60 of file mk_misc_check_lng.h.

◆ OT_CHECK_MXC

#define OT_CHECK_MXC ( val)
Value:

Definition at line 51 of file mk_misc_check_lng.h.

◆ OT_CHECK_OBJ

#define OT_CHECK_OBJ ( val,
nullB )
Value:

Definition at line 58 of file mk_misc_check_lng.h.

◆ OT_CHECK_OBJN

#define OT_CHECK_OBJN ( val,
nullB )
Value:

Definition at line 59 of file mk_misc_check_lng.h.

◆ OT_CHECK_RT

#define OT_CHECK_RT ( val,
nullB )
Value:
#define MkRuntimeC_lngO
#define MkRuntimeC_TT

Definition at line 71 of file mk_misc_check_lng.h.

◆ OT_CHECK_RTN

#define OT_CHECK_RTN ( val,
nullB )
Value:

Definition at line 77 of file mk_misc_check_lng.h.

◆ OT_CHECK_TIME_T

#define OT_CHECK_TIME_T ( val)
Value:
MK_EXTERN enum MkErrorE MK_DECL MK CheckTimeT(OT_Check_ARGS, MK_TIME_T *)

Definition at line 109 of file mk_misc_check_lng.h.

109 #define OT_CHECK_TIME_T(val) \
110 MkErrorC_CheckD(MK(CheckTimeT)(OT_Check_CALL(#val),&val));

◆ OT_CLEANUP_CALLABLE

#define OT_CLEANUP_CALLABLE ( val)

Definition at line 117 of file mk_misc_check_lng.h.

◆ OT_CLEANUP_CALLABLE_ONCE

#define OT_CLEANUP_CALLABLE_ONCE ( val)
Value:
#define MkCallFreeOnce(cb)

Definition at line 119 of file mk_misc_check_lng.h.

◆ OT_LNG_OBJ_CLASS_IS_4

#define OT_LNG_OBJ_CLASS_IS_4 ( val,
cls,
objP,
flagP )
Value:
MK(TestObject)( OT_Prefix_CALL val,cls,objP,flagP)
#define OT_Prefix_CALL
bool MK TestObject(OT_Prefix_ARGS OT_OBJ_T lngO, OT_CLS_T typeO, MK_OBJ *objP, MkTestClassE *flagP)

Definition at line 161 of file mk_misc_check_lng.h.

◆ OT_LNG_OBJECT_IS_3

#define OT_LNG_OBJECT_IS_3 ( objV,
obj,
flag )
Value:
#define MkObjectC_lngO

Definition at line 162 of file mk_misc_check_lng.h.

◆ OT_SETUP_CALLABLE

#define OT_SETUP_CALLABLE ( val)
Value:
MK_CBP val = 0;
MK_PTRB * MK_CBP

Definition at line 115 of file mk_misc_check_lng.h.

◆ OT_SETUP_CALLABLE_ONCE

#define OT_SETUP_CALLABLE_ONCE ( val)
Value:
struct MkCallS val ## _ref = {0}; MK_CBP val = &val ## _ref;

Definition at line 116 of file mk_misc_check_lng.h.

◆ SignaturError

#define SignaturError ( str)
Value:
do { \
MkErrorVD("SignaturError", "%s", str); \
goto error; \
} while (0)

Definition at line 140 of file mk_misc_check_lng.h.

140#define SignaturError(str) do { \
141 MkErrorVD("SignaturError", "%s", str); \
142 goto error; \
143 } while (0)

◆ WrongCallableError

#define WrongCallableError ( got)
Value:
do { \
MkErrorVD("WrongTypeOfArgError", "for argument '%s'...expect type 'Callable'...but got '%s'", arg, got ); \
goto error; \
} while (0)

Definition at line 135 of file mk_misc_check_lng.h.

135#define WrongCallableError(got) do { \
136 MkErrorVD("WrongTypeOfArgError", "for argument '%s'...expect type 'Callable'...but got '%s'", arg, got ); \
137 goto error; \
138 } while (0)

◆ WrongTypeOfArgError

#define WrongTypeOfArgError ( exp,
got )
Value:
do { \
MkErrorVD("WrongTypeOfArgError", "for argument '%s'...expect type '%s'...but got '%s'", arg, exp, got ); \
goto error; \
} while (0)

Definition at line 130 of file mk_misc_check_lng.h.

130#define WrongTypeOfArgError(exp,got) do { \
131 MkErrorVD("WrongTypeOfArgError", "for argument '%s'...expect type '%s'...but got '%s'", arg, exp, got ); \
132 goto error; \
133 } while (0)

Typedef Documentation

◆ MkTestClassE

typedef enum MkTestClassE MkTestClassE

Enumeration Type Documentation

◆ MkTestClassE

Enumerator
MkTestClassE_OK 
MkTestClassE_NULL  
MkTestClassE_INVALID_SIGNATURE  
MkTestClassE_NONE_OBJECT  
MkTestClassE_WRONG_CLASS  
MkTestClassE_INTERNAL  

Definition at line 150 of file mk_misc_check_lng.h.

150 {
151 MkTestClassE_OK = 0 ,
@ MkTestClassE_NONE_OBJECT
@ MkTestClassE_INTERNAL
@ MkTestClassE_OK
@ MkTestClassE_INVALID_SIGNATURE
@ MkTestClassE_NULL
@ MkTestClassE_WRONG_CLASS

Function Documentation

◆ Check_MkObjectC()

MK_EXTERN enum MkErrorE MK_DECL MK Check_MkObjectC ( OT_Check_ARGS ,
MK_MNG * ,
bool  )

◆ CheckBAC()

MK_EXTERN enum MkErrorE MK_DECL MK CheckBAC ( OT_Check_ARGS ,
MK_BFL * ,
bool  )

◆ CheckBLC()

MK_EXTERN enum MkErrorE MK_DECL MK CheckBLC ( OT_Check_ARGS ,
MK_BFL * ,
bool  )

◆ CheckCallable()

MK_EXTERN enum MkErrorE MK_DECL MK CheckCallable ( OT_Check_ARGS ,
MK_CBP *  )

◆ CheckClass()

MK_EXTERN enum MkErrorE MK_DECL MK CheckClass ( OT_CLS_T ,
MK_TYP ,
OT_Check_ARGS ,
MK_MNG * ,
bool  )

◆ CheckEnum()

MK_EXTERN enum MkErrorE MK_DECL MK CheckEnum ( OT_ENUM_T classType,
OT_Check_ARGS ,
int *  )

◆ CheckEnumFlag()

MK_EXTERN enum MkErrorE MK_DECL MK CheckEnumFlag ( OT_ENUM_T classType,
OT_Check_ARGS ,
int *  )

◆ CheckTimeT()

MK_EXTERN enum MkErrorE MK_DECL MK CheckTimeT ( OT_Check_ARGS ,
MK_TIME_T *  )

◆ TestObject()

bool MK TestObject ( OT_Prefix_ARGS OT_OBJ_T lngO,
OT_CLS_T typeO,
MK_OBJ * objP,
MkTestClassE * flagP )