theSq3Lite 10.0
Loading...
Searching...
No Matches
mk_misc_check_lng.h File Reference

tag: nhi1-release-250425 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

tag: nhi1-release-250425

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)
#define str(s)

Definition at line 142 of file mk_misc_check_lng.h.

142#define InternalError(str) do { \
143 MkErrorVD("InternalError", "%s", str); \
144 goto error; \
145 } while (0)

◆ MkCallFree

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

Definition at line 118 of file mk_misc_check_lng.h.

◆ MkCallFreeOnce

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

Definition at line 119 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 122 of file mk_misc_check_lng.h.

122#define NullNotAllowd(_cls) do { \
123 MkErrorVD("NullNotAllowedError", "'%s' hdl is NULL", OT_LNG_NAME_FROM_CLASS(_cls) ); \
124 goto error; \
125 } 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 77 of file mk_misc_check_lng.h.

77#define OT_CHECK_BAC(val) \
78 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 81 of file mk_misc_check_lng.h.

81#define OT_CHECK_BFL(val,nullB) \
82 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 83 of file mk_misc_check_lng.h.

83#define OT_CHECK_BFLN(val,nullB) \
84 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 64 of file mk_misc_check_lng.h.

◆ OT_CHECK_BUFN

#define OT_CHECK_BUFN ( val,
nullB )
Value:

Definition at line 70 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 65 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 117 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 61 of file mk_misc_check_lng.h.

61#define OT_CHECK_CLASS(val,classType,type,nullB) \
62 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 88 of file mk_misc_check_lng.h.

88 #define OT_CHECK_ENUM(ename,val) { \
89 MK_I32 i; \
90 MkErrorC_CheckD(MK(CheckEnum)(OT_OBJ_TO_ENUM(ename),OT_Check_CALL(#val),&i)); \
91 MkErrorC_CheckD(ename##_FromInt(i,&val)); \
92 };

◆ 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 97 of file mk_misc_check_lng.h.

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

◆ OT_CHECK_ERC

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

Definition at line 58 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 66 of file mk_misc_check_lng.h.

◆ OT_CHECK_ERRN

#define OT_CHECK_ERRN ( val,
nullB )
Value:

Definition at line 72 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 47 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 67 of file mk_misc_check_lng.h.

◆ OT_CHECK_LFLN

#define OT_CHECK_LFLN ( val,
nullB )
Value:

Definition at line 73 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(__skip)
#define WrongNumArgs(...)

Definition at line 40 of file mk_misc_check_lng.h.

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

◆ 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 52 of file mk_misc_check_lng.h.

52#define OT_CHECK_MK_OBJECT_C(val,nullB) \
53 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 57 of file mk_misc_check_lng.h.

◆ OT_CHECK_MXC

#define OT_CHECK_MXC ( val)
Value:

Definition at line 48 of file mk_misc_check_lng.h.

◆ OT_CHECK_OBJ

#define OT_CHECK_OBJ ( val,
nullB )
Value:

Definition at line 55 of file mk_misc_check_lng.h.

◆ OT_CHECK_OBJN

#define OT_CHECK_OBJN ( val,
nullB )
Value:

Definition at line 56 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 68 of file mk_misc_check_lng.h.

◆ OT_CHECK_RTN

#define OT_CHECK_RTN ( val,
nullB )
Value:

Definition at line 74 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 106 of file mk_misc_check_lng.h.

106 #define OT_CHECK_TIME_T(val) \
107 MkErrorC_CheckD(MK(CheckTimeT)(OT_Check_CALL(#val),&val));

◆ OT_CLEANUP_CALLABLE

#define OT_CLEANUP_CALLABLE ( val)

Definition at line 114 of file mk_misc_check_lng.h.

◆ OT_CLEANUP_CALLABLE_ONCE

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

Definition at line 116 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 158 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 159 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 112 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 113 of file mk_misc_check_lng.h.

◆ SignaturError

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

Definition at line 137 of file mk_misc_check_lng.h.

137#define SignaturError(str) do { \
138 MkErrorVD("SignaturError", "%s", str); \
139 goto error; \
140 } 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 132 of file mk_misc_check_lng.h.

132#define WrongCallableError(got) do { \
133 MkErrorVD("WrongTypeOfArgError", "for argument '%s'...expect type 'Callable'...but got '%s'", arg, got ); \
134 goto error; \
135 } 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 127 of file mk_misc_check_lng.h.

127#define WrongTypeOfArgError(exp,got) do { \
128 MkErrorVD("WrongTypeOfArgError", "for argument '%s'...expect type '%s'...but got '%s'", arg, exp, got ); \
129 goto error; \
130 } 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 147 of file mk_misc_check_lng.h.

147 {
148 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 )