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

MkBufferC - various functions to access buffer-dataMore...

+ Collaboration diagram for MkBufferC_Access_C_API:

Functions

MK_BUF MkBufferAppendSTR_RT (MK_RT mkrt, MK_BUF const buf, MK_STRN const val)
 append a single string to a MkBufferC object …
 
MK_BUF MkBufferAppendStringR_RT (MK_RT mkrt, MK_BUF const buf, MkStringR const val)
 append a single string to a MkBufferC object …
 
MK_I32 MkBufferAppendVL_RT (MK_RT mkrt, MK_BUF const buf, MK_FST const printfmt, va_list var_list)
 append a single string with format and var_list arguments to a MkBuffer64S
 
MK_I32 MkBufferAppendV_RT (MK_RT mkrt, MK_BUF const buf, MK_FST const printfmt,...)
 append a single string with format and ... arguments to a MkBuffer64S
 
MK_NUM MkBufferPush_RT (MK_RT mkrt, MK_BUF const buf, MK_STRN const val)
 add str to the MkBufferC
 
MK_NUM MkBufferPop_RT (MK_RT mkrt, MK_BUF const buf, MK_STRN const val)
 delete str from the MkBufferC
 
enum MkErrorE MkBufferToObject_RT (MK_RT mkrt, MK_BUF const buf, MK_NAT_OBJECT *obj_out)
 return the native language object from a MkBufferC
 

MkBufferC - MkBufferC_Access_C_API - overload

#define MkBufferAppendSTR_NULL(...)
 
#define MkBufferAppendSTR(...)
 
#define MkBufferAppendStringR_NULL(...)
 
#define MkBufferAppendStringR(...)
 
#define MkBufferAppendV_NULL(...)
 
#define MkBufferAppendV(...)
 
#define MkBufferAppendVL_NULL(...)
 
#define MkBufferAppendVL(...)
 
#define MkBufferPop_NULL(...)
 
#define MkBufferPop(...)
 
#define MkBufferPush_NULL(...)
 
#define MkBufferPush(...)
 
#define MkBufferToObject_NULL(...)
 
#define MkBufferToObject(...)
 
#define MkBufferToObject_E(...)
 
#define MkBufferToObject_C(...)
 
#define MkBufferToObject_e(...)
 

Detailed Description

MkBufferC - various functions to access buffer-data

Macro Definition Documentation

◆ MkBufferAppendSTR

#define MkBufferAppendSTR ( ...)
Value:
MK_BUF MkBufferAppendSTR_RT(MK_RT mkrt, MK_BUF const buf, MK_STRN const val)
append a single string to a MkBufferC object …
#define MK_RT_CALL

Definition at line 24 of file kernel_overload_mk.h.

◆ MkBufferAppendSTR_NULL

#define MkBufferAppendSTR_NULL ( ...)
Value:
#define MK_RT_CALL_NULL

Definition at line 23 of file kernel_overload_mk.h.

◆ MkBufferAppendStringR

#define MkBufferAppendStringR ( ...)
Value:
MK_BUF MkBufferAppendStringR_RT(MK_RT mkrt, MK_BUF const buf, MkStringR const val)
append a single string to a MkBufferC object …

Definition at line 26 of file kernel_overload_mk.h.

◆ MkBufferAppendStringR_NULL

#define MkBufferAppendStringR_NULL ( ...)
Value:

Definition at line 25 of file kernel_overload_mk.h.

◆ MkBufferAppendV

#define MkBufferAppendV ( ...)
Value:
MK_I32 MkBufferAppendV_RT(MK_RT mkrt, MK_BUF const buf, MK_FST const printfmt,...)
append a single string with format and ... arguments to a MkBuffer64S …

Definition at line 30 of file kernel_overload_mk.h.

◆ MkBufferAppendV_NULL

#define MkBufferAppendV_NULL ( ...)
Value:

Definition at line 29 of file kernel_overload_mk.h.

◆ MkBufferAppendVL

#define MkBufferAppendVL ( ...)
Value:
MK_I32 MkBufferAppendVL_RT(MK_RT mkrt, MK_BUF const buf, MK_FST const printfmt, va_list var_list)
append a single string with format and var_list arguments to a MkBuffer64S …

Definition at line 32 of file kernel_overload_mk.h.

◆ MkBufferAppendVL_NULL

#define MkBufferAppendVL_NULL ( ...)
Value:

Definition at line 31 of file kernel_overload_mk.h.

◆ MkBufferPop

#define MkBufferPop ( ...)
Value:
MK_NUM MkBufferPop_RT(MK_RT mkrt, MK_BUF const buf, MK_STRN const val)
delete str from the MkBufferC …

Definition at line 34 of file kernel_overload_mk.h.

◆ MkBufferPop_NULL

#define MkBufferPop_NULL ( ...)
Value:

Definition at line 33 of file kernel_overload_mk.h.

◆ MkBufferPush

#define MkBufferPush ( ...)
Value:
MK_NUM MkBufferPush_RT(MK_RT mkrt, MK_BUF const buf, MK_STRN const val)
add str to the MkBufferC …

Definition at line 36 of file kernel_overload_mk.h.

◆ MkBufferPush_NULL

#define MkBufferPush_NULL ( ...)
Value:

Definition at line 35 of file kernel_overload_mk.h.

◆ MkBufferToObject

#define MkBufferToObject ( ...)
Value:
enum MkErrorE MkBufferToObject_RT(MK_RT mkrt, MK_BUF const buf, MK_NAT_OBJECT *obj_out)
return the native language object from a MkBufferC …

Definition at line 40 of file kernel_overload_mk.h.

◆ MkBufferToObject_C

#define MkBufferToObject_C ( ...)
Value:
if (MkErrorCheckI(MkBufferToObject(__VA_ARGS__)))
#define MkErrorCheckI(err)
#define MkBufferToObject(...)

Definition at line 42 of file kernel_overload_mk.h.

◆ MkBufferToObject_E

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

Definition at line 41 of file kernel_overload_mk.h.

◆ MkBufferToObject_e

#define MkBufferToObject_e ( ...)
Value:
MK_EMBEDDED(MK_NAT_OBJECT,MkBufferToObject,__VA_ARGS__)
void * MK_NAT_OBJECT

Definition at line 43 of file kernel_overload_mk.h.

◆ MkBufferToObject_NULL

#define MkBufferToObject_NULL ( ...)
Value:

Definition at line 39 of file kernel_overload_mk.h.

Function Documentation

◆ MkBufferAppendSTR_RT()

MK_BUF MkBufferAppendSTR_RT ( MK_RT mkrt,
MK_BUF const buf,
MK_STRN const val )

append a single string to a MkBufferC object …

Parameters
[in]mkrtthe MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only)
[in]bufthe MkBufferS instance to work on
[in]valthe text to append to buf
Returns
the MkBufferC object with the new value

Example from server.c read and update a MkBufferC

      // START - ReadBUF - Example, read a buffer-object and append a string 
      MK_BUF buf;
      MqReadBUF_E (mqctx,&buf);
      MkBufferAppendSTR(buf,"- a really log text to overwrite the already allocated space");
      MqSendBUF_E (mqctx,buf);
      MqReadI32_E (mqctx,&i);
      MqSendI32_E (mqctx,i+1);
      // END - ReadBUF - Example

◆ MkBufferAppendStringR_RT()

MK_BUF MkBufferAppendStringR_RT ( MK_RT mkrt,
MK_BUF const buf,
MkStringR const val )

append a single string to a MkBufferC object …

Parameters
[in]mkrtthe MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only)
[in]bufthe MkBufferS instance to work on
[in]valthe text to append to buf
Returns
the MkBufferC object with the new value

Example from server.c read and update a MkBufferC

      // START - ReadBUF - Example, read a buffer-object and append a string 
      MK_BUF buf;
      MqReadBUF_E (mqctx,&buf);
      MkBufferAppendSTR(buf,"- a really log text to overwrite the already allocated space");
      MqSendBUF_E (mqctx,buf);
      MqReadI32_E (mqctx,&i);
      MqSendI32_E (mqctx,i+1);
      // END - ReadBUF - Example

◆ MkBufferAppendV_RT()

MK_I32 MkBufferAppendV_RT ( MK_RT mkrt,
MK_BUF const buf,
MK_FST const printfmt,
... )

append a single string with format and ... arguments to a MkBuffer64S

Parameters
[in]mkrtthe MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only)
[in]bufthe MkBufferS instance to work on
[in]printfmtis a c-string used as printf like format string
Returns
the size of the string appended to the MkBuffer64S object

◆ MkBufferAppendVL_RT()

MK_I32 MkBufferAppendVL_RT ( MK_RT mkrt,
MK_BUF const buf,
MK_FST const printfmt,
va_list var_list )

append a single string with format and var_list arguments to a MkBuffer64S

Parameters
[in]mkrtthe MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only)
[in]bufthe MkBufferS instance to work on
[in]printfmtis a c-string used as printf like format string
[in]var_lista variable argument list object
Returns
the size of the string appended to the MkBuffer64S object

◆ MkBufferPop_RT()

MK_NUM MkBufferPop_RT ( MK_RT mkrt,
MK_BUF const buf,
MK_STRN const val )

delete str from the MkBufferC

Parameters
[in]mkrtthe MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only)
[in]bufthe MkBufferS instance to work on
valthe text (string) to remove from buf
Returns
the size of the string removed from the MkBuffer64S object
Attention
MkBufferC have to be of type MK_STRT

◆ MkBufferPush_RT()

MK_NUM MkBufferPush_RT ( MK_RT mkrt,
MK_BUF const buf,
MK_STRN const val )

add str to the MkBufferC

Parameters
[in]mkrtthe MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only)
[in]bufthe MkBufferS instance to work on
valthe text (string) to append to buf
Returns
the size of the string appended to the MkBuffer64S object
Attention
MkBufferC have to be of type MK_STRT

◆ MkBufferToObject_RT()

enum MkErrorE MkBufferToObject_RT ( MK_RT mkrt,
MK_BUF const buf,
MK_NAT_OBJECT * obj_out )

return the native language object from a MkBufferC