theKernel 10.0 NHI1 - theKernel - theLink - theConfig - theSq3Lite - theCompiler - theBrain - theGuard
c - tcl - py - rb - jv - cc
Loading...
Searching...
No Matches
MkKernel_Enum_C_API

MkKernel PACKAGE - enum definition … More...

+ Collaboration diagram for MkKernel_Enum_C_API:

MkErrorE

enum  MkErrorE { MK_OK = 0 , MK_CONTINUE = 1 , MK_ERROR = 2 }
 collection for the different error-codes … More...
 
MK_EXTERN MK_STRN MkErrorE_ToString (enum MkErrorE value)
 return the MkErrorE as string …
 
MK_I32 MkErrorE_ToInt (enum MkErrorE value)
 return the MkErrorE as integer …
 
MK_EXTERN enum MkErrorE MkErrorE_FromInt (MK_I32 const value, enum MkErrorE *value_out)
 return the MkErrorE from integer …
 

MkTimeoutE

enum  MkTimeoutE {
  MK_TIMEOUT_INIT = META_TIMEOUT_REF , MK_TIMEOUT_LONG = (META_TIMEOUT_REF/5) , MK_TIMEOUT_NORMAL = (META_TIMEOUT_REF/10 < 1 ? 1 : META_TIMEOUT_REF/10) , MK_TIMEOUT_SHORT = (META_TIMEOUT_REF/45 < 1 ? 1 : META_TIMEOUT_REF/45) ,
  MK_TIMEOUT_SOCKET = (META_TIMEOUT_REF/90 < 1 ? 1 : META_TIMEOUT_REF/90) , MK_TIMEOUT_VERYSHORT = (META_TIMEOUT_REF/180 < 1 ? 1 : META_TIMEOUT_REF/180) , MK_TIMEOUT_DEFAULT = -1 , MK_TIMEOUT_USER = -2 ,
  MK_TIMEOUT_MAX = -3
}
 Predefined Timeout values … More...
 
MK_EXTERN MK_STRN MkTimeoutE_ToString (enum MkTimeoutE value)
 return the MkTimeoutE as string …
 
MK_I32 MkTimeoutE_ToInt (enum MkTimeoutE value)
 return the MkTimeoutE as integer …
 
MK_EXTERN enum MkErrorE MkTimeoutE_FromInt (MK_I32 const value, enum MkTimeoutE *value_out)
 return the MkTimeoutE from integer …
 

MkBoolE

enum  MkBoolE { MK_NO = 0 , MK_YES = 1 }
 the internal boolean … More...
 
MK_EXTERN MK_STRN MkBoolE_ToString (enum MkBoolE value)
 return the MkBoolE as string …
 
MK_I32 MkBoolE_ToInt (enum MkBoolE value)
 return the MkBoolE as integer …
 
MK_EXTERN enum MkErrorE MkBoolE_FromInt (MK_I32 const value, enum MkBoolE *value_out)
 return the MkBoolE from integer …
 

MkNativeIsE

enum  MkNativeIsE { MK_NATIVE_IS_INITIAL = 0 , MK_NATIVE_IS_STRING = 'S' , MK_NATIVE_IS_LITTLE = 'L' , MK_NATIVE_IS_BIG = 'B' }
 define if data is string or little or big endian … More...
 
MK_EXTERN MK_STRN MkNativeIsE_ToString (enum MkNativeIsE value)
 return the MkNativeIsE as string …
 
MK_I32 MkNativeIsE_ToInt (enum MkNativeIsE value)
 return the MkNativeIsE as integer …
 
MK_EXTERN enum MkErrorE MkNativeIsE_FromInt (MK_I32 const value, enum MkNativeIsE *value_out)
 return the MkNativeIsE from integer …
 

MkTypeE

enum  MkTypeE {
  MK_I8T = ((1 << MK_TYPE_SHIFT) | MK_TYPE_IS_1_I8E ) , MK_BOLT = ((2 << MK_TYPE_SHIFT) | MK_TYPE_IS_1_I8E ) , MK_I16T = ((3 << MK_TYPE_SHIFT) | MK_TYPE_IS_2_I8E ) , MK_I32T = ((4 << MK_TYPE_SHIFT) | MK_TYPE_IS_4_I8E ) ,
  MK_FLTT = ((5 << MK_TYPE_SHIFT) | MK_TYPE_IS_4_I8E ) , MK_I64T = ((6 << MK_TYPE_SHIFT) | MK_TYPE_IS_8_I8E ) , MK_DBLT = ((7 << MK_TYPE_SHIFT) | MK_TYPE_IS_8_I8E ) , MK_BINT = ((8 << MK_TYPE_SHIFT) ) ,
  MK_STRT = ((9 << MK_TYPE_SHIFT) ) , MK_LSTT = ((10 << MK_TYPE_SHIFT) )
}
 basic data-types supported by Programming-Language-Micro-Kernel (PLMK)More...
 
MK_EXTERN MK_STRN MkTypeE_ToString (enum MkTypeE value)
 return the MkTypeE as string …
 
MK_I32 MkTypeE_ToInt (enum MkTypeE value)
 return the MkTypeE as integer …
 
MK_EXTERN enum MkErrorE MkTypeE_FromInt (MK_I32 const value, enum MkTypeE *value_out)
 return the MkTypeE from integer …
 
#define MK_TYPE_IS_1_I8E   (1<<0)
 the type is native and has a size of 1 byte …
 
#define MK_TYPE_IS_2_I8E   (1<<1)
 the type is native and has a size of 2 bytes …
 
#define MK_TYPE_IS_4_I8E   (1<<2)
 the type is native and has a size of 4 bytes …
 
#define MK_TYPE_IS_8_I8E   (1<<3)
 the type is native and has a size of 8 bytes …
 
#define MK_TYPE_IS_NATIVE
 the type is native …
 
#define MK_TYPE_SHIFT   4
 FIXED: type is only 8bit -> 4 bit=15 for type and 4 bit for flag …
 

MkKernel - MkKernel_Enum_C_API - function

MK_EXTERN MK_I32 MkErrorE_ToIntP (enum MkErrorE value)
 Non-inline replacement for MkErrorE_ToInt
 
MK_EXTERN MK_I32 MkTimeoutE_ToIntP (enum MkTimeoutE value)
 Non-inline replacement for MkTimeoutE_ToInt
 
MK_EXTERN MK_I32 MkTypeE_ToIntP (enum MkTypeE value)
 Non-inline replacement for MkTypeE_ToInt
 

MkKernel - MkKernel_Enum_C_API - overload

#define MkBoolE_FromInt_E(...)
 
#define MkBoolE_FromInt_C(...)
 
#define MkBoolE_FromInt_e(...)
 
#define MkErrorE_FromInt_E(...)
 
#define MkErrorE_FromInt_C(...)
 
#define MkErrorE_FromInt_e(...)
 
#define MkNativeIsE_FromInt_E(...)
 
#define MkNativeIsE_FromInt_C(...)
 
#define MkNativeIsE_FromInt_e(...)
 
#define MkTimeoutE_FromInt_E(...)
 
#define MkTimeoutE_FromInt_C(...)
 
#define MkTimeoutE_FromInt_e(...)
 
#define MkTypeE_FromInt_E(...)
 
#define MkTypeE_FromInt_C(...)
 
#define MkTypeE_FromInt_e(...)
 

Detailed Description

MkKernel PACKAGE - enum definition …

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).

Macro Definition Documentation

◆ MK_TYPE_IS_1_I8E

#define MK_TYPE_IS_1_I8E   (1<<0)

the type is native and has a size of 1 byte …

Definition at line 1896 of file LibMkKernel_mk.h.

◆ MK_TYPE_IS_2_I8E

#define MK_TYPE_IS_2_I8E   (1<<1)

the type is native and has a size of 2 bytes …

Definition at line 1899 of file LibMkKernel_mk.h.

◆ MK_TYPE_IS_4_I8E

#define MK_TYPE_IS_4_I8E   (1<<2)

the type is native and has a size of 4 bytes …

Definition at line 1902 of file LibMkKernel_mk.h.

◆ MK_TYPE_IS_8_I8E

#define MK_TYPE_IS_8_I8E   (1<<3)

the type is native and has a size of 8 bytes …

Definition at line 1905 of file LibMkKernel_mk.h.

◆ MK_TYPE_IS_NATIVE

#define MK_TYPE_IS_NATIVE
Value:
#define MK_TYPE_IS_1_I8E
the type is native and has a size of 1 byte …
#define MK_TYPE_IS_2_I8E
the type is native and has a size of 2 bytes …
#define MK_TYPE_IS_8_I8E
the type is native and has a size of 8 bytes …
#define MK_TYPE_IS_4_I8E
the type is native and has a size of 4 bytes …

the type is native …

Definition at line 1908 of file LibMkKernel_mk.h.

1908#define MK_TYPE_IS_NATIVE ( MK_TYPE_IS_1_I8E | MK_TYPE_IS_2_I8E | \
1909 MK_TYPE_IS_4_I8E | MK_TYPE_IS_8_I8E )

◆ MK_TYPE_SHIFT

#define MK_TYPE_SHIFT   4

FIXED: type is only 8bit -> 4 bit=15 for type and 4 bit for flag …

Definition at line 1912 of file LibMkKernel_mk.h.

◆ MkBoolE_FromInt_C

#define MkBoolE_FromInt_C ( ...)
Value:
if (MkErrorCheckI(MkBoolE_FromInt(__VA_ARGS__)))
#define MkErrorCheckI(err)
MK_EXTERN enum MkErrorE MkBoolE_FromInt(MK_I32 const value, enum MkBoolE *value_out)
return the MkBoolE from integer …

Definition at line 1333 of file kernel_overload_mk.h.

◆ MkBoolE_FromInt_E

#define MkBoolE_FromInt_E ( ...)
Value:
#define MkErrorCheck(err)
check return-code and goto error on error …

Definition at line 1332 of file kernel_overload_mk.h.

◆ MkBoolE_FromInt_e

#define MkBoolE_FromInt_e ( ...)
Value:
MkBoolE
the internal boolean …
#define MK_EMBEDDED(type, call,...)
macro to create "embedded" (*_e) Version of C-API call's

Definition at line 1334 of file kernel_overload_mk.h.

◆ MkErrorE_FromInt_C

#define MkErrorE_FromInt_C ( ...)
Value:
if (MkErrorCheckI(MkErrorE_FromInt(__VA_ARGS__)))
MK_EXTERN enum MkErrorE MkErrorE_FromInt(MK_I32 const value, enum MkErrorE *value_out)
return the MkErrorE from integer …

Definition at line 1336 of file kernel_overload_mk.h.

◆ MkErrorE_FromInt_E

#define MkErrorE_FromInt_E ( ...)
Value:

Definition at line 1335 of file kernel_overload_mk.h.

◆ MkErrorE_FromInt_e

#define MkErrorE_FromInt_e ( ...)
Value:
MkErrorE
collection for the different error-codes …

Definition at line 1337 of file kernel_overload_mk.h.

◆ MkNativeIsE_FromInt_C

#define MkNativeIsE_FromInt_C ( ...)
Value:
MK_EXTERN enum MkErrorE MkNativeIsE_FromInt(MK_I32 const value, enum MkNativeIsE *value_out)
return the MkNativeIsE from integer …

Definition at line 1339 of file kernel_overload_mk.h.

◆ MkNativeIsE_FromInt_E

#define MkNativeIsE_FromInt_E ( ...)
Value:

Definition at line 1338 of file kernel_overload_mk.h.

◆ MkNativeIsE_FromInt_e

#define MkNativeIsE_FromInt_e ( ...)
Value:
MkNativeIsE
define if data is string or little or big endian …

Definition at line 1340 of file kernel_overload_mk.h.

◆ MkTimeoutE_FromInt_C

#define MkTimeoutE_FromInt_C ( ...)
Value:
MK_EXTERN enum MkErrorE MkTimeoutE_FromInt(MK_I32 const value, enum MkTimeoutE *value_out)
return the MkTimeoutE from integer …

Definition at line 1342 of file kernel_overload_mk.h.

◆ MkTimeoutE_FromInt_E

#define MkTimeoutE_FromInt_E ( ...)
Value:

Definition at line 1341 of file kernel_overload_mk.h.

◆ MkTimeoutE_FromInt_e

#define MkTimeoutE_FromInt_e ( ...)
Value:
MkTimeoutE
Predefined Timeout values …

Definition at line 1343 of file kernel_overload_mk.h.

◆ MkTypeE_FromInt_C

#define MkTypeE_FromInt_C ( ...)
Value:
if (MkErrorCheckI(MkTypeE_FromInt(__VA_ARGS__)))
MK_EXTERN enum MkErrorE MkTypeE_FromInt(MK_I32 const value, enum MkTypeE *value_out)
return the MkTypeE from integer …

Definition at line 1345 of file kernel_overload_mk.h.

◆ MkTypeE_FromInt_E

#define MkTypeE_FromInt_E ( ...)
Value:

Definition at line 1344 of file kernel_overload_mk.h.

◆ MkTypeE_FromInt_e

#define MkTypeE_FromInt_e ( ...)
Value:
MkTypeE
basic data-types supported by Programming-Language-Micro-Kernel (PLMK) …

Definition at line 1346 of file kernel_overload_mk.h.

Enumeration Type Documentation

◆ MkBoolE

enum MkBoolE

the internal boolean …

Enumerator
MK_NO 

boolean NO

MK_YES 

boolean YES

Definition at line 1821 of file LibMkKernel_mk.h.

1821 {
1822 MK_NO = 0,
1823 MK_YES = 1,
1824};
@ MK_YES
boolean YES
@ MK_NO
boolean NO

◆ MkErrorE

enum MkErrorE

collection for the different error-codes …

This is the default-error-indicator and the return-value from near all Programming-Language-Micro-Kernel (PLMK) functions.

enum MkErrorE {
MK_OK = 0,
MK_ERROR = 2,
};
Enumerator
MK_OK 

(persistent) everything is OK.

MK_CONTINUE 

(transient) raise an continue-event, the calling-function must handle this.

MK_ERROR 

(persistent) raise an error-event, the calling-fucntion is interrupted.

Definition at line 1723 of file LibMkKernel_mk.h.

1723 {
1724 MK_OK = 0,
1725 MK_CONTINUE = 1,
1726 MK_ERROR = 2,
1727};
@ 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.

◆ MkNativeIsE

define if data is string or little or big endian …

Enumerator
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.

Definition at line 1859 of file LibMkKernel_mk.h.

1859 {
1861 MK_NATIVE_IS_STRING = 'S',
1862 MK_NATIVE_IS_LITTLE = 'L',
1863 MK_NATIVE_IS_BIG = 'B',
1864};
@ 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.

◆ MkTimeoutE

enum MkTimeoutE

Predefined Timeout values …

The MkTimeoutE is used wherever a "timeout" is required. As a special feature, in addition to the defined values in MkTimeoutE, freely defined values as integers as seconds are also accepted.

Enumerator
MK_TIMEOUT_INIT 

maximum timeout in sec (900 sec) …

MK_TIMEOUT_LONG 

long timeout in sec (180 sec) …

MK_TIMEOUT_NORMAL 

normal timeout in sec (90 sec) …

MK_TIMEOUT_SHORT 

short timeout in sec (20 sec) …

MK_TIMEOUT_SOCKET 

shorter timeout in sec (10 sec) … This TIMEOUT is used for socket connection with 'connect'

MK_TIMEOUT_VERYSHORT 

very short timeout in sec (5 sec) …

MK_TIMEOUT_DEFAULT 

request the default timeout value …

MK_TIMEOUT_USER 

request the user defined timeout value from the –timeout configuration value …

MK_TIMEOUT_MAX 

request the maximum possible (infinite) timeout value …

Definition at line 1769 of file LibMkKernel_mk.h.

1769 {
1784 MK_TIMEOUT_DEFAULT = -1,
1786 MK_TIMEOUT_USER = -2,
1788 MK_TIMEOUT_MAX = -3,
1789};
#define META_TIMEOUT_REF
@ 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 …

◆ MkTypeE

enum MkTypeE

basic data-types supported by Programming-Language-Micro-Kernel (PLMK)

See also
MkTypeE_ToString, MkTypeE_ToInt, MkTypeE_FromInt, BufferGetType2, BufferCastTo, BufferStreamReadGetNextType
Enumerator
MK_I8T 

Y: 1 byte 'byte' type.

MK_BOLT 

O: 1 byte 'boolean' type.

MK_I16T 

S: 2 byte 'short' type.

MK_I32T 

I: 4 byte 'int' type.

MK_FLTT 

F: 4 byte 'float' type.

MK_I64T 

W: 8 byte 'long long int' type.

MK_DBLT 

D: 8 byte 'double' type.

MK_BINT 

B: X byte 'byte-array' type.

MK_STRT 

C: X byte 'string' type (e.g. with a \0 at the end)

MK_LSTT 

L: X byte 'list' type.

Definition at line 1922 of file LibMkKernel_mk.h.

1922 {
1923 MK_I8T = ((1 << MK_TYPE_SHIFT) | MK_TYPE_IS_1_I8E ),
1924 MK_BOLT = ((2 << MK_TYPE_SHIFT) | MK_TYPE_IS_1_I8E ),
1925 MK_I16T = ((3 << MK_TYPE_SHIFT) | MK_TYPE_IS_2_I8E ),
1926 MK_I32T = ((4 << MK_TYPE_SHIFT) | MK_TYPE_IS_4_I8E ),
1927 MK_FLTT = ((5 << MK_TYPE_SHIFT) | MK_TYPE_IS_4_I8E ),
1928 MK_I64T = ((6 << MK_TYPE_SHIFT) | MK_TYPE_IS_8_I8E ),
1929 MK_DBLT = ((7 << MK_TYPE_SHIFT) | MK_TYPE_IS_8_I8E ),
1930 MK_BINT = ((8 << MK_TYPE_SHIFT) ),
1931 MK_STRT = ((9 << MK_TYPE_SHIFT) ),
1932 MK_LSTT = ((10 << MK_TYPE_SHIFT) ),
1933};
#define MK_TYPE_SHIFT
FIXED: type is only 8bit -> 4 bit=15 for type and 4 bit for flag …
@ 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.

Function Documentation

◆ MkBoolE_FromInt()

MK_EXTERN enum MkErrorE MkBoolE_FromInt ( MK_I32 const value,
enum MkBoolE * value_out )

return the MkBoolE from integer …

◆ MkBoolE_ToInt()

MK_I32 MkBoolE_ToInt ( enum MkBoolE value)
inline

return the MkBoolE as integer …

Definition at line 1837 of file LibMkKernel_mk.h.

1837 {
1838 return (MK_I32) value;
1839}
signed int MK_I32
4 byte integer data-type

◆ MkBoolE_ToString()

MK_EXTERN MK_STRN MkBoolE_ToString ( enum MkBoolE value)

return the MkBoolE as string …

◆ MkErrorE_FromInt()

MK_EXTERN enum MkErrorE MkErrorE_FromInt ( MK_I32 const value,
enum MkErrorE * value_out )

return the MkErrorE from integer …

◆ MkErrorE_ToInt()

MK_I32 MkErrorE_ToInt ( enum MkErrorE value)
inline

return the MkErrorE as integer …

Definition at line 1741 of file LibMkKernel_mk.h.

1741 {
1742 return (MK_I32) value;
1743}

◆ MkErrorE_ToIntP()

MK_EXTERN MK_I32 MkErrorE_ToIntP ( enum MkErrorE value)

Non-inline replacement for MkErrorE_ToInt

◆ MkErrorE_ToString()

MK_EXTERN MK_STRN MkErrorE_ToString ( enum MkErrorE value)

return the MkErrorE as string …

◆ MkNativeIsE_FromInt()

MK_EXTERN enum MkErrorE MkNativeIsE_FromInt ( MK_I32 const value,
enum MkNativeIsE * value_out )

return the MkNativeIsE from integer …

◆ MkNativeIsE_ToInt()

MK_I32 MkNativeIsE_ToInt ( enum MkNativeIsE value)
inline

return the MkNativeIsE as integer …

Definition at line 1878 of file LibMkKernel_mk.h.

1878 {
1879 return (MK_I32) value;
1880}

◆ MkNativeIsE_ToString()

MK_EXTERN MK_STRN MkNativeIsE_ToString ( enum MkNativeIsE value)

return the MkNativeIsE as string …

◆ MkTimeoutE_FromInt()

MK_EXTERN enum MkErrorE MkTimeoutE_FromInt ( MK_I32 const value,
enum MkTimeoutE * value_out )

return the MkTimeoutE from integer …

◆ MkTimeoutE_ToInt()

MK_I32 MkTimeoutE_ToInt ( enum MkTimeoutE value)
inline

return the MkTimeoutE as integer …

Definition at line 1803 of file LibMkKernel_mk.h.

1803 {
1804 return (MK_I32) value;
1805}

◆ MkTimeoutE_ToIntP()

MK_EXTERN MK_I32 MkTimeoutE_ToIntP ( enum MkTimeoutE value)

Non-inline replacement for MkTimeoutE_ToInt

◆ MkTimeoutE_ToString()

MK_EXTERN MK_STRN MkTimeoutE_ToString ( enum MkTimeoutE value)

return the MkTimeoutE as string …

◆ MkTypeE_FromInt()

MK_EXTERN enum MkErrorE MkTypeE_FromInt ( MK_I32 const value,
enum MkTypeE * value_out )

return the MkTypeE from integer …

◆ MkTypeE_ToInt()

MK_I32 MkTypeE_ToInt ( enum MkTypeE value)
inline

return the MkTypeE as integer …

Definition at line 1947 of file LibMkKernel_mk.h.

1947 {
1948 return (MK_I32) value;
1949}

◆ MkTypeE_ToIntP()

MK_EXTERN MK_I32 MkTypeE_ToIntP ( enum MkTypeE value)

Non-inline replacement for MkTypeE_ToInt

◆ MkTypeE_ToString()

MK_EXTERN MK_STRN MkTypeE_ToString ( enum MkTypeE value)

return the MkTypeE as string …