MkObjectC - various functions related to the MkObjectS … More...
Macros | |
#define | MkObjectToName_1X(x) |
#define | MkObjectToNameOfType_1X(x) |
#define | MkObjectToNameOfClass_1X(x) |
#define | MkObjectToString_1X(x) |
#define | MkObjectToString_1M(m) |
#define | MkObjectToError_1X(obj) |
Functions | |
MK_EXTERN MK_STRN const | MkObjectToName_RT (MK_RT mkrt, MK_OBJN const obj) |
Info-Slot - returns brief information about the obj as a string | |
MK_EXTERN MK_STRN | MkObjectToNameOfType_RT (MK_RT mkrt, MK_OBJN const obj) |
Type-Slot - returns the LibMkKernel-Type-Name of the obj as a string | |
MK_EXTERN MK_STRN | MkObjectToNameOfClass_RT (MK_RT mkrt, MK_OBJ const obj) |
Class-Slot - returns the C-Class-Name of the obj as string | |
MK_EXTERN MK_STRN | MkObjectToString_RT (MK_RT mkrt, MK_OBJN const inst) |
String-Slot - returns the string representation of the inst … | |
bool | MkObjectIsNull (MK_OBJ const obj) |
ckeck if the object is MK_NULL | |
MK_EXTERN MK_ERR | MkObjectErrorCatch_RT (MK_RT mkrt, MK_OBJN const obj, MK_EXP const exception, MK_STRN const callfunc) |
convert a programming-language-error into an libmkkernel error … | |
MK_ERR | MkObjectToError_RT (MK_RT mkrt, MK_OBJ const obj) |
Error-Slot - return an error-object pre initialized with obj data. | |
MkObjectC - MkObjectC_Misc_C_API - function | |
MK_EXTERN MK_ERR | MkObjectToErrorP (MK_RT mkrt, MK_OBJ const obj) |
Non-inline replacement for MkObjectToError … | |
MK_EXTERN MK_I32 | MkObjectHandleGetOfTypeP (MK_OBJ const obj) |
Non-inline replacement for MkObjectHandleGetOfType … | |
MK_EXTERN MK_BOOL | MkObjectIsNullP (MK_OBJ const obj) |
Non-inline replacement for MkObjectIsNull … | |
MkObjectC - MkObjectC_Misc_C_API - overload | |
#define | MkObjectErrorCatch_NULL(...) |
#define | MkObjectErrorCatch(...) |
#define | MkObjectErrorCatch_2(obj, exception) |
#define | MkObjectErrorCatch_1(obj) |
#define | MkObjectToError_NULL(...) |
#define | MkObjectToError(...) |
#define | MkObjectInstancesOfType_NULL(...) |
#define | MkObjectInstancesOfType(...) |
#define | MkObjectToName_NULL(...) |
#define | MkObjectToName(...) |
#define | MkObjectToNameOfClass_NULL(...) |
#define | MkObjectToNameOfClass(...) |
#define | MkObjectToNameOfType_NULL(...) |
#define | MkObjectToNameOfType(...) |
#define | MkObjectToString_NULL(...) |
#define | MkObjectToString(...) |
MkObjectC - various functions related to the MkObjectS …
#define MkObjectErrorCatch | ( | ... | ) |
Definition at line 1579 of file kernel_overload_mk.h.
#define MkObjectErrorCatch_1 | ( | obj | ) |
Definition at line 1581 of file kernel_overload_mk.h.
#define MkObjectErrorCatch_2 | ( | obj, | |
exception ) |
Definition at line 1580 of file kernel_overload_mk.h.
#define MkObjectErrorCatch_NULL | ( | ... | ) |
Definition at line 1578 of file kernel_overload_mk.h.
#define MkObjectInstancesOfType | ( | ... | ) |
Definition at line 1587 of file kernel_overload_mk.h.
#define MkObjectInstancesOfType_NULL | ( | ... | ) |
Definition at line 1586 of file kernel_overload_mk.h.
#define MkObjectToError | ( | ... | ) |
Definition at line 1583 of file kernel_overload_mk.h.
#define MkObjectToError_1X | ( | obj | ) |
Definition at line 12682 of file LibMkKernel_mk.h.
#define MkObjectToError_NULL | ( | ... | ) |
Definition at line 1582 of file kernel_overload_mk.h.
#define MkObjectToName | ( | ... | ) |
Definition at line 1591 of file kernel_overload_mk.h.
#define MkObjectToName_1X | ( | x | ) |
Definition at line 4772 of file LibMkKernel_mk.h.
#define MkObjectToName_NULL | ( | ... | ) |
Definition at line 1590 of file kernel_overload_mk.h.
#define MkObjectToNameOfClass | ( | ... | ) |
Definition at line 1593 of file kernel_overload_mk.h.
#define MkObjectToNameOfClass_1X | ( | x | ) |
Definition at line 4812 of file LibMkKernel_mk.h.
#define MkObjectToNameOfClass_NULL | ( | ... | ) |
Definition at line 1592 of file kernel_overload_mk.h.
#define MkObjectToNameOfType | ( | ... | ) |
Definition at line 1595 of file kernel_overload_mk.h.
#define MkObjectToNameOfType_1X | ( | x | ) |
Definition at line 4794 of file LibMkKernel_mk.h.
#define MkObjectToNameOfType_NULL | ( | ... | ) |
Definition at line 1594 of file kernel_overload_mk.h.
#define MkObjectToString | ( | ... | ) |
Definition at line 1597 of file kernel_overload_mk.h.
#define MkObjectToString_1M | ( | m | ) |
Definition at line 4830 of file LibMkKernel_mk.h.
#define MkObjectToString_1X | ( | x | ) |
Definition at line 4829 of file LibMkKernel_mk.h.
#define MkObjectToString_NULL | ( | ... | ) |
Definition at line 1596 of file kernel_overload_mk.h.
MK_EXTERN MK_ERR MkObjectErrorCatch_RT | ( | MK_RT | mkrt, |
MK_OBJN const | obj, | ||
MK_EXP const | exception, | ||
MK_STRN const | callfunc ) |
convert a programming-language-error into an libmkkernel error …
This function is a placeholder and have to be overloaded by the Target-Programming-Language (TPL). The goal is to handel an error-catch condition and convert an programming-language-error into an libmkkernel-error.
This is the same as (example form c++):
Example from server.c
→ catch-send and reset an error
MQ_CTX const clmqctx = srvctx->cl[clid]; MqSendSTART_E (clmqctx); MqProxyItem_E (mqctx, clmqctx); if (MkErrorCheckI(MqSendEND_AND_WAIT(clmqctx, "ECOI", 5))) { MqContextErrorCopy (mqctx, clmqctx); MqSendI32_E (mqctx, MkErrorGetNum_0E()); MqSendSTR_E (mqctx, MkErrorGetText_0E()); MkErrorReset_1X(mqctx); }
[in] | mkrt | the MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only) |
[in] | obj | the MkObjectS instance to work on - a MANAGED OBJECT after type-check and able to be supported by the MkObjectS API |
[in] | exception | the exception object from C, if MK_NULL the global exception object is used |
[in] | callfunc | a user-defined postfix to identify the calling function or the environment (default=name-of-function ) |
Non-inline replacement for MkObjectHandleGetOfType …
|
inline |
ckeck if the object is MK_NULL
Definition at line 4835 of file LibMkKernel_mk.h.
Non-inline replacement for MkObjectIsNull …
Error-Slot - return an error-object pre initialized with obj data.
This slot is the same as ErrorDEFAULT with fmtobj set to this
[in] | mkrt | the MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only) |
[in] | obj | the MkObjectS instance to work on - a MANAGED OBJECT after type-check and able to be supported by the MkObjectS API |
MK_NULL
for a non-error result.Definition at line 12674 of file LibMkKernel_mk.h.
Non-inline replacement for MkObjectToError …
Info-Slot - returns brief information about the obj as a string
[in] | mkrt | the MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only) |
[in] | obj | the MkObjectS instance to work on - a MANAGED OBJECT after type-check and able to be supported by the MkObjectS API |
MK_NULL
for a non-error result.Class-Slot - returns the C-Class-Name of the obj as string
The Programming-Language-Micro-Kernel (PLMK) connect the C language with the libmkkernel runtime. Every class-object in C has an conterpart as libmkkernel type-object in the Programming-Language-Micro-Kernel (PLMK).
ObjectToNameOfType | returns the name of the libmkkernel type |
ObjectToNameOfClass | returns the name of the C class |
Type-Slot - returns the LibMkKernel-Type-Name of the obj as a string
The Programming-Language-Micro-Kernel (PLMK) connect the C language with the libmkkernel runtime. Every class-object in C has an conterpart as libmkkernel type-object in the Programming-Language-Micro-Kernel (PLMK).
ObjectToNameOfType | returns the name of the libmsgque type |
ObjectToNameOfClass | returns the name of the C class |
[in] | mkrt | the MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only) |
[in] | obj | the MkObjectS instance to work on - a MANAGED OBJECT after type-check and able to be supported by the MkObjectS API |
String-Slot - returns the string representation of the inst …
The string is a human-readable form of the data stored in the object.
ToString
function by default.[in] | mkrt | the MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only) |
[in] | inst | - the instance to work on |
"MK_NULL"
on error MK_NULL
for a non-error result.