theKernel 10.0
Loading...
Searching...
No Matches
MkKernel_Enum_TCL_API

MkKernel PACKAGE - enum definition … More...

+ Collaboration diagram for MkKernel_Enum_TCL_API:

Functions

static OT_ProcRet tclmkkernel_MkKernel_ErrorE_FromInt (OtClass_ARGS)
  Tcl: (static) MkErrorE [MkKernel ErrorE_FromInt value:int32] C-API
return the MkErrorE from integer …
 
static OT_ProcRet tclmkkernel_MkKernel_IdSE_FromInt (OtClass_ARGS)
  Tcl: (static) MkIdSE [MkKernel IdSE_FromInt value:int32] C-API
return the MkIdSE from integer …
 
static OT_ProcRet tclmkkernel_MkKernel_TimeoutE_FromInt (OtClass_ARGS)
  Tcl: (static) MkTimeoutE [MkKernel TimeoutE_FromInt value:int32] C-API
return the MkTimeoutE from integer …
 
static OT_ProcRet tclmkkernel_MkKernel_TypeE_FromInt (OtClass_ARGS)
  Tcl: (static) MkTypeE [MkKernel TypeE_FromInt value:int32] C-API
return the MkTypeE from integer …
 
static OT_ProcRet tclmkkernel_MkKernel_ErrorE_ToInt (OtClass_ARGS)
  Tcl: (static) int32 [MkKernel ErrorE_ToInt value:MkErrorE] C-API
return the MkErrorE as integer …
 
static OT_ProcRet tclmkkernel_MkKernel_ErrorE_ToString (OtClass_ARGS)
  Tcl: (static) string [MkKernel ErrorE_ToString value:MkErrorE] C-API
return the MkErrorE as string …
 
static OT_ProcRet tclmkkernel_MkKernel_IdSE_ToInt (OtClass_ARGS)
  Tcl: (static) int32 [MkKernel IdSE_ToInt value:MkIdSE] C-API
return the MkIdSE as integer …
 
static OT_ProcRet tclmkkernel_MkKernel_IdSE_ToString (OtClass_ARGS)
  Tcl: (static) string [MkKernel IdSE_ToString value:MkIdSE] C-API
return the MkIdSE as string …
 
static OT_ProcRet tclmkkernel_MkKernel_TimeoutE_ToInt (OtClass_ARGS)
  Tcl: (static) int32 [MkKernel TimeoutE_ToInt value:MkTimeoutE] C-API
return the MkTimeoutE as integer …
 
static OT_ProcRet tclmkkernel_MkKernel_TimeoutE_ToString (OtClass_ARGS)
  Tcl: (static) string [MkKernel TimeoutE_ToString value:MkTimeoutE] C-API
return the MkTimeoutE as string …
 
static OT_ProcRet tclmkkernel_MkKernel_TypeE_ToInt (OtClass_ARGS)
  Tcl: (static) int32 [MkKernel TypeE_ToInt value:MkTypeE] C-API
return the MkTypeE as integer …
 
static OT_ProcRet tclmkkernel_MkKernel_TypeE_ToString (OtClass_ARGS)
  Tcl: (static) string [MkKernel TypeE_ToString value:MkTypeE] C-API
return the MkTypeE as string …
 

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)
 

Detailed Description

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 :

int MK(Get_MkTimeoutE_FromObj) (MK_RT_ARGS OT_ENV_T interp, OT_OBJ_T enumE, enum MkTimeoutE *ret) {
const static struct LookupEnumE keys[] = {
{ "MAX" , MK_TIMEOUT_MAX },
{ "LONG" , MK_TIMEOUT_LONG },
{ "INIT" , MK_TIMEOUT_INIT },
{ "USER" , MK_TIMEOUT_USER },
{ "SHORT" , MK_TIMEOUT_SHORT },
{ "NORMAL" , MK_TIMEOUT_NORMAL },
{ "SOCKET" , MK_TIMEOUT_SOCKET },
{ "DEFAULT" , MK_TIMEOUT_DEFAULT },
{ "VERYSHORT" , MK_TIMEOUT_VERYSHORT },
{ "TIMEOUT_MAX" , MK_TIMEOUT_MAX },
{ "TIMEOUT_USER" , MK_TIMEOUT_USER },
{ "TIMEOUT_LONG" , MK_TIMEOUT_LONG },
{ "TIMEOUT_INIT" , MK_TIMEOUT_INIT },
{ "TIMEOUT_SHORT" , MK_TIMEOUT_SHORT },
{ "TIMEOUT_NORMAL" , MK_TIMEOUT_NORMAL },
{ "TIMEOUT_SOCKET" , MK_TIMEOUT_SOCKET },
{ "MK_TIMEOUT_MAX" , MK_TIMEOUT_MAX },
{ "MK_TIMEOUT_USER" , MK_TIMEOUT_USER },
{ "MK_TIMEOUT_LONG" , MK_TIMEOUT_LONG },
{ "MK_TIMEOUT_INIT" , MK_TIMEOUT_INIT },
{ "TIMEOUT_DEFAULT" , MK_TIMEOUT_DEFAULT },
{ "MK_TIMEOUT_SHORT" , MK_TIMEOUT_SHORT },
{ "MK_TIMEOUT_NORMAL" , MK_TIMEOUT_NORMAL },
{ "MK_TIMEOUT_SOCKET" , MK_TIMEOUT_SOCKET },
{ "TIMEOUT_VERYSHORT" , MK_TIMEOUT_VERYSHORT },
{ "MK_TIMEOUT_DEFAULT" , MK_TIMEOUT_DEFAULT },
{ "MK_TIMEOUT_VERYSHORT" , MK_TIMEOUT_VERYSHORT },
{ NULL , 0 },
};
int index;
OtErrorCheckLng (Tcl_GetIndexFromObjStruct (interp, enumE, &keys,
sizeof(struct LookupClassS), "enum", TCL_EXACT, &index));
*ret = keys[index].val;
return TCL_OK;
#define MK(n)
#define OtErrorCheckLng(cmd)
Tcl_Interp * OT_ENV_T
Tcl_Obj * OT_OBJ_T
MkTimeoutE
Predefined Timeout values …
@ MK_TIMEOUT_LONG
long timeout in sec (180 sec) …
@ MK_TIMEOUT_VERYSHORT
very short timeout in sec (5 sec) …
@ MK_TIMEOUT_INIT
maximum timeout in sec (900 sec) …
@ MK_TIMEOUT_MAX
request the maximum possible (infinite) timeout value …
@ MK_TIMEOUT_NORMAL
normal timeout in sec (90 sec) …
@ MK_TIMEOUT_USER
request the user defined timeout value from the –timeout configuration value …
@ MK_TIMEOUT_SOCKET
shorter timeout in sec (10 sec) … This TIMEOUT is used for socket connection with 'connect'
@ MK_TIMEOUT_SHORT
short timeout in sec (20 sec) …
@ MK_TIMEOUT_DEFAULT
request the default timeout value …
#define MK_RT_ARGS
}

to return the integer identifier for an enum-definition-string or an error if string is not valid.

A valid string for an enum-value is any unique abbreviation of the original enum-value:

The tcl-c-check-proc is used in a tcl-c-api-wrapper like :

static OT_ProcRet NS(MkKernel_LogTimeoutE) (OtClass_ARGS) {
OT_SETUP_ONEARG(LogTimeoutE_doc)
OT_CHECK_REQUIRED(OT_CHECK_ENUM (MkTimeoutE,val)) // <- tcl-c-check-proc
OT_retObj_SET_STR(MkLogTimeoutE (val))
goto end;
error:
end:
}
#define OT_SETUP_hdl_static
#define OtClass_ARGS
#define OT_SETUP_ONEARG(d)
#define OT_retObj_SET_Error
#define OT_CHECK_REQUIRED(val)
#define NS(n)
#define OT_CHECK_ENUM(ename, val)
#define OT_retObj_RETURN
#define OT_retObj_SET_STR(nat)
#define OT_CHECK_NOARGS
#define OT_ProcRet

The usage of an enum-value in the tcl-code is quite simple, just use the string.

package require tclmkkernel
puts [ tclmkkernel LogTimeoutE TIMEOUT_SOCKET ]

A enum in the Programming-Language-Micro-Kernel (PLMK) is a enum-data-type and 3 enum-access-attributes

  1. ENUM_ToString → return the string-value from the enum-value
  2. ENUM_ToInt → return the integer-value from the enum-value
  3. 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).

Function Documentation

◆ tclmkkernel_Get_MkErrorE_FromObj()

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.

1006 {
1007 const static struct LookupEnumE keys[] = {
1008 { "OK" , MK_OK },
1009 { "MK_OK" , MK_OK },
1010 { "ERROR" , MK_ERROR },
1011 { "CONTINUE" , MK_CONTINUE },
1012 { "MK_ERROR" , MK_ERROR },
1013 { "MK_CONTINUE" , MK_CONTINUE },
1014 { NULL , 0 },
1015 };
1016
1017 int index;
1018 OtErrorCheckLng (Tcl_GetIndexFromObjStruct (interp, enumE, &keys,
1019 sizeof(struct LookupClassS), "enum", TCL_EXACT, &index));
1020 *ret = keys[index].val;
1021 return TCL_OK;
1022}
@ MK_ERROR
(persistent) raise an error-event, the calling-fucntion is interrupted.
@ MK_CONTINUE
(transient) raise an continue-event, the calling-function must handle this.
@ MK_OK
(persistent) everything is OK.

◆ tclmkkernel_Get_MkIdSE_FromObj()

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.

1024 {
1025 const static struct LookupEnumE keys[] = {
1026 { "UNUSED" , MK_ID_UNUSED },
1027 { "THREAD" , MK_ID_THREAD },
1028 { "PROCESS" , MK_ID_PROCESS },
1029 { "ID_UNUSED" , MK_ID_UNUSED },
1030 { "ID_THREAD" , MK_ID_THREAD },
1031 { "ID_PROCESS" , MK_ID_PROCESS },
1032 { "MK_ID_THREAD" , MK_ID_THREAD },
1033 { "MK_ID_UNUSED" , MK_ID_UNUSED },
1034 { "MK_ID_PROCESS" , MK_ID_PROCESS },
1035 { NULL , 0 },
1036 };
1037
1038 int index;
1039 OtErrorCheckLng (Tcl_GetIndexFromObjStruct (interp, enumE, &keys,
1040 sizeof(struct LookupClassS), "enum", TCL_EXACT, &index));
1041 *ret = keys[index].val;
1042 return TCL_OK;
1043}
@ MK_ID_THREAD
val has a thread handle
@ MK_ID_PROCESS
val has a process handle
@ MK_ID_UNUSED
empty struct

◆ tclmkkernel_Get_MkTimeoutE_FromObj()

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.

1045 {
1046 const static struct LookupEnumE keys[] = {
1047 { "MAX" , MK_TIMEOUT_MAX },
1048 { "LONG" , MK_TIMEOUT_LONG },
1049 { "INIT" , MK_TIMEOUT_INIT },
1050 { "USER" , MK_TIMEOUT_USER },
1051 { "SHORT" , MK_TIMEOUT_SHORT },
1052 { "NORMAL" , MK_TIMEOUT_NORMAL },
1053 { "SOCKET" , MK_TIMEOUT_SOCKET },
1054 { "DEFAULT" , MK_TIMEOUT_DEFAULT },
1055 { "VERYSHORT" , MK_TIMEOUT_VERYSHORT },
1056 { "TIMEOUT_MAX" , MK_TIMEOUT_MAX },
1057 { "TIMEOUT_USER" , MK_TIMEOUT_USER },
1058 { "TIMEOUT_LONG" , MK_TIMEOUT_LONG },
1059 { "TIMEOUT_INIT" , MK_TIMEOUT_INIT },
1060 { "TIMEOUT_SHORT" , MK_TIMEOUT_SHORT },
1061 { "TIMEOUT_NORMAL" , MK_TIMEOUT_NORMAL },
1062 { "TIMEOUT_SOCKET" , MK_TIMEOUT_SOCKET },
1063 { "MK_TIMEOUT_MAX" , MK_TIMEOUT_MAX },
1064 { "MK_TIMEOUT_USER" , MK_TIMEOUT_USER },
1065 { "MK_TIMEOUT_LONG" , MK_TIMEOUT_LONG },
1066 { "MK_TIMEOUT_INIT" , MK_TIMEOUT_INIT },
1067 { "TIMEOUT_DEFAULT" , MK_TIMEOUT_DEFAULT },
1068 { "MK_TIMEOUT_SHORT" , MK_TIMEOUT_SHORT },
1069 { "MK_TIMEOUT_NORMAL" , MK_TIMEOUT_NORMAL },
1070 { "MK_TIMEOUT_SOCKET" , MK_TIMEOUT_SOCKET },
1071 { "TIMEOUT_VERYSHORT" , MK_TIMEOUT_VERYSHORT },
1072 { "MK_TIMEOUT_DEFAULT" , MK_TIMEOUT_DEFAULT },
1073 { "MK_TIMEOUT_VERYSHORT" , MK_TIMEOUT_VERYSHORT },
1074 { NULL , 0 },
1075 };
1076
1077 int index;
1078 OtErrorCheckLng (Tcl_GetIndexFromObjStruct (interp, enumE, &keys,
1079 sizeof(struct LookupClassS), "enum", TCL_EXACT, &index));
1080 *ret = keys[index].val;
1081 return TCL_OK;
1082}

◆ tclmkkernel_Get_MkTypeE_FromObj()

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.

1084 {
1085 const static struct LookupEnumE keys[] = {
1086 { "I8T" , MK_I8T },
1087 { "BOLT" , MK_BOLT },
1088 { "STRT" , MK_STRT },
1089 { "DBLT" , MK_DBLT },
1090 { "LSTT" , MK_LSTT },
1091 { "I32T" , MK_I32T },
1092 { "FLTT" , MK_FLTT },
1093 { "I16T" , MK_I16T },
1094 { "BINT" , MK_BINT },
1095 { "I64T" , MK_I64T },
1096 { "MK_I8T" , MK_I8T },
1097 { "MK_BOLT" , MK_BOLT },
1098 { "MK_STRT" , MK_STRT },
1099 { "MK_DBLT" , MK_DBLT },
1100 { "MK_LSTT" , MK_LSTT },
1101 { "MK_I32T" , MK_I32T },
1102 { "MK_FLTT" , MK_FLTT },
1103 { "MK_I16T" , MK_I16T },
1104 { "MK_BINT" , MK_BINT },
1105 { "MK_I64T" , MK_I64T },
1106 { NULL , 0 },
1107 };
1108
1109 int index;
1110 OtErrorCheckLng (Tcl_GetIndexFromObjStruct (interp, enumE, &keys,
1111 sizeof(struct LookupClassS), "enum", TCL_EXACT, &index));
1112 *ret = keys[index].val;
1113 return TCL_OK;
1114}
@ MK_I8T
Y: 1 byte 'byte' type.
@ MK_I64T
W: 8 byte 'long long int' type.
@ MK_FLTT
F: 4 byte 'float' type.
@ MK_BINT
B: X byte 'byte-array' type.
@ MK_I16T
S: 2 byte 'short' type.
@ MK_BOLT
O: 1 byte 'boolean' type.
@ MK_DBLT
D: 8 byte 'double' type.
@ MK_I32T
I: 4 byte 'int' type.
@ MK_STRT
C: X byte 'string' type (e.g. with a \0 at the end)
@ MK_LSTT
L: X byte 'list' type.

◆ tclmkkernel_MkBoolE_ToString()

OT_OBJ_T tclmkkernel_MkBoolE_ToString ( const enum MkBoolE type)

Definition at line 1337 of file LibMkKernel_tcl.c.

1338{
1339 switch (type) {
1340 case MK_NO : return ot_fixstrobj("NO" ) ;
1341 case MK_YES : return ot_fixstrobj("YES") ;
1342 }
1343 return ot_fixstrobj("NOTHING");
1344}
#define ot_fixstrobj(_s)
@ MK_YES
boolean YES
@ MK_NO
boolean NO

◆ tclmkkernel_MkErrorE_ToString()

OT_OBJ_T tclmkkernel_MkErrorE_ToString ( const enum MkErrorE type)

Definition at line 1346 of file LibMkKernel_tcl.c.

1347{
1348 switch (type) {
1349 case MK_OK : return ot_fixstrobj("OK" ) ;
1350 case MK_CONTINUE : return ot_fixstrobj("CONTINUE") ;
1351 case MK_ERROR : return ot_fixstrobj("ERROR" ) ;
1352 }
1353 return ot_fixstrobj("NOTHING");
1354}

◆ tclmkkernel_MkIdSE_ToString()

OT_OBJ_T tclmkkernel_MkIdSE_ToString ( const enum MkIdSE type)

Definition at line 1356 of file LibMkKernel_tcl.c.

1357{
1358 switch (type) {
1359 case MK_ID_UNUSED : return ot_fixstrobj("UNUSED" ) ;
1360 case MK_ID_PROCESS : return ot_fixstrobj("PROCESS") ;
1361 case MK_ID_THREAD : return ot_fixstrobj("THREAD" ) ;
1362 }
1363 return ot_fixstrobj("NOTHING");
1364}

◆ tclmkkernel_MkKernel_ErrorE_FromInt()

static OT_ProcRet tclmkkernel_MkKernel_ErrorE_FromInt ( OtClass_ARGS )
static

Tcl: (static) MkErrorE [MkKernel ErrorE_FromInt value:int32] C-API
return the MkErrorE from integer …

Definition at line 1423 of file LibMkKernel_tcl.c.

1423 {
1426 MK_I32 value = 0;
1429 enum MkErrorE value_out;
1430 MkErrorC_Check(MK_ERROR_FORMAT,MkErrorE_FromInt (value, &value_out));
1431 OT_retObj_SET(OT_NEW_Mk_enum_OBJ(ErrorE,value_out));
1432 goto end;
1433 error:
1435 end:
1437}
#define ErrorE_FromInt_doc
#define OT_CHECK_NI4(val)
#define OT_NEW_Mk_enum_OBJ(typ, val)
#define OT_retObj_SET(val)
#define MkErrorC_Check(mng, PROC)
#define MK_ERROR_FORMAT
enum MkErrorE MkErrorE_FromInt(MK_I32 const value, enum MkErrorE *value_out)
return the MkErrorE from integer …
MkErrorE
collection for the different error-codes …
signed int MK_I32
4 byte integer data-type

◆ tclmkkernel_MkKernel_ErrorE_ToInt()

static OT_ProcRet tclmkkernel_MkKernel_ErrorE_ToInt ( OtClass_ARGS )
static

Tcl: (static) int32 [MkKernel ErrorE_ToInt value:MkErrorE] C-API
return the MkErrorE as integer …

Definition at line 1493 of file LibMkKernel_tcl.c.

1493 {
1496 enum MkErrorE value = 0;
1500 goto end;
1501 error:
1503 end:
1505}
#define ErrorE_ToInt_doc
#define OT_retObj_SET_I32(nat)
static MK_I32 MkErrorE_ToInt(enum MkErrorE value)
return the MkErrorE as integer …

◆ tclmkkernel_MkKernel_ErrorE_ToString()

static OT_ProcRet tclmkkernel_MkKernel_ErrorE_ToString ( OtClass_ARGS )
static

Tcl: (static) string [MkKernel ErrorE_ToString value:MkErrorE] C-API
return the MkErrorE as string …

Definition at line 1508 of file LibMkKernel_tcl.c.

1508 {
1511 enum MkErrorE value = 0;
1515 goto end;
1516 error:
1518 end:
1520}
#define ErrorE_ToString_doc
MK_STRN MkErrorE_ToString(enum MkErrorE value)
return the MkErrorE as string …

◆ tclmkkernel_MkKernel_IdSE_FromInt()

static OT_ProcRet tclmkkernel_MkKernel_IdSE_FromInt ( OtClass_ARGS )
static

Tcl: (static) MkIdSE [MkKernel IdSE_FromInt value:int32] C-API
return the MkIdSE from integer …

Definition at line 1440 of file LibMkKernel_tcl.c.

1440 {
1443 MK_I32 value = 0;
1446 enum MkIdSE value_out;
1447 MkErrorC_Check(MK_ERROR_FORMAT,MkIdSE_FromInt (value, &value_out));
1448 OT_retObj_SET(OT_NEW_Mk_enum_OBJ(IdSE,value_out));
1449 goto end;
1450 error:
1452 end:
1454}
#define IdSE_FromInt_doc
enum MkErrorE MkIdSE_FromInt(MK_I32 const value, enum MkIdSE *value_out)
return the MkIdSE from integer …
MkIdSE
signal type of the MkIdS data val …

◆ tclmkkernel_MkKernel_IdSE_ToInt()

static OT_ProcRet tclmkkernel_MkKernel_IdSE_ToInt ( OtClass_ARGS )
static

Tcl: (static) int32 [MkKernel IdSE_ToInt value:MkIdSE] C-API
return the MkIdSE as integer …

Definition at line 1523 of file LibMkKernel_tcl.c.

1523 {
1526 enum MkIdSE value = 0;
1530 goto end;
1531 error:
1533 end:
1535}
#define IdSE_ToInt_doc
static MK_I32 MkIdSE_ToInt(enum MkIdSE value)
return the MkIdSE as integer …

◆ tclmkkernel_MkKernel_IdSE_ToString()

static OT_ProcRet tclmkkernel_MkKernel_IdSE_ToString ( OtClass_ARGS )
static

Tcl: (static) string [MkKernel IdSE_ToString value:MkIdSE] C-API
return the MkIdSE as string …

Definition at line 1538 of file LibMkKernel_tcl.c.

1538 {
1541 enum MkIdSE value = 0;
1545 goto end;
1546 error:
1548 end:
1550}
#define IdSE_ToString_doc
MK_STRN MkIdSE_ToString(enum MkIdSE value)
return the MkIdSE as string …

◆ tclmkkernel_MkKernel_TimeoutE_FromInt()

static OT_ProcRet tclmkkernel_MkKernel_TimeoutE_FromInt ( OtClass_ARGS )
static

Tcl: (static) MkTimeoutE [MkKernel TimeoutE_FromInt value:int32] C-API
return the MkTimeoutE from integer …

Definition at line 1457 of file LibMkKernel_tcl.c.

1457 {
1460 MK_I32 value = 0;
1463 enum MkTimeoutE value_out;
1465 OT_retObj_SET(OT_NEW_Mk_enum_OBJ(TimeoutE,value_out));
1466 goto end;
1467 error:
1469 end:
1471}
#define TimeoutE_FromInt_doc
enum MkErrorE MkTimeoutE_FromInt(MK_I32 const value, enum MkTimeoutE *value_out)
return the MkTimeoutE from integer …

◆ tclmkkernel_MkKernel_TimeoutE_ToInt()

static OT_ProcRet tclmkkernel_MkKernel_TimeoutE_ToInt ( OtClass_ARGS )
static

Tcl: (static) int32 [MkKernel TimeoutE_ToInt value:MkTimeoutE] C-API
return the MkTimeoutE as integer …

Definition at line 1553 of file LibMkKernel_tcl.c.

1553 {
1556 enum MkTimeoutE value = 0;
1560 goto end;
1561 error:
1563 end:
1565}
#define TimeoutE_ToInt_doc
static MK_I32 MkTimeoutE_ToInt(enum MkTimeoutE value)
return the MkTimeoutE as integer …

◆ tclmkkernel_MkKernel_TimeoutE_ToString()

static OT_ProcRet tclmkkernel_MkKernel_TimeoutE_ToString ( OtClass_ARGS )
static

Tcl: (static) string [MkKernel TimeoutE_ToString value:MkTimeoutE] C-API
return the MkTimeoutE as string …

Definition at line 1568 of file LibMkKernel_tcl.c.

1568 {
1571 enum MkTimeoutE value = 0;
1575 goto end;
1576 error:
1578 end:
1580}
#define TimeoutE_ToString_doc
MK_STRN MkTimeoutE_ToString(enum MkTimeoutE value)
return the MkTimeoutE as string …

◆ tclmkkernel_MkKernel_TypeE_FromInt()

static OT_ProcRet tclmkkernel_MkKernel_TypeE_FromInt ( OtClass_ARGS )
static

Tcl: (static) MkTypeE [MkKernel TypeE_FromInt value:int32] C-API
return the MkTypeE from integer …

Definition at line 1474 of file LibMkKernel_tcl.c.

1474 {
1477 MK_I32 value = 0;
1480 enum MkTypeE value_out;
1481 MkErrorC_Check(MK_ERROR_FORMAT,MkTypeE_FromInt (value, &value_out));
1482 OT_retObj_SET(OT_NEW_Mk_enum_OBJ(TypeE,value_out));
1483 goto end;
1484 error:
1486 end:
1488}
#define TypeE_FromInt_doc
enum MkErrorE MkTypeE_FromInt(MK_I32 const value, enum MkTypeE *value_out)
return the MkTypeE from integer …
MkTypeE
basic data-types supported by Programming-Language-Micro-Kernel (PLMK) …

◆ tclmkkernel_MkKernel_TypeE_ToInt()

static OT_ProcRet tclmkkernel_MkKernel_TypeE_ToInt ( OtClass_ARGS )
static

Tcl: (static) int32 [MkKernel TypeE_ToInt value:MkTypeE] C-API
return the MkTypeE as integer …

Definition at line 1583 of file LibMkKernel_tcl.c.

1583 {
1586 enum MkTypeE value = 0;
1590 goto end;
1591 error:
1593 end:
1595}
#define TypeE_ToInt_doc
static MK_I32 MkTypeE_ToInt(enum MkTypeE value)
return the MkTypeE as integer …

◆ tclmkkernel_MkKernel_TypeE_ToString()

static OT_ProcRet tclmkkernel_MkKernel_TypeE_ToString ( OtClass_ARGS )
static

Tcl: (static) string [MkKernel TypeE_ToString value:MkTypeE] C-API
return the MkTypeE as string …

Definition at line 1598 of file LibMkKernel_tcl.c.

1598 {
1601 enum MkTypeE value = 0;
1605 goto end;
1606 error:
1608 end:
1610}
#define TypeE_ToString_doc
MK_STRN MkTypeE_ToString(enum MkTypeE value)
return the MkTypeE as string …

◆ tclmkkernel_MkNativeIsE_ToString()

OT_OBJ_T tclmkkernel_MkNativeIsE_ToString ( const enum MkNativeIsE type)

Definition at line 1366 of file LibMkKernel_tcl.c.

1367{
1368 switch (type) {
1369 case MK_NATIVE_IS_INITIAL : return ot_fixstrobj("INITIAL") ;
1370 case MK_NATIVE_IS_STRING : return ot_fixstrobj("STRING" ) ;
1371 case MK_NATIVE_IS_LITTLE : return ot_fixstrobj("LITTLE" ) ;
1372 case MK_NATIVE_IS_BIG : return ot_fixstrobj("BIG" ) ;
1373 }
1374 return ot_fixstrobj("NOTHING");
1375}
@ MK_NATIVE_IS_INITIAL
0 = initial value
@ MK_NATIVE_IS_STRING
S = using of the string protocol.
@ MK_NATIVE_IS_LITTLE
L = using if the binary protocoll, data in little-edian.
@ MK_NATIVE_IS_BIG
B = using if the binary protocoll, data in big-endian.

◆ tclmkkernel_MkTimeoutE_ToString()

OT_OBJ_T tclmkkernel_MkTimeoutE_ToString ( const enum MkTimeoutE type)

Definition at line 1377 of file LibMkKernel_tcl.c.

1378{
1379 switch (type) {
1380 case MK_TIMEOUT_INIT : return ot_fixstrobj("INIT" ) ;
1381 case MK_TIMEOUT_LONG : return ot_fixstrobj("LONG" ) ;
1382 case MK_TIMEOUT_NORMAL : return ot_fixstrobj("NORMAL" ) ;
1383 case MK_TIMEOUT_SHORT : return ot_fixstrobj("SHORT" ) ;
1384 case MK_TIMEOUT_SOCKET : return ot_fixstrobj("SOCKET" ) ;
1385 case MK_TIMEOUT_VERYSHORT : return ot_fixstrobj("VERYSHORT") ;
1386 case MK_TIMEOUT_DEFAULT : return ot_fixstrobj("DEFAULT" ) ;
1387 case MK_TIMEOUT_USER : return ot_fixstrobj("USER" ) ;
1388 case MK_TIMEOUT_MAX : return ot_fixstrobj("MAX" ) ;
1389 }
1390 return ot_fixstrobj("NOTHING");
1391}

◆ tclmkkernel_MkTypeE_ToString()

OT_OBJ_T tclmkkernel_MkTypeE_ToString ( const enum MkTypeE type)

Definition at line 1393 of file LibMkKernel_tcl.c.

1394{
1395 switch (type) {
1396 case MK_I8T : return ot_fixstrobj("I8T" ) ;
1397 case MK_BOLT : return ot_fixstrobj("BOLT") ;
1398 case MK_I16T : return ot_fixstrobj("I16T") ;
1399 case MK_I32T : return ot_fixstrobj("I32T") ;
1400 case MK_FLTT : return ot_fixstrobj("FLTT") ;
1401 case MK_I64T : return ot_fixstrobj("I64T") ;
1402 case MK_DBLT : return ot_fixstrobj("DBLT") ;
1403 case MK_BINT : return ot_fixstrobj("BINT") ;
1404 case MK_STRT : return ot_fixstrobj("STRT") ;
1405 case MK_LSTT : return ot_fixstrobj("LSTT") ;
1406 }
1407 return ot_fixstrobj("NOTHING");
1408}