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

MkBufferC - the abstract class known as buf or buffer is used to create and manage dynamic, generic, mixed typed data. … More...

+ Collaboration diagram for MkBufferC_C_API:

Topics

 MkBuffer64C
 MkBuffer64S - the final class of abstract class MkBufferC with 64 byte ILS-Size
 
 MkBuffer256C
 MkBuffer256S - the final class of abstract class MkBufferC with 256 byte ILS-Size
 
 MkBuffer1024C
 MkBuffer1024S - the final class of abstract class MkBufferC with 1024 byte ILS-Size
 
 MkBufferC_Class_C_API
 MkBufferC - define the class …
 
 MkBufferC_TOR_C_API
 MkBufferC - various functions to create, initialize and destroy a MkBufferC
 
 MkBufferC_Get_C_API
 MkBufferC - various functions to get buffer-data
 
 MkBufferC_Set_C_API
 MkBufferC - various functions to set buffer-data
 
 MkBufferC_Info_C_API
 MkBufferC - various functions to get information out of buffer-data
 
 MkBufferC_Access_C_API
 MkBufferC - various functions to access buffer-data
 
 MkBufferC_Misc_C_API
 MkBufferC - various functions to work on buffer-data
 

Classes

struct  libmkkernel::MkBufferS
 The ABSTRACT-CLASS used to store a native-type-data-item defined by PRIMITIVE TYPEMore...
 

Macros

#define MkBufferS_ils_size   (0)
 64 bytes I)instance L)ocal S)torage - the memory that adds the final-class to the abstract-class.
 

MkString2TT

Function used to convert a string into a ccmkkernel native type …

MK_EXTERN enum MkErrorE libmkkernel::MkString2BOL_RT (MK_RT mkrt, MK_STRN const str, MK_NUM const length, MK_BOL *val_out)
 convert a string into a native
 
MK_EXTERN enum MkErrorE libmkkernel::MkString2I8_RT (MK_RT mkrt, MK_STRN const str, MK_NUM const length, MK_I8 *val_out)
 
MK_EXTERN enum MkErrorE libmkkernel::MkString2I16_RT (MK_RT mkrt, MK_STRN const str, MK_NUM const length, MK_I16 *val_out)
 
MK_EXTERN enum MkErrorE libmkkernel::MkString2U16_RT (MK_RT mkrt, MK_STRN const str, MK_NUM const length, MK_U16 *val_out)
 
MK_EXTERN enum MkErrorE libmkkernel::MkString2I32_RT (MK_RT mkrt, MK_STRN const str, MK_NUM const length, MK_I32 *val_out)
 
MK_EXTERN enum MkErrorE libmkkernel::MkString2U32_RT (MK_RT mkrt, MK_STRN const str, MK_NUM const length, MK_U32 *val_out)
 
MK_EXTERN enum MkErrorE libmkkernel::MkString2I64_RT (MK_RT mkrt, MK_STRN const str, MK_NUM const length, MK_I64 *val_out)
 
MK_EXTERN enum MkErrorE libmkkernel::MkString2FLT_RT (MK_RT mkrt, MK_STRN const str, MK_NUM const length, MK_FLT *val_out)
 
MK_EXTERN enum MkErrorE libmkkernel::MkString2DBL_RT (MK_RT mkrt, MK_STRN const str, MK_NUM const length, MK_DBL *val_out)
 
MK_EXTERN enum MkErrorE libmkkernel::MkString2LONG_RT (MK_RT mkrt, MK_STRN const str, MK_NUM const length, MK_LONG *val_out)
 
MK_EXTERN enum MkErrorE libmkkernel::MkString2BOOL_RT (MK_RT mkrt, MK_STRN const str, MK_NUM const length, MK_BOOL *val_out)
 
MK_EXTERN enum MkErrorE libmkkernel::MkString2ATO_RT (MK_RT mkrt, MK_STRN const str, MK_NUM const length, enum MkTypeE type, MK_ATO *val_out)
 
MK_EXTERN enum MkErrorE libmkkernel::MkString2HDL_RT (MK_RT mkrt, MK_STRN const str, MK_NUM const length, MK_HDL *val_out)
 
#define MkString2O(s, l, r)
 
#define MkString2Y(s, l, r)
 
#define MkString2S(s, l, r)
 
#define MkString2US(s, l, r)
 
#define MkString2I(s, l, r)
 
#define MkString2UI(s, l, r)
 
#define MkString2W(s, l, r)
 
#define MkString2F(s, l, r)
 
#define MkString2D(s, l, r)
 

MkBuf2TTfast

MkBufferC - get a native PRIMITIVE TYPE from the MkBufferS

Attention
these function is only required in an non-alignment environment …
#define MkBuf2XXXfast(buf)
 
#define MkBuf2BOLfast(buf)
 
#define MkBuf2I8fast(buf)
 
#define MkBuf2I16fast(buf)
 
#define MkBuf2I32fast(buf)
 
#define MkBuf2I64fast(buf)
 
#define MkBuf2FLTfast(buf)
 
#define MkBuf2DBLfast(buf)
 

MkBuf2TT

get a native PRIMITIVE TYPE from a non-aligned MkBufferC

the alligned would be: ((*buf->storage.first.A).?)

#define MkBuf2XXX(xxx, len, buf)
 
#define MkBuf2BOL(buf)
 
#define MkBuf2I8(buf)
 
#define MkBuf2I16(buf)
 
#define MkBuf2I32(buf)
 
#define MkBuf2I64(buf)
 
#define MkBuf2FLT(buf)
 
#define MkBuf2DBL(buf)
 
#define MkBuf2Ptr(len, ptr, buf)
 
#define MkBuf2BOL_P(ptr, buf)
 
#define MkBuf2I8_P(ptr, buf)
 
#define MkBuf2I16_P(ptr, buf)
 
#define MkBuf2I32_P(ptr, buf)
 
#define MkBuf2I64_P(ptr, buf)
 
#define MkBuf2FLT_P(ptr, buf)
 
#define MkBuf2DBL_P(ptr, buf)
 
#define MkBuf2Ptr_A(l, a, b)
 
#define MkBuf2BOL_A(ato, buf)
 
#define MkBuf2I8_A(ato, buf)
 
#define MkBuf2I16_A(ato, buf)
 
#define MkBuf2I32_A(ato, buf)
 
#define MkBuf2I64_A(ato, buf)
 
#define MkBuf2FLT_A(ato, buf)
 
#define MkBuf2DBL_A(ato, buf)
 

Detailed Description

MkBufferC - the abstract class known as buf or buffer is used to create and manage dynamic, generic, mixed typed data. …

The MkBufferC is used to store PRIMITIVE TYPE data. If ccmkkernel is working on data… ccmkkernel is working on an MkBufferC object or on a list of MkBufferC objects called MkBufferListC.

MkBufferC* CLASS

The ABSTRACT-CLASS used to store a native-type-data-item defined by PRIMITIVE TYPE

C-Kernel-Details

The ABSTRACT-CLASS MkBufferS is used to store MkTypeE data in an MkBufferS::storage

A new MkBufferS is always preallocated with the predefined ILS-storage (MkBufferS::ils_data), but can switch to a MALLOC-storage if the storage requirements of the user exceed the predefined MkBufferS::ilsS::size.

‍A MkBufferS never run out of storage.

The basic goal of the ILS-storage technology is to minimize the usage of MALLOC, this mean that the MkBufferS::ilsS::size should be large enought to be sufficient for the user needs.

The following conditions must always be met for the ILS memory:

The ABSTRACT-CLASS MkBufferS is missing the ILS-storage, the FINAL-CLASSES are:

MkBuffer64C, MkBuffer256C and MkBuffer1024C

See also
MkBufferListC, MkBufferStreamC

MkBufferC* CTOR / DTOR

command synonmym
[constructor,static] MkBufferC* MkBufferC::Create(MK_NUM size = 0) ccmkkernel::MkBufferC(MK_SIZE size = 0)
[destructor] buf.Delete() delete buf

Example from server.cc read a buffer-object and convert single-char-type-identifer to string.

      void BUF2 () {
	SendSTART();
	for (int i=0; i<3; i++) {
          // using a reference or a pointer to avoid a "copy", ReadBUF never return NULL
	  const MkBufferC& buf = *ReadBUF();
          // GetType3 is "const", return the type as "string"
	  SendSTR(buf.GetType3());
	  SendBUF(buf);
	}
	SendRETURN();
      }
See also
BufferGetType1 BufferGetType2 BufferGetType3

Macro Definition Documentation

◆ MkBuf2BOL

#define MkBuf2BOL ( buf)
Value:
MkBuf2XXX(BOL,1,buf)
#define MkBuf2XXX(xxx, len, buf)

Definition at line 5838 of file LibMkKernel_mk.h.

◆ MkBuf2BOL_A

#define MkBuf2BOL_A ( ato,
buf )
Value:
MkBuf2Ptr_A(1,ato,buf)
#define MkBuf2Ptr_A(l, a, b)

Definition at line 5856 of file LibMkKernel_mk.h.

◆ MkBuf2BOL_P

#define MkBuf2BOL_P ( ptr,
buf )
Value:
MkBuf2Ptr(1,ptr,buf)
#define MkBuf2Ptr(len, ptr, buf)

Definition at line 5847 of file LibMkKernel_mk.h.

◆ MkBuf2BOLfast

#define MkBuf2BOLfast ( buf)
Value:
MkBuf2XXXfast(buf).BOL
#define MkBuf2XXXfast(buf)

Definition at line 5821 of file LibMkKernel_mk.h.

◆ MkBuf2DBL

#define MkBuf2DBL ( buf)
Value:
MkBuf2XXX(DBL,8,buf)

Definition at line 5844 of file LibMkKernel_mk.h.

◆ MkBuf2DBL_A

#define MkBuf2DBL_A ( ato,
buf )
Value:
MkBuf2Ptr_A(8,ato,buf)

Definition at line 5862 of file LibMkKernel_mk.h.

◆ MkBuf2DBL_P

#define MkBuf2DBL_P ( ptr,
buf )
Value:
MkBuf2Ptr(8,ptr,buf)

Definition at line 5853 of file LibMkKernel_mk.h.

◆ MkBuf2DBLfast

#define MkBuf2DBLfast ( buf)
Value:
MkBuf2XXXfast(buf).DBL

Definition at line 5827 of file LibMkKernel_mk.h.

◆ MkBuf2FLT

#define MkBuf2FLT ( buf)
Value:
MkBuf2XXX(FLT,4,buf)

Definition at line 5843 of file LibMkKernel_mk.h.

◆ MkBuf2FLT_A

#define MkBuf2FLT_A ( ato,
buf )
Value:
MkBuf2Ptr_A(4,ato,buf)

Definition at line 5861 of file LibMkKernel_mk.h.

◆ MkBuf2FLT_P

#define MkBuf2FLT_P ( ptr,
buf )
Value:
MkBuf2Ptr(4,ptr,buf)

Definition at line 5852 of file LibMkKernel_mk.h.

◆ MkBuf2FLTfast

#define MkBuf2FLTfast ( buf)
Value:
MkBuf2XXXfast(buf).FLT

Definition at line 5826 of file LibMkKernel_mk.h.

◆ MkBuf2I16

#define MkBuf2I16 ( buf)
Value:
MkBuf2XXX(I16,2,buf)

Definition at line 5840 of file LibMkKernel_mk.h.

◆ MkBuf2I16_A

#define MkBuf2I16_A ( ato,
buf )
Value:
MkBuf2Ptr_A(2,ato,buf)

Definition at line 5858 of file LibMkKernel_mk.h.

◆ MkBuf2I16_P

#define MkBuf2I16_P ( ptr,
buf )
Value:
MkBuf2Ptr(2,ptr,buf)

Definition at line 5849 of file LibMkKernel_mk.h.

◆ MkBuf2I16fast

#define MkBuf2I16fast ( buf)
Value:
MkBuf2XXXfast(buf).I16

Definition at line 5823 of file LibMkKernel_mk.h.

◆ MkBuf2I32

#define MkBuf2I32 ( buf)
Value:
MkBuf2XXX(I32,4,buf)

Definition at line 5841 of file LibMkKernel_mk.h.

◆ MkBuf2I32_A

#define MkBuf2I32_A ( ato,
buf )
Value:
MkBuf2Ptr_A(4,ato,buf)

Definition at line 5859 of file LibMkKernel_mk.h.

◆ MkBuf2I32_P

#define MkBuf2I32_P ( ptr,
buf )
Value:
MkBuf2Ptr(4,ptr,buf)

Definition at line 5850 of file LibMkKernel_mk.h.

◆ MkBuf2I32fast

#define MkBuf2I32fast ( buf)
Value:
MkBuf2XXXfast(buf).I32

Definition at line 5824 of file LibMkKernel_mk.h.

◆ MkBuf2I64

#define MkBuf2I64 ( buf)
Value:
MkBuf2XXX(I64,8,buf)

Definition at line 5842 of file LibMkKernel_mk.h.

◆ MkBuf2I64_A

#define MkBuf2I64_A ( ato,
buf )
Value:
MkBuf2Ptr_A(8,ato,buf)

Definition at line 5860 of file LibMkKernel_mk.h.

◆ MkBuf2I64_P

#define MkBuf2I64_P ( ptr,
buf )
Value:
MkBuf2Ptr(8,ptr,buf)

Definition at line 5851 of file LibMkKernel_mk.h.

◆ MkBuf2I64fast

#define MkBuf2I64fast ( buf)
Value:
MkBuf2XXXfast(buf).I64

Definition at line 5825 of file LibMkKernel_mk.h.

◆ MkBuf2I8

#define MkBuf2I8 ( buf)
Value:
MkBuf2XXX(I8,1,buf)

Definition at line 5839 of file LibMkKernel_mk.h.

◆ MkBuf2I8_A

#define MkBuf2I8_A ( ato,
buf )
Value:
MkBuf2Ptr_A(1,ato,buf)

Definition at line 5857 of file LibMkKernel_mk.h.

◆ MkBuf2I8_P

#define MkBuf2I8_P ( ptr,
buf )
Value:
MkBuf2Ptr(1,ptr,buf)

Definition at line 5848 of file LibMkKernel_mk.h.

◆ MkBuf2I8fast

#define MkBuf2I8fast ( buf)
Value:

Definition at line 5822 of file LibMkKernel_mk.h.

◆ MkBuf2Ptr

#define MkBuf2Ptr ( len,
ptr,
buf )
Value:
memcpy((void*)ptr,buf->storage.first.B,len)

Definition at line 5846 of file LibMkKernel_mk.h.

◆ MkBuf2Ptr_A

#define MkBuf2Ptr_A ( l,
a,
b )
Value:
memcpy(a.B##l,b->storage.first.B,l)

Definition at line 5855 of file LibMkKernel_mk.h.

◆ MkBuf2XXX

#define MkBuf2XXX ( xxx,
len,
buf )
Value:
({MK_##xxx __tmp; memcpy(&__tmp,buf->storage.first.B,len); __tmp;})

Definition at line 5836 of file LibMkKernel_mk.h.

◆ MkBuf2XXXfast

#define MkBuf2XXXfast ( buf)
Value:
(*(buf)->storage.first.A)

Definition at line 5819 of file LibMkKernel_mk.h.

◆ MkBufferS_ils_size

#define MkBufferS_ils_size   (0)

64 bytes I)instance L)ocal S)torage - the memory that adds the final-class to the abstract-class.

Definition at line 5233 of file LibMkKernel_mk.h.

◆ MkString2D

#define MkString2D ( s,
l,
r )
Value:
MkString2DBL_RT(MK_RT_CALL s,l,r)
#define MK_RT_CALL

Definition at line 5977 of file LibMkKernel_mk.h.

◆ MkString2F

#define MkString2F ( s,
l,
r )
Value:
MkString2FLT_RT(MK_RT_CALL s,l,r)

Definition at line 5968 of file LibMkKernel_mk.h.

◆ MkString2I

#define MkString2I ( s,
l,
r )
Value:
MkString2I32_RT(MK_RT_CALL s,l,r)

Definition at line 5930 of file LibMkKernel_mk.h.

◆ MkString2O

#define MkString2O ( s,
l,
r )
Value:
MkString2BOL_RT(MK_RT_CALL s,l,r)

Definition at line 5894 of file LibMkKernel_mk.h.

◆ MkString2S

#define MkString2S ( s,
l,
r )
Value:
MkString2I16_RT(MK_RT_CALL s,l,r)

Definition at line 5912 of file LibMkKernel_mk.h.

◆ MkString2UI

#define MkString2UI ( s,
l,
r )
Value:
MkString2U32_RT(MK_RT_CALL s,l,r)

Definition at line 5939 of file LibMkKernel_mk.h.

◆ MkString2US

#define MkString2US ( s,
l,
r )
Value:
MkString2U16_RT(MK_RT_CALL s,l,r)

Definition at line 5921 of file LibMkKernel_mk.h.

◆ MkString2W

#define MkString2W ( s,
l,
r )
Value:
MkString2I64_RT(MK_RT_CALL s,l,r)

Definition at line 5948 of file LibMkKernel_mk.h.

◆ MkString2Y

#define MkString2Y ( s,
l,
r )
Value:
MkString2I8_RT(MK_RT_CALL s,l,r)

Definition at line 5903 of file LibMkKernel_mk.h.

Function Documentation

◆ MkString2ATO_RT()

MK_EXTERN enum MkErrorE libmkkernel::MkString2ATO_RT ( MK_RT mkrt,
MK_STRN const str,
MK_NUM const length,
enum MkTypeE type,
MK_ATO * val_out )
+ Here is the caller graph for this function:

◆ MkString2BOL_RT()

MK_EXTERN enum MkErrorE libmkkernel::MkString2BOL_RT ( MK_RT mkrt,
MK_STRN const str,
MK_NUM const length,
MK_BOL * val_out )

convert a string into a native

+ Here is the caller graph for this function:

◆ MkString2BOOL_RT()

MK_EXTERN enum MkErrorE libmkkernel::MkString2BOOL_RT ( MK_RT mkrt,
MK_STRN const str,
MK_NUM const length,
MK_BOOL * val_out )
+ Here is the caller graph for this function:

◆ MkString2DBL_RT()

MK_EXTERN enum MkErrorE libmkkernel::MkString2DBL_RT ( MK_RT mkrt,
MK_STRN const str,
MK_NUM const length,
MK_DBL * val_out )
+ Here is the caller graph for this function:

◆ MkString2FLT_RT()

MK_EXTERN enum MkErrorE libmkkernel::MkString2FLT_RT ( MK_RT mkrt,
MK_STRN const str,
MK_NUM const length,
MK_FLT * val_out )
+ Here is the caller graph for this function:

◆ MkString2HDL_RT()

MK_EXTERN enum MkErrorE libmkkernel::MkString2HDL_RT ( MK_RT mkrt,
MK_STRN const str,
MK_NUM const length,
MK_HDL * val_out )
+ Here is the caller graph for this function:

◆ MkString2I16_RT()

MK_EXTERN enum MkErrorE libmkkernel::MkString2I16_RT ( MK_RT mkrt,
MK_STRN const str,
MK_NUM const length,
MK_I16 * val_out )
+ Here is the caller graph for this function:

◆ MkString2I32_RT()

MK_EXTERN enum MkErrorE libmkkernel::MkString2I32_RT ( MK_RT mkrt,
MK_STRN const str,
MK_NUM const length,
MK_I32 * val_out )
+ Here is the caller graph for this function:

◆ MkString2I64_RT()

MK_EXTERN enum MkErrorE libmkkernel::MkString2I64_RT ( MK_RT mkrt,
MK_STRN const str,
MK_NUM const length,
MK_I64 * val_out )
+ Here is the caller graph for this function:

◆ MkString2I8_RT()

MK_EXTERN enum MkErrorE libmkkernel::MkString2I8_RT ( MK_RT mkrt,
MK_STRN const str,
MK_NUM const length,
MK_I8 * val_out )
+ Here is the caller graph for this function:

◆ MkString2LONG_RT()

MK_EXTERN enum MkErrorE libmkkernel::MkString2LONG_RT ( MK_RT mkrt,
MK_STRN const str,
MK_NUM const length,
MK_LONG * val_out )
+ Here is the caller graph for this function:

◆ MkString2U16_RT()

MK_EXTERN enum MkErrorE libmkkernel::MkString2U16_RT ( MK_RT mkrt,
MK_STRN const str,
MK_NUM const length,
MK_U16 * val_out )
+ Here is the caller graph for this function:

◆ MkString2U32_RT()

MK_EXTERN enum MkErrorE libmkkernel::MkString2U32_RT ( MK_RT mkrt,
MK_STRN const str,
MK_NUM const length,
MK_U32 * val_out )
+ Here is the caller graph for this function: