theKernel 10.0
Loading...
Searching...
No Matches
MkErrorC_Class_Define_C_API

MkErrorC - low level definition, access and cast … More...

+ Collaboration diagram for MkErrorC_Class_Define_C_API:

MkErrorC - type definition

typedef struct MkErrorS MkErrorCR
 instance-struct-reference same as struct MkErrorS, useable in a class-macro as: class##R
 
typedef const struct MkErrorS MkErrorCNR
 const instance-struct-reference same as const struct MkErrorS, useable in a class-macro as: class##R
 
#define MkErrorC_T   (&MK_RT_REF._MkErrorC_T)
 class as MkTypeDefS-class-type, useable in a class-macro as: class##_T
 
#define MkErrorC_TT   (MkTYP(MkErrorC_T))
 class as MkTypeS-class-type, useable in a class-macro as: class##_TT
 
#define MkErrorST   MkErrorC_T
 instance-type as MkTypeDefS-class-type …
 
#define MkErrorSTT   (MkTYP(MkErrorST))
 instance-type as MkTypeS-class-type (cast from MkErrorST into MkTypeS) …
 
#define MkErrorC_type   MK_ERR
 same as MkErrorS but useable in a class-macro as: class##_type
 
#define MkErrorCT_X(instance)
 cast from an instance into the MkTypeDefS-class-type …
 
#define MkErrorCTT_X(instance)
 cast from an instance into the MkTypeS-class-type …
 
#define MkErrorCT_TT(typ)
 cast from an MkTypeS-class-type into an MkTypeDefS-class-type …
 
#define MkErrorC_NS   MK
 map class to namespace …
 
#define MkErrorCTT   MkErrorCTT
 class as MkTypeS-class-type for MkErrorC in the Target-Programming-Language (TPL)
 
#define MkErrorCT   ( (struct MkTypeDefS *) MkErrorCTT )
 class as MkTypeDefS-class-type for MkErrorC in the Target-Programming-Language (TPL)
 

MkErrorC - signature check

static bool MkErrCheck (MK_MNGN mng)
 check MkErrorS -> MkObjectS::signature
 
static bool MkErrCheckO (MK_OBJN obj)
 check MkErrorS -> MkObjectS::signature
 

MkErrorC - cast from a defined or a undefined instance

static MK_ERR MkErr (MK_MNG mng)
 cast a unknown-object into an MkErrorS pointer or NULL if not possible
 
static MK_ERRN MkErrN (MK_MNGN mng)
 (const) cast a unknown-object into an MkErrorS pointer or NULL if not possible
 
#define MkErrRaise(_err)
 raise an error if class-instance is not valid
 
#define MkERR_R(x)
 cast a known-object into an MkErrorS reference
 
#define MkERR(x)
 cast a known-object into an MkErrorS pointer
 

MkErrorC - MkErrorC_Class_Define_C_API - function

MK_ERR MkErrP (MK_MNG mng)
 Non-inline replacement for MkErr
 
MK_BOOL MkErrCheckP (MK_MNGN mng)
 Non-inline replacement for MkErrCheck
 
MK_BOOL MkErrCheckOP (MK_OBJN obj)
 Non-inline replacement for MkErrCheckO
 
MK_ERRN MkErrNP (MK_MNGN mng)
 Non-inline replacement for MkErrN
 

MkErrorC - signature define

#define MkErrorC_SIGNATURE   (MkObjectC_SIGNATURE ^ (4u<<10))
 
#define MkErrorC_MASK   (((1u<<22)-1)<<10)
 

MkErrorC - cast to superclass

#define MkErrorC_X2err(x)
 
#define MkErrorC_X2obj(x)
 

Detailed Description

MkErrorC - low level definition, access and cast …

Macro Definition Documentation

◆ MkERR

#define MkERR ( x)
Value:
(&MkERR_R(x))
#define MkERR_R(x)
cast a known-object into an MkErrorS reference

cast a known-object into an MkErrorS pointer

Definition at line 9846 of file LibMkKernel_mk.h.

◆ MkERR_R

#define MkERR_R ( x)
Value:
(*(x)).super.err

cast a known-object into an MkErrorS reference

Definition at line 9844 of file LibMkKernel_mk.h.

◆ MkErrorC_MASK

#define MkErrorC_MASK   (((1u<<22)-1)<<10)

Definition at line 9744 of file LibMkKernel_mk.h.

◆ MkErrorC_NS

#define MkErrorC_NS   MK

map class to namespace …

Definition at line 9782 of file LibMkKernel_mk.h.

◆ MkErrorC_SIGNATURE

#define MkErrorC_SIGNATURE   (MkObjectC_SIGNATURE ^ (4u<<10))

Definition at line 9743 of file LibMkKernel_mk.h.

◆ MkErrorC_T

#define MkErrorC_T   (&MK_RT_REF._MkErrorC_T)

class as MkTypeDefS-class-type, useable in a class-macro as: class##_T

Definition at line 9766 of file LibMkKernel_mk.h.

◆ MkErrorC_TT

#define MkErrorC_TT   (MkTYP(MkErrorC_T))

class as MkTypeS-class-type, useable in a class-macro as: class##_TT

Definition at line 9768 of file LibMkKernel_mk.h.

◆ MkErrorC_type

#define MkErrorC_type   MK_ERR

same as MkErrorS but useable in a class-macro as: class##_type

Definition at line 9774 of file LibMkKernel_mk.h.

◆ MkErrorC_X2err

#define MkErrorC_X2err ( x)
Value:
(x)

Definition at line 9752 of file LibMkKernel_mk.h.

◆ MkErrorC_X2obj

#define MkErrorC_X2obj ( x)
Value:
#define MkOBJ(x)
cast a known-object into an MkObjectS pointer

Definition at line 9753 of file LibMkKernel_mk.h.

◆ MkErrorCT

#define MkErrorCT   ( (struct MkTypeDefS *) MkErrorCTT )

class as MkTypeDefS-class-type for MkErrorC in the Target-Programming-Language (TPL)

Definition at line 9786 of file LibMkKernel_mk.h.

◆ MkErrorCT_TT

#define MkErrorCT_TT ( typ)
Value:
( (struct MkTypeDefS *) (typ) )
super-class-base, the MkTypeS using the super-macro-syntax for all non specific types …
struct MkTypeS typ

cast from an MkTypeS-class-type into an MkTypeDefS-class-type …

Definition at line 9780 of file LibMkKernel_mk.h.

◆ MkErrorCT_X

#define MkErrorCT_X ( instance)
Value:
( (struct MkTypeDefS *) (MkOBJ_R(instance).type) )
#define MkOBJ_R(x)
cast a known-object into an MkObjectS reference

cast from an instance into the MkTypeDefS-class-type …

Definition at line 9776 of file LibMkKernel_mk.h.

◆ MkErrorCTT

#define MkErrorCTT   MkErrorCTT

class as MkTypeS-class-type for MkErrorC in the Target-Programming-Language (TPL)

Definition at line 9784 of file LibMkKernel_mk.h.

◆ MkErrorCTT_X

#define MkErrorCTT_X ( instance)
Value:
(MkOBJ_R(instance).type)

cast from an instance into the MkTypeS-class-type …

Definition at line 9778 of file LibMkKernel_mk.h.

◆ MkErrorST

#define MkErrorST   MkErrorC_T

instance-type as MkTypeDefS-class-type …

Definition at line 9770 of file LibMkKernel_mk.h.

◆ MkErrorSTT

#define MkErrorSTT   (MkTYP(MkErrorST))

instance-type as MkTypeS-class-type (cast from MkErrorST into MkTypeS) …

Definition at line 9772 of file LibMkKernel_mk.h.

◆ MkErrRaise

#define MkErrRaise ( _err)
Value:
if (!_MkCheckX(MkErrorC,_err)) { \
MkErrorSetC_1E("'MkErrorC' hdl is NULL"); \
goto error ; \
}
#define _MkCheckX(cls, x)

raise an error if class-instance is not valid

Definition at line 9838 of file LibMkKernel_mk.h.

9838 #define MkErrRaise(_err) if (!_MkCheckX(MkErrorC,_err)) { \
9839 MkErrorSetC_1E("'MkErrorC' hdl is NULL"); \
9840 goto error ; \
9841 }

Typedef Documentation

◆ MkErrorCNR

typedef const struct MkErrorS MkErrorCNR

const instance-struct-reference same as const struct MkErrorS, useable in a class-macro as: class##R

Definition at line 9764 of file LibMkKernel_mk.h.

◆ MkErrorCR

typedef struct MkErrorS MkErrorCR

instance-struct-reference same as struct MkErrorS, useable in a class-macro as: class##R

Definition at line 9762 of file LibMkKernel_mk.h.

Function Documentation

◆ MkErr()

static MK_ERR MkErr ( MK_MNG mng)
inlinestatic

cast a unknown-object into an MkErrorS pointer or NULL if not possible

Definition at line 9825 of file LibMkKernel_mk.h.

9825 {
9826 return (MkErrCheck(mng) ? (MK_ERR)mng : NULL);
9827 }
static bool MkErrCheck(MK_MNGN mng)
check MkErrorS -> MkObjectS::signature …
The data-type to store and handle the error-condition …
+ Here is the caller graph for this function:

◆ MkErrCheck()

static bool MkErrCheck ( MK_MNGN mng)
inlinestatic

check MkErrorS -> MkObjectS::signature

Returns
TRUE on valid err and FALSE an invalid err

Definition at line 9801 of file LibMkKernel_mk.h.

9801 {
9802 return MkSanitizeCheck(MkErrorC,mng);
9803 }
#define MkSanitizeCheck(_root, _m)
+ Here is the caller graph for this function:

◆ MkErrCheckO()

static bool MkErrCheckO ( MK_OBJN obj)
inlinestatic

check MkErrorS -> MkObjectS::signature

Returns
TRUE on valid err and FALSE an invalid err

Definition at line 9809 of file LibMkKernel_mk.h.

9809 {
9810 return MkSanitizeCheckO(MkErrorC,obj);
9811 }
#define MkSanitizeCheckO(_root, _o)

◆ MkErrCheckOP()

MK_BOOL MkErrCheckOP ( MK_OBJN obj)

Non-inline replacement for MkErrCheckO

◆ MkErrCheckP()

MK_BOOL MkErrCheckP ( MK_MNGN mng)

Non-inline replacement for MkErrCheck

◆ MkErrN()

static MK_ERRN MkErrN ( MK_MNGN mng)
inlinestatic

(const) cast a unknown-object into an MkErrorS pointer or NULL if not possible

Definition at line 9833 of file LibMkKernel_mk.h.

9833 {
9834 return (MkErrCheck(mng) ? (MK_ERRN)mng : NULL);
9835 }

◆ MkErrNP()

MK_ERRN MkErrNP ( MK_MNGN mng)

Non-inline replacement for MkErrN

◆ MkErrP()

MK_ERR MkErrP ( MK_MNG mng)

Non-inline replacement for MkErr