MkBufferC - the abstract class known as buf or buffer is used to create and manage dynamic, generic, mixed typed data. …
More...
|
#define | MkBufferS_ils_size (0) |
| 64 bytes I)instance L)ocal S)torage - the memory that adds the final-class to the abstract-class.
|
|
|
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) |
|
|
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) |
|
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++) {
const MkBufferC& buf = *ReadBUF();
SendSTR(buf.GetType3());
SendBUF(buf);
}
SendRETURN();
}
- See also
- BufferGetType1 BufferGetType2 BufferGetType3
◆ MkBuf2BOL
◆ MkBuf2BOL_A
#define MkBuf2BOL_A |
( |
| ato, |
|
|
| buf ) |
◆ MkBuf2BOL_P
#define MkBuf2BOL_P |
( |
| ptr, |
|
|
| buf ) |
◆ MkBuf2BOLfast
#define MkBuf2BOLfast |
( |
| buf | ) |
|
◆ MkBuf2DBL
◆ MkBuf2DBL_A
#define MkBuf2DBL_A |
( |
| ato, |
|
|
| buf ) |
◆ MkBuf2DBL_P
#define MkBuf2DBL_P |
( |
| ptr, |
|
|
| buf ) |
◆ MkBuf2DBLfast
#define MkBuf2DBLfast |
( |
| buf | ) |
|
◆ MkBuf2FLT
◆ MkBuf2FLT_A
#define MkBuf2FLT_A |
( |
| ato, |
|
|
| buf ) |
◆ MkBuf2FLT_P
#define MkBuf2FLT_P |
( |
| ptr, |
|
|
| buf ) |
◆ MkBuf2FLTfast
#define MkBuf2FLTfast |
( |
| buf | ) |
|
◆ MkBuf2I16
◆ MkBuf2I16_A
#define MkBuf2I16_A |
( |
| ato, |
|
|
| buf ) |
◆ MkBuf2I16_P
#define MkBuf2I16_P |
( |
| ptr, |
|
|
| buf ) |
◆ MkBuf2I16fast
#define MkBuf2I16fast |
( |
| buf | ) |
|
◆ MkBuf2I32
◆ MkBuf2I32_A
#define MkBuf2I32_A |
( |
| ato, |
|
|
| buf ) |
◆ MkBuf2I32_P
#define MkBuf2I32_P |
( |
| ptr, |
|
|
| buf ) |
◆ MkBuf2I32fast
#define MkBuf2I32fast |
( |
| buf | ) |
|
◆ MkBuf2I64
◆ MkBuf2I64_A
#define MkBuf2I64_A |
( |
| ato, |
|
|
| buf ) |
◆ MkBuf2I64_P
#define MkBuf2I64_P |
( |
| ptr, |
|
|
| buf ) |
◆ MkBuf2I64fast
#define MkBuf2I64fast |
( |
| buf | ) |
|
◆ MkBuf2I8
◆ MkBuf2I8_A
#define MkBuf2I8_A |
( |
| ato, |
|
|
| buf ) |
◆ MkBuf2I8_P
#define MkBuf2I8_P |
( |
| ptr, |
|
|
| buf ) |
◆ MkBuf2I8fast
#define MkBuf2I8fast |
( |
| buf | ) |
|
◆ MkBuf2Ptr
#define MkBuf2Ptr |
( |
| len, |
|
|
| ptr, |
|
|
| buf ) |
◆ MkBuf2Ptr_A
#define MkBuf2Ptr_A |
( |
| l, |
|
|
| a, |
|
|
| b ) |
◆ 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 | ) |
|
◆ 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 ) |
◆ MkString2F
#define MkString2F |
( |
| s, |
|
|
| l, |
|
|
| r ) |
◆ MkString2I
#define MkString2I |
( |
| s, |
|
|
| l, |
|
|
| r ) |
◆ MkString2O
#define MkString2O |
( |
| s, |
|
|
| l, |
|
|
| r ) |
◆ MkString2S
#define MkString2S |
( |
| s, |
|
|
| l, |
|
|
| r ) |
◆ MkString2UI
#define MkString2UI |
( |
| s, |
|
|
| l, |
|
|
| r ) |
◆ MkString2US
#define MkString2US |
( |
| s, |
|
|
| l, |
|
|
| r ) |
◆ MkString2W
#define MkString2W |
( |
| s, |
|
|
| l, |
|
|
| r ) |
◆ MkString2Y
#define MkString2Y |
( |
| s, |
|
|
| l, |
|
|
| r ) |
◆ MkString2ATO_RT()
◆ MkString2BOL_RT()
convert a string into a native
◆ MkString2BOOL_RT()
◆ MkString2DBL_RT()
◆ MkString2FLT_RT()
◆ MkString2HDL_RT()
◆ MkString2I16_RT()
◆ MkString2I32_RT()
◆ MkString2I64_RT()
◆ MkString2I8_RT()
◆ MkString2LONG_RT()
◆ MkString2U16_RT()
◆ MkString2U32_RT()