MkKernel PACKAGE - enum definition … More...
Collaboration diagram for MkKernel_Enum_TCL_API:Enum From Obj | |
| int | tclmkkernel_Get_MkErrorE_FromObj (MK_RT mkrt, OT_ENV_T interp, OT_OBJ_T enumE, enum MkErrorE *ret) |
| int | tclmkkernel_Get_MkIdSE_FromObj (MK_RT mkrt, OT_ENV_T interp, OT_OBJ_T enumE, enum MkIdSE *ret) |
| int | tclmkkernel_Get_MkTimeoutE_FromObj (MK_RT mkrt, OT_ENV_T interp, OT_OBJ_T enumE, enum MkTimeoutE *ret) |
| int | tclmkkernel_Get_MkTypeE_FromObj (MK_RT mkrt, OT_ENV_T interp, OT_OBJ_T enumE, enum MkTypeE *ret) |
Enum To String | |
| OT_OBJ_T | tclmkkernel_MkBoolE_ToString (const enum MkBoolE type) |
| OT_OBJ_T | tclmkkernel_MkErrorE_ToString (const enum MkErrorE type) |
| OT_OBJ_T | tclmkkernel_MkIdSE_ToString (const enum MkIdSE type) |
| OT_OBJ_T | tclmkkernel_MkNativeIsE_ToString (const enum MkNativeIsE type) |
| OT_OBJ_T | tclmkkernel_MkTimeoutE_ToString (const enum MkTimeoutE type) |
| OT_OBJ_T | tclmkkernel_MkTypeE_ToString (const enum MkTypeE type) |
MkKernel PACKAGE - enum definition …
ENUM
Tcl has no build-in-enum-datatyp but theKernel support a enum using the data-type-checking API.
A C-enum like :
will be compiled into a internal tcl-c-check-proc :
to return the integer identifier for an enum-definition-string or an error if string is not valid.
"MK_TIMEOUT_MAX " = MK_TIMEOUT_MAX = -3 A valid string for an enum-value is any unique abbreviation of the original enum-value:
"MK_TIMEOUT_MAX" = "TIMEOUT_MAX" = "MAX" = -3 The tcl-c-check-proc is used in a tcl-c-api-wrapper like :
The usage of an enum-value in the tcl-code is quite simple, just use the string.
A enum in the Programming-Language-Micro-Kernel (PLMK) is a enum-data-type and 3 enum-access-attributes
ENUM_ToString → return the string-value from the enum-value ENUM_ToInt → return the integer-value from the enum-value ENUM_FromInt → create an enum-value from an integer-value.The enum-data-type and the 3 enum-access-attributes are defined in all target-languages (C,C++,C#,VB.NET,Java,Python,Ruby,Perl,PHP,Tcl or GO).
| int tclmkkernel_Get_MkErrorE_FromObj | ( | MK_RT | mkrt, |
| OT_ENV_T | interp, | ||
| OT_OBJ_T | enumE, | ||
| enum MkErrorE * | ret ) |
Definition at line 1006 of file LibMkKernel_tcl.c.
| int tclmkkernel_Get_MkIdSE_FromObj | ( | MK_RT | mkrt, |
| OT_ENV_T | interp, | ||
| OT_OBJ_T | enumE, | ||
| enum MkIdSE * | ret ) |
Definition at line 1024 of file LibMkKernel_tcl.c.
| int tclmkkernel_Get_MkTimeoutE_FromObj | ( | MK_RT | mkrt, |
| OT_ENV_T | interp, | ||
| OT_OBJ_T | enumE, | ||
| enum MkTimeoutE * | ret ) |
Definition at line 1045 of file LibMkKernel_tcl.c.
| int tclmkkernel_Get_MkTypeE_FromObj | ( | MK_RT | mkrt, |
| OT_ENV_T | interp, | ||
| OT_OBJ_T | enumE, | ||
| enum MkTypeE * | ret ) |
Definition at line 1084 of file LibMkKernel_tcl.c.
Definition at line 1337 of file LibMkKernel_tcl.c.
Definition at line 1346 of file LibMkKernel_tcl.c.
Definition at line 1356 of file LibMkKernel_tcl.c.
|
static |
Tcl: → C-API (static) MkErrorE [MkKernel ErrorE_FromInt value:int32]
return the MkErrorE from integer …
Definition at line 1423 of file LibMkKernel_tcl.c.
|
static |
Tcl: → C-API (static) int32 [MkKernel ErrorE_ToInt value:MkErrorE]
return the MkErrorE as integer …
Definition at line 1493 of file LibMkKernel_tcl.c.
|
static |
Tcl: → C-API (static) string [MkKernel ErrorE_ToString value:MkErrorE]
return the MkErrorE as string …
Definition at line 1508 of file LibMkKernel_tcl.c.
|
static |
Tcl: → C-API (static) MkIdSE [MkKernel IdSE_FromInt value:int32]
return the MkIdSE from integer …
Definition at line 1440 of file LibMkKernel_tcl.c.
|
static |
Tcl: → C-API (static) int32 [MkKernel IdSE_ToInt value:MkIdSE]
return the MkIdSE as integer …
Definition at line 1523 of file LibMkKernel_tcl.c.
|
static |
Tcl: → C-API (static) string [MkKernel IdSE_ToString value:MkIdSE]
return the MkIdSE as string …
Definition at line 1538 of file LibMkKernel_tcl.c.
|
static |
Tcl: → C-API (static) MkTimeoutE [MkKernel TimeoutE_FromInt value:int32]
return the MkTimeoutE from integer …
Definition at line 1457 of file LibMkKernel_tcl.c.
|
static |
Tcl: → C-API (static) int32 [MkKernel TimeoutE_ToInt value:MkTimeoutE]
return the MkTimeoutE as integer …
Definition at line 1553 of file LibMkKernel_tcl.c.
|
static |
Tcl: → C-API (static) string [MkKernel TimeoutE_ToString value:MkTimeoutE]
return the MkTimeoutE as string …
Definition at line 1568 of file LibMkKernel_tcl.c.
|
static |
Tcl: → C-API (static) MkTypeE [MkKernel TypeE_FromInt value:int32]
return the MkTypeE from integer …
Definition at line 1474 of file LibMkKernel_tcl.c.
|
static |
Tcl: → C-API (static) int32 [MkKernel TypeE_ToInt value:MkTypeE]
return the MkTypeE as integer …
Definition at line 1583 of file LibMkKernel_tcl.c.
|
static |
Tcl: → C-API (static) string [MkKernel TypeE_ToString value:MkTypeE]
return the MkTypeE as string …
Definition at line 1598 of file LibMkKernel_tcl.c.
| OT_OBJ_T tclmkkernel_MkNativeIsE_ToString | ( | const enum MkNativeIsE | type | ) |
Definition at line 1366 of file LibMkKernel_tcl.c.
| OT_OBJ_T tclmkkernel_MkTimeoutE_ToString | ( | const enum MkTimeoutE | type | ) |
Definition at line 1377 of file LibMkKernel_tcl.c.
Definition at line 1393 of file LibMkKernel_tcl.c.