MkKernel PACKAGE - enum definition … More...
Enum From Obj | |
int | atlmkkernel_Get_MkErrorE_FromObj (MK_RT mkrt, OT_ENV_T interp, OT_OBJ_T enumE, enum MkErrorE *ret) |
int | atlmkkernel_Get_MkIdSE_FromObj (MK_RT mkrt, OT_ENV_T interp, OT_OBJ_T enumE, enum MkIdSE *ret) |
int | atlmkkernel_Get_MkTimeoutE_FromObj (MK_RT mkrt, OT_ENV_T interp, OT_OBJ_T enumE, enum MkTimeoutE *ret) |
int | atlmkkernel_Get_MkTypeE_FromObj (MK_RT mkrt, OT_ENV_T interp, OT_OBJ_T enumE, enum MkTypeE *ret) |
Enum To String | |
OT_OBJ_T | atlmkkernel_MkBoolE_ToString (const enum MkBoolE type) |
OT_OBJ_T | atlmkkernel_MkErrorE_ToString (const enum MkErrorE type) |
OT_OBJ_T | atlmkkernel_MkIdSE_ToString (const enum MkIdSE type) |
OT_OBJ_T | atlmkkernel_MkNativeIsE_ToString (const enum MkNativeIsE type) |
OT_OBJ_T | atlmkkernel_MkTimeoutE_ToString (const enum MkTimeoutE type) |
OT_OBJ_T | atlmkkernel_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 atlmkkernel_Get_MkErrorE_FromObj | ( | MK_RT | mkrt, |
OT_ENV_T | interp, | ||
OT_OBJ_T | enumE, | ||
enum MkErrorE * | ret ) |
Definition at line 1066 of file LibMkKernel_atl.c.
int atlmkkernel_Get_MkIdSE_FromObj | ( | MK_RT | mkrt, |
OT_ENV_T | interp, | ||
OT_OBJ_T | enumE, | ||
enum MkIdSE * | ret ) |
Definition at line 1084 of file LibMkKernel_atl.c.
int atlmkkernel_Get_MkTimeoutE_FromObj | ( | MK_RT | mkrt, |
OT_ENV_T | interp, | ||
OT_OBJ_T | enumE, | ||
enum MkTimeoutE * | ret ) |
Definition at line 1105 of file LibMkKernel_atl.c.
int atlmkkernel_Get_MkTypeE_FromObj | ( | MK_RT | mkrt, |
OT_ENV_T | interp, | ||
OT_OBJ_T | enumE, | ||
enum MkTypeE * | ret ) |
Definition at line 1144 of file LibMkKernel_atl.c.
Definition at line 1552 of file LibMkKernel_atl.c.
Definition at line 1561 of file LibMkKernel_atl.c.
Definition at line 1571 of file LibMkKernel_atl.c.
|
static |
Atl:
→ C-API (static) MkErrorE [MkKernel::ErrorE_FromInt value:int32]
return the MkErrorE from integer …
Definition at line 1638 of file LibMkKernel_atl.c.
|
static |
Atl:
→ C-API (static) int32 [MkKernel::ErrorE_ToInt value:MkErrorE]
return the MkErrorE as integer …
Definition at line 1708 of file LibMkKernel_atl.c.
|
static |
Atl:
→ C-API (static) string [MkKernel::ErrorE_ToString value:MkErrorE]
return the MkErrorE as string …
Definition at line 1723 of file LibMkKernel_atl.c.
|
static |
Atl:
→ C-API (static) MkIdSE [MkKernel::IdSE_FromInt value:int32]
return the MkIdSE from integer …
Definition at line 1655 of file LibMkKernel_atl.c.
|
static |
Atl:
→ C-API (static) int32 [MkKernel::IdSE_ToInt value:MkIdSE]
return the MkIdSE as integer …
Definition at line 1738 of file LibMkKernel_atl.c.
|
static |
Atl:
→ C-API (static) string [MkKernel::IdSE_ToString value:MkIdSE]
return the MkIdSE as string …
Definition at line 1753 of file LibMkKernel_atl.c.
|
static |
Atl:
→ C-API (static) MkTimeoutE [MkKernel::TimeoutE_FromInt value:int32]
return the MkTimeoutE from integer …
Definition at line 1672 of file LibMkKernel_atl.c.
|
static |
Atl:
→ C-API (static) int32 [MkKernel::TimeoutE_ToInt value:MkTimeoutE]
return the MkTimeoutE as integer …
Definition at line 1768 of file LibMkKernel_atl.c.
|
static |
Atl:
→ C-API (static) string [MkKernel::TimeoutE_ToString value:MkTimeoutE]
return the MkTimeoutE as string …
Definition at line 1783 of file LibMkKernel_atl.c.
|
static |
Atl:
→ C-API (static) MkTypeE [MkKernel::TypeE_FromInt value:int32]
return the MkTypeE from integer …
Definition at line 1689 of file LibMkKernel_atl.c.
|
static |
Atl:
→ C-API (static) int32 [MkKernel::TypeE_ToInt value:MkTypeE]
return the MkTypeE as integer …
Definition at line 1798 of file LibMkKernel_atl.c.
|
static |
Atl:
→ C-API (static) string [MkKernel::TypeE_ToString value:MkTypeE]
return the MkTypeE as string …
Definition at line 1813 of file LibMkKernel_atl.c.
OT_OBJ_T atlmkkernel_MkNativeIsE_ToString | ( | const enum MkNativeIsE | type | ) |
Definition at line 1581 of file LibMkKernel_atl.c.
OT_OBJ_T atlmkkernel_MkTimeoutE_ToString | ( | const enum MkTimeoutE | type | ) |
Definition at line 1592 of file LibMkKernel_atl.c.
Definition at line 1608 of file LibMkKernel_atl.c.