MkBufferC - the abstract class known as buf or buffer is used to create and manage dynamic, generic, mixed typed data. … More...
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 … | |
MkKernel_String_C_API | |
MkKernel PACKAGE - operate on a string as struct of pointer and size … | |
Data Structures | |
struct | MkBufferS |
The ABSTRACT-CLASS used to store a native-type-data-item defined by PRIMITIVE TYPE … More... | |
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. | |
MkBuf2TTfast | |
MkBufferC - get a native PRIMITIVE TYPE from the MkBufferS …
| |
#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: | |
#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) |
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 libmkkernel is working on data… libmkkernel is working on an MkBufferC object or on a list of MkBufferC objects called MkBufferListC.
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:
MkBufferSPtr->ils_data - MkBufferSPtr
.The ABSTRACT-CLASS MkBufferS is missing the ILS-storage, the FINAL-CLASSES are:
command | synonmym |
---|---|
(constructor,static,runtime) MK_BUF MkBufferCreate(MK_NUM const size) | no |
(destructor,runtime) void MkBufferDelete(MK_BUF const buf) | no |
Example from server.c
→ read a buffer-object and convert single-char-type-identifer to string.
static enum MkErrorE Ot_BUF2 ( MQ_SERVICE_CALL_ARGS ) { MK_BUF buf; int i; char str[2] = {'\0', '\0'}; MqSendSTART_E (mqctx); for (i=0; i<3; i++) { MqReadBUF_E (mqctx, &buf); str[0] = MkBufferGetType1(buf); MqSendSTR_E (mqctx, str); MqSendBUF_E (mqctx, buf); } return MqSendRETURN(mqctx); error: return MkErrorStack_1X(mqctx); }
#define MkBuf2BOL | ( | buf | ) |
Definition at line 6110 of file LibMkKernel_mk.h.
#define MkBuf2BOL_A | ( | ato, | |
buf ) |
Definition at line 6128 of file LibMkKernel_mk.h.
#define MkBuf2BOL_P | ( | ptr, | |
buf ) |
Definition at line 6119 of file LibMkKernel_mk.h.
#define MkBuf2BOLfast | ( | buf | ) |
Definition at line 6093 of file LibMkKernel_mk.h.
#define MkBuf2DBL | ( | buf | ) |
Definition at line 6116 of file LibMkKernel_mk.h.
#define MkBuf2DBL_A | ( | ato, | |
buf ) |
Definition at line 6134 of file LibMkKernel_mk.h.
#define MkBuf2DBL_P | ( | ptr, | |
buf ) |
Definition at line 6125 of file LibMkKernel_mk.h.
#define MkBuf2DBLfast | ( | buf | ) |
Definition at line 6099 of file LibMkKernel_mk.h.
#define MkBuf2FLT | ( | buf | ) |
Definition at line 6115 of file LibMkKernel_mk.h.
#define MkBuf2FLT_A | ( | ato, | |
buf ) |
Definition at line 6133 of file LibMkKernel_mk.h.
#define MkBuf2FLT_P | ( | ptr, | |
buf ) |
Definition at line 6124 of file LibMkKernel_mk.h.
#define MkBuf2FLTfast | ( | buf | ) |
Definition at line 6098 of file LibMkKernel_mk.h.
#define MkBuf2I16 | ( | buf | ) |
Definition at line 6112 of file LibMkKernel_mk.h.
#define MkBuf2I16_A | ( | ato, | |
buf ) |
Definition at line 6130 of file LibMkKernel_mk.h.
#define MkBuf2I16_P | ( | ptr, | |
buf ) |
Definition at line 6121 of file LibMkKernel_mk.h.
#define MkBuf2I16fast | ( | buf | ) |
Definition at line 6095 of file LibMkKernel_mk.h.
#define MkBuf2I32 | ( | buf | ) |
Definition at line 6113 of file LibMkKernel_mk.h.
#define MkBuf2I32_A | ( | ato, | |
buf ) |
Definition at line 6131 of file LibMkKernel_mk.h.
#define MkBuf2I32_P | ( | ptr, | |
buf ) |
Definition at line 6122 of file LibMkKernel_mk.h.
#define MkBuf2I32fast | ( | buf | ) |
Definition at line 6096 of file LibMkKernel_mk.h.
#define MkBuf2I64 | ( | buf | ) |
Definition at line 6114 of file LibMkKernel_mk.h.
#define MkBuf2I64_A | ( | ato, | |
buf ) |
Definition at line 6132 of file LibMkKernel_mk.h.
#define MkBuf2I64_P | ( | ptr, | |
buf ) |
Definition at line 6123 of file LibMkKernel_mk.h.
#define MkBuf2I64fast | ( | buf | ) |
Definition at line 6097 of file LibMkKernel_mk.h.
#define MkBuf2I8 | ( | buf | ) |
Definition at line 6111 of file LibMkKernel_mk.h.
#define MkBuf2I8_A | ( | ato, | |
buf ) |
Definition at line 6129 of file LibMkKernel_mk.h.
#define MkBuf2I8_P | ( | ptr, | |
buf ) |
Definition at line 6120 of file LibMkKernel_mk.h.
#define MkBuf2I8fast | ( | buf | ) |
Definition at line 6094 of file LibMkKernel_mk.h.
#define MkBuf2Ptr | ( | len, | |
ptr, | |||
buf ) |
Definition at line 6118 of file LibMkKernel_mk.h.
#define MkBuf2Ptr_A | ( | l, | |
a, | |||
b ) |
Definition at line 6127 of file LibMkKernel_mk.h.
#define MkBuf2XXX | ( | xxx, | |
len, | |||
buf ) |
Definition at line 6108 of file LibMkKernel_mk.h.
#define MkBuf2XXXfast | ( | buf | ) |
Definition at line 6091 of file LibMkKernel_mk.h.
#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 5512 of file LibMkKernel_mk.h.