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 5838 of file LibMkKernel_mk.h.
#define MkBuf2BOL_A | ( | ato, | |
buf ) |
Definition at line 5856 of file LibMkKernel_mk.h.
#define MkBuf2BOL_P | ( | ptr, | |
buf ) |
Definition at line 5847 of file LibMkKernel_mk.h.
#define MkBuf2BOLfast | ( | buf | ) |
Definition at line 5821 of file LibMkKernel_mk.h.
#define MkBuf2DBL | ( | buf | ) |
Definition at line 5844 of file LibMkKernel_mk.h.
#define MkBuf2DBL_A | ( | ato, | |
buf ) |
Definition at line 5862 of file LibMkKernel_mk.h.
#define MkBuf2DBL_P | ( | ptr, | |
buf ) |
Definition at line 5853 of file LibMkKernel_mk.h.
#define MkBuf2DBLfast | ( | buf | ) |
Definition at line 5827 of file LibMkKernel_mk.h.
#define MkBuf2FLT | ( | buf | ) |
Definition at line 5843 of file LibMkKernel_mk.h.
#define MkBuf2FLT_A | ( | ato, | |
buf ) |
Definition at line 5861 of file LibMkKernel_mk.h.
#define MkBuf2FLT_P | ( | ptr, | |
buf ) |
Definition at line 5852 of file LibMkKernel_mk.h.
#define MkBuf2FLTfast | ( | buf | ) |
Definition at line 5826 of file LibMkKernel_mk.h.
#define MkBuf2I16 | ( | buf | ) |
Definition at line 5840 of file LibMkKernel_mk.h.
#define MkBuf2I16_A | ( | ato, | |
buf ) |
Definition at line 5858 of file LibMkKernel_mk.h.
#define MkBuf2I16_P | ( | ptr, | |
buf ) |
Definition at line 5849 of file LibMkKernel_mk.h.
#define MkBuf2I16fast | ( | buf | ) |
Definition at line 5823 of file LibMkKernel_mk.h.
#define MkBuf2I32 | ( | buf | ) |
Definition at line 5841 of file LibMkKernel_mk.h.
#define MkBuf2I32_A | ( | ato, | |
buf ) |
Definition at line 5859 of file LibMkKernel_mk.h.
#define MkBuf2I32_P | ( | ptr, | |
buf ) |
Definition at line 5850 of file LibMkKernel_mk.h.
#define MkBuf2I32fast | ( | buf | ) |
Definition at line 5824 of file LibMkKernel_mk.h.
#define MkBuf2I64 | ( | buf | ) |
Definition at line 5842 of file LibMkKernel_mk.h.
#define MkBuf2I64_A | ( | ato, | |
buf ) |
Definition at line 5860 of file LibMkKernel_mk.h.
#define MkBuf2I64_P | ( | ptr, | |
buf ) |
Definition at line 5851 of file LibMkKernel_mk.h.
#define MkBuf2I64fast | ( | buf | ) |
Definition at line 5825 of file LibMkKernel_mk.h.
#define MkBuf2I8 | ( | buf | ) |
Definition at line 5839 of file LibMkKernel_mk.h.
#define MkBuf2I8_A | ( | ato, | |
buf ) |
Definition at line 5857 of file LibMkKernel_mk.h.
#define MkBuf2I8_P | ( | ptr, | |
buf ) |
Definition at line 5848 of file LibMkKernel_mk.h.
#define MkBuf2I8fast | ( | buf | ) |
Definition at line 5822 of file LibMkKernel_mk.h.
#define MkBuf2Ptr | ( | len, | |
ptr, | |||
buf ) |
Definition at line 5846 of file LibMkKernel_mk.h.
#define MkBuf2Ptr_A | ( | l, | |
a, | |||
b ) |
Definition at line 5855 of file LibMkKernel_mk.h.
#define MkBuf2XXX | ( | xxx, | |
len, | |||
buf ) |
Definition at line 5836 of file LibMkKernel_mk.h.
#define MkBuf2XXXfast | ( | buf | ) |
Definition at line 5819 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 5233 of file LibMkKernel_mk.h.