89#define MkBufferListS_bls_size 32
105 #define MkBufferListC_SIGNATURE (MkObjectC_SIGNATURE ^ (2u<<10))
106 #define MkBufferListC_MASK (((1u<<22)-1)<<10)
114 #define MkBufferListC_X2bfl(x) (x)
115 #define MkBufferListC_X2obj(x) MkOBJ(x)
128 #define MkBufferListC_T (&MK_RT_REF._MkBufferListC_T)
130 #define MkBufferListC_TT (MkTYP(MkBufferListC_T))
132 #define MkBufferListST MkBufferListC_T
134 #define MkBufferListSTT (MkTYP(MkBufferListST))
136 #define MkBufferListC_type MK_BFL
138 #define MkBufferListCT_X(instance) ( (struct MkSuperTypeS *) (MkOBJ_R(instance).type) )
140 #define MkBufferListCTT_X(instance) (MkOBJ_R(instance).type)
142 #define MkBufferListCT_TT(typ) ( (struct MkSuperTypeS *) (typ) )
144 #define MkBufferListC_NS MK
146 #define MkBufferListCTT MkBufferListCTT
148 #define MkBufferListCT ( (struct MkSuperTypeS *) MkBufferListCTT )
156 #pragma GCC diagnostic push
157 #pragma GCC diagnostic ignored "-Wattributes"
175 #pragma GCC diagnostic pop
176 #define MkBufferListC_Check(mng) MkBflCheck(mng)
186 META_ATTRIBUTE_SANITIZE
194 META_ATTRIBUTE_SANITIZE
201 #define MkBflRaise(_bfl) if (!_MkCheckX(MkBufferListC,_bfl)) { \
202 MkErrorSetC_1E("'MkBufferListC' hdl is NULL"); \
207 #define MkBFL_R(x) (*(x)).super.bfl
209 #define MkBFL(x) (&MkBFL_R(x))
232__parser__push__(doc-group=_ignore_,doc-index=Class,doc-name=Export,
class=MkBufferListC);
284#define MkBufferListHandleResolve_e(netHdl) ({ \
285 MK_HDL tmpHdl=netHdl; \
290 tmp=MkBufferListHandleResolve(tmpHdl); \
292 MkErrorSetC_1_NULL("ERROR: 'MkBufferListC' handle is 'NULL'"); \
307 __parser__(flags=
new,doc-group=_ignore_,doc-index=Class,doc-name=Misc,
class=MkBufferListC,null-
return-allow)
385#define MkBufferListCreateTLS_T(name,num) \
386 static MkThreadLocal struct MkBufferListS name##R = {0}; \
387 MK_BFL name = &name##R; \
388 if (likely(__MkCheckX(MkBufferListC,&name##R))) { \
389 MkBufferListReserve_RT(MK_RT_CALL name,num); \
391 MkBufferListInit_RT(MK_RT_CALL name,num); \
392 MkRefIncr_1X(name); \
411#define MkBufferListCreateSTATIC_T(name,num) \
412 static struct MkBufferListS name##R = {0}; \
413 struct MkBufferListS * const name = &name##R; \
414 if (__MkCheckX(MkBufferListC,&name##R)) { \
415 MkBufferListReset_RT(MK_RT_CALL name); \
417 MkBufferListInit_RT(MK_RT_CALL name,num); \
432#define MkBufferListCreateLOCAL_T(name,num) \
433 struct MkBufferListS name##R = {0}; \
434 struct MkBufferListS * const name = &name##R; \
435 MkBufferListInit_RT(MK_RT_CALL name, num)
457#define MkBufferListCreateTLS_inout_T(name,num,inout) \
458 static MkThreadLocal struct MkBufferListS __hidden_##name##R = {0}; \
459 MK_BFL name = *inout != NULL ? *inout : &__hidden_##name##R; \
460 if (likely(__MkCheckX(MkBufferListC,name))) { \
461 MkBufferListReserve_RT(MK_RT_CALL name,num); \
463 MkBufferListInit_RT(MK_RT_CALL name,num); \
464 MkRefIncr_1X(name); \
725__parser__(template-required,no-rpc,keep,no-static)
820#define MkBufferListSizeI(bfl) (bfl)->cursize
1094 bool const onlyFirst
__parser__(default=false)
1105 bool const onlyFirst
__parser__(default=true),
1106 bool * const val_out
1110#define MkBufferListCheckOptionO_3E(bfl,opt,val_out) MkErrorCheck(MkBufferListCheckOptionBOL(bfl,opt,false,true,val_out))
1131 bool const onlyFirst
__parser__(
default=
true),
1132 MK_I8 *
const val_out
1141 bool const onlyFirst
__parser__(
default=
true),
1151 bool const onlyFirst
__parser__(
default=
true),
1155#define MkBufferListCheckOptionI_3E(bfl,opt,val_out) MkErrorCheck(MkBufferListCheckOptionI32(bfl,opt,0,true,val_out))
1163 bool const onlyFirst
__parser__(
default=
true),
1173 bool const onlyFirst
__parser__(
default=
true),
1183 bool const onlyFirst
__parser__(
default=
true),
1199 bool const onlyFirst
__parser__(
default=
true),
1211 bool const onlyFirst
__parser__(
default=
true),
#define MkBufferListS_bls_size
ILS size
void MkBufferListAppendBOL_RT(MK_RT mkrt, MK_BFL const bfl, MK_BOL const val)
append a native PRIMITIVE TYPE object to a MkBufferListC …
void MkBufferListAppendI16_RT(MK_RT mkrt, MK_BFL const bfl, MK_I16 const val)
append a native PRIMITIVE TYPE object to a MkBufferListC …
void MkBufferListAppendG_RT(MK_RT mkrt, MK_BFL const bfl, MK_LONG const val)
append a native PRIMITIVE TYPE object to a MkBufferListC …
void MkBufferListAppendSTR_RT(MK_RT mkrt, MK_BFL const bfl, MK_STRN const val)
append a native PRIMITIVE TYPE object to a MkBufferListC …
void MkBufferListAppendStringR_RT(MK_RT mkrt, MK_BFL const bfl, MkStringR const val)
append a native PRIMITIVE TYPE object to a MkBufferListC …
MK_BFL MkBufferListAppendLA_RT(MK_RT mkrt, MK_BFL const bfl, MK_BAC const args)
append a variable number of MkBufferC object's to an MkBufferListC object using an other MkBufferList...
MK_BFL MkBufferListAppendVC_RT(MK_RT mkrt, MK_BFL const bfl, MK_NUM const argc, MK_STRN const *const argv)
append a argc/argv list of strings to an MkBufferListS object …
void MkBufferListAppendBIN_RT(MK_RT mkrt, MK_BFL const bfl, MkBinaryR const val)
append a native PRIMITIVE TYPE object to a MkBufferListC …
void MkBufferListAppendI64_RT(MK_RT mkrt, MK_BFL const bfl, MK_I64 const val)
append a native PRIMITIVE TYPE object to a MkBufferListC …
void MkBufferListAppendDBL_RT(MK_RT mkrt, MK_BFL const bfl, MK_DBL const val)
append a native PRIMITIVE TYPE object to a MkBufferListC …
void MkBufferListAppendBUF_RT(MK_RT mkrt, MK_BFL const bfl, MK_BUF const val)
append a native PRIMITIVE TYPE object to a MkBufferListC …
void MkBufferListAppendUP_RT(MK_RT mkrt, MK_BFL const bfl, MK_BUF const addBuf, MK_NUM position)
append a MkBufferC item into an MkBufferListC object on position …
void MkBufferListAppendVL_RT(MK_RT mkrt, MK_BFL const bfl, MK_FST const printfmt, va_list var_list)
append an printf like format object to the end of an MkBufferListS object …
void MkBufferListAppendI8_RT(MK_RT mkrt, MK_BFL const bfl, MK_I8 const val)
append a native PRIMITIVE TYPE object to a MkBufferListC …
void MkBufferListAppendV_RT(MK_RT mkrt, MK_BFL const bfl, MK_FST const printfmt,...)
append an printf like format object to the end of an MkBufferListS object …
MK_BFL MkBufferListAppendLP_RT(MK_RT mkrt, MK_BFL const bfl, MK_BFL const addBufL, MK_NUM position)
copy a MkBufferListS list into an MkBufferListS object on position …
void MkBufferListAppendFLT_RT(MK_RT mkrt, MK_BFL const bfl, MK_FLT const val)
append a native PRIMITIVE TYPE object to a MkBufferListC …
MK_BFL MkBufferListAppendVA_RT(MK_RT mkrt, MK_BFL const bfl, MK_STRN arg0,...)
append a variable number of strings to an MkBufferListS object …
void MkBufferListAppendI32_RT(MK_RT mkrt, MK_BFL const bfl, MK_I32 const val)
append a native PRIMITIVE TYPE object to a MkBufferListC …
MK_BFL MkBufferListAppendVAL_RT(MK_RT mkrt, MK_BFL const bfl, MK_STRN arg0, va_list var_list)
append a variable number of strings to an MkBufferListS object …
enum MkErrorE MkBufferListCheckOptionBOL_RT(MK_RT mkrt, MK_BFL const bfl, MK_STRN const opt, bool const defval, bool const onlyFirst, bool *const val_out)
search for opt in MkBufferListS list and fill var with opt_argument or the defval value …
enum MkErrorE MkBufferListCheckOptionI8_RT(MK_RT mkrt, MK_BFL const bfl, MK_STRN const opt, MK_I8 const defval, bool const onlyFirst, MK_I8 *const val_out)
search for opt in MkBufferListS list and fill var with opt_argument or the defval value …
enum MkErrorE MkBufferListCheckOptionI16_RT(MK_RT mkrt, MK_BFL const bfl, MK_STRN const opt, MK_I16 const defval, bool const onlyFirst, MK_I16 *const val_out)
search for opt in MkBufferListS list and fill var with opt_argument or the defval value …
enum MkErrorE MkBufferListCheckOptionDBL_RT(MK_RT mkrt, MK_BFL const bfl, MK_STRN const opt, MK_DBL const defval, bool const onlyFirst, MK_DBL *const val_out)
search for opt in MkBufferListS list and fill var with opt_argument or the defval value …
enum MkErrorE MkBufferListCheckOptionI32_RT(MK_RT mkrt, MK_BFL const bfl, MK_STRN const opt, MK_I32 const defval, bool const onlyFirst, MK_I32 *const val_out)
search for opt in MkBufferListS list and fill var with opt_argument or the defval value …
enum MkErrorE MkBufferListCheckOptionSTR_RT(MK_RT mkrt, MK_BFL const bfl, MK_STRN const opt, MK_STRN const defval, bool const onlyFirst, MK_STRN *const val_out)
search for opt in MkBufferListS list and fill var with opt_argument or the defval value …
enum MkErrorE MkBufferListCheckOptionBUF_RT(MK_RT mkrt, MK_BFL const bfl, MK_STRN const opt, MK_BUF const defval, bool const onlyFirst, MK_BUF *const val_out)
search for opt in MkBufferListS list and fill var with opt_argument or the defval value …
bool MkBufferListCheckOption_RT(MK_RT mkrt, MK_BFL const bfl, MK_STRN const opt, bool const onlyFirst)
search for boolean option in MkBufferListS list and return MK_BOL value …
enum MkErrorE MkBufferListCheckOptionI64_RT(MK_RT mkrt, MK_BFL const bfl, MK_STRN const opt, MK_I64 const defval, bool const onlyFirst, MK_I64 *const val_out)
search for opt in MkBufferListS list and fill var with opt_argument or the defval value …
enum MkErrorE MkBufferListCheckOptionFLT_RT(MK_RT mkrt, MK_BFL const bfl, MK_STRN const opt, MK_FLT const defval, bool const onlyFirst, MK_FLT *const val_out)
search for opt in MkBufferListS list and fill var with opt_argument or the defval value …
static MK_BFL MkBufferListHandleResolve_RT(MK_RT mkrt, MK_HDL const netHdl)
Handle-Resolve-Slot - return a MkBufferListC from netHdl or MK_NULL if invalid…
static MK_HDL MkBufferListHandleGet_RT(MK_RT mkrt, MK_BFL const bfl)
Handle-Get-Slot - returns a export-hdl to the MkBufferListC useable for external storage
static MK_BFL MkBufferListGetNull(void)
Null-Slot - return a MkBufferListC typed NULL instance …
static bool MkBflCheck(MK_MNGN mng)
check MkBufferListS -> MkObjectS::signature …
static MK_BFL MkBfl(MK_MNG mng)
cast a unknown-object into an MkBufferListS pointer or NULL if not possible
static bool MkBflCheckO(MK_OBJN obj)
check MkBufferListS -> MkObjectS::signature …
static MK_BFLN MkBflN(MK_MNGN mng)
(const) cast a unknown-object into an MkBufferListS pointer or NULL if not possible
enum MkErrorE MkBufferListIndexGet_RT(MK_RT mkrt, MK_BFLN const bfl, MK_NUM const index, MK_BUF *const val_out)
get (read only) the index object from bfl …
MK_BUF MkBufferListIndexGetBUF_RT(MK_RT mkrt, MK_BFL const bfl, MK_NUM index)
get the index element from MkBufferListC ... if not available… create it. …
enum MkErrorE MkBufferListIndexDelete_RT(MK_RT mkrt, MK_BFL const bfl, const MK_NUM index, const MK_NUM numitems, const bool doDelete)
delete the index'th list item from the MkBufferListS object …
void MkBufferListIndexSetBUF_RT(MK_RT mkrt, MK_BFL const bfl, MK_NUM const index, MK_BUF const buf)
set the index element from MkBufferListC ... if not available… createspace …
void MkBufferListIndexSetSTR_RT(MK_RT mkrt, MK_BFL const bfl, MK_NUM const index, MK_STRN const str)
set the index element from MkBufferListC ... to string… if not available… create space …
enum MkErrorE MkBufferListIndexSet_RT(MK_RT mkrt, MK_BFL const bfl, MK_NUM const index, MK_BUF const buf)
set the index object from bfl …
enum MkErrorE MkBufferListIndexExtract_RT(MK_RT mkrt, MK_BFL const bfl, MK_NUM const index, MK_BUF *const val_out)
extract (read & delete) the index object from bfl …
MK_STRN MkBufferListIndexGetSTR_RT(MK_RT mkrt, MK_BFL const bfl, MK_NUM const index)
get the index element from MkBufferListC ... as string. …
void MkBufferListLogSS_RT(MK_RT mkrt, MK_BFLN const bfl, MK_STRN const varname, MK_OBJN fmtobj, MK_STRN const callfunc)
write the very-short-summary of the MkBufferListC to MkLogFileC (default: stderr) …
void MkBufferListLog_RT(MK_RT mkrt, MK_BFLN bfl, MK_OBJN const fmtobj, MK_DBG const debug, MK_STRN const callfunc, MK_I32 const lvl)
write the detail-summary of the MkBufferListC to MkLogFileC (default: stderr) …
void MkBufferListLogSSS_RT(MK_RT mkrt, MK_BFLN const bfl, MK_STRN const varname, MK_OBJN fmtobj, MK_STRN const callfunc)
write the very-very-short-summary of the MkBufferListC to MkLogFileC (default: stderr) …
void MkBufferListLogS_RT(MK_RT mkrt, MK_BFLN const bfl, MK_STRN const varname, MK_OBJN fmtobj, MK_STRN const callfunc)
write the short-summary of the MkBufferListC to MkLogFileC (default: stderr) …
#define MkBufferListSizeI(bfl)
MK_BFL MkBufferListSort_RT(MK_RT mkrt, MK_BFL const bfl)
sort a MkBufferListC …
MK_BFL MkBufferListFileGlob_RT(MK_RT mkrt, MK_STRN const pattern_match)
create a new MkBufferListC using the result from a filesystem glob operation …
MK_STRN MkBufferListToString_RT(MK_RT mkrt, MK_BFLN const bfl)
get a string representation of the bfl
MK_STRN_A MkBufferListToStringList_RT(MK_RT mkrt, MK_BFLN const bfl, bool const unique)
get a string-list representation of the bfl
void MkBufferListMove_RT(MK_RT mkrt, MK_BFL const to, MK_BFL const from)
move all internal data from from to the end of to …
MK_NUM MkBufferListSearchC_RT(MK_RT mkrt, MK_BFLN const bfl, MK_STRN const str, MK_NUM const len, MK_NUM const startindex)
search MK_STR item from a MkBufferListS object starting at startindex …
MK_I32 MkBufferListCmp_RT(MK_RT mkrt, MK_BFLN const bfl, MK_BFLN const bfl2)
compare two buffer-list …
MK_BFL MkBufferListPositionMerge_RT(MK_RT mkrt, MK_BFL const bfl, MK_BFL const source, MK_NUM position)
merge a MkBufferListS list into an MkBufferListS object on position …
void MkBufferListCopy_RT(MK_RT mkrt, MK_BFL const bfl, MK_BFLN const src)
copy all internal data from src to tgt …
MK_BUF MkBufferListToBuffer_RT(MK_RT mkrt, MK_BFLN const bfl)
Export a bfl into an MkBufferC using an MkBufferStreamC …
void MkBufferListReserve_RT(MK_RT mkrt, MK_BFL const bfl, MK_NUM const num)
reserve num items in a MkBufferListC object …
MK_NUM MkBufferListSize_RT(MK_RT mkrt, MK_BFLN const bfl)
get the number-of-items in the bfl …
MK_BFL MkBufferListReset_RT(MK_RT mkrt, MK_BFL bfl)
reset a MkBufferListC object …
MK_NAT_LIST MkBufferListToList_RT(MK_RT mkrt, MK_BFLN const bfl)
get a target-language list representation of the bfl …
MK_BFL MkBufferListCreateLA_RT(MK_RT mkrt, MK_BAC const args)
Constructs a MkBufferListC instance with an other MkBufferListC OR a list of arguments (only in NON C...
MK_BFL MkBufferListCreateTLS_RT(MK_RT mkrt, MK_STRN const tlsName, bool const resetB)
same as BufferListCreate but require no cleanup …
void MkBufferListInit_RT(MK_RT mkrt, MK_BFL const bfl, MK_NUM const num)
initialize an already allocated MkBufferListC
MK_BFL MkBufferListCreateVAL_RT(MK_RT mkrt, MK_STRN const arg0, va_list var_list)
Constructs a MkBufferListC instance with a va_list argument …
#define MkBufferListCreateTLS_inout_T(name, num, inout)
create a MkBufferListC instance as thread-local-storage OR reuse inout if possible…
void MkBufferListFree_RT(MK_RT mkrt, MK_BFL const bfl)
free the internal data but keep the outher shell alive
void MkBufferListDelete_RT(MK_RT mkrt, MK_BFL bfl)
Destructor - delete a MkBufferListC instance …
MK_BFL MkBufferListDup_RT(MK_RT mkrt, MK_BFLN const bfl)
Dup-Constructor - create a new MkBufferListC instance as copy from an existing MkBufferListC instance...
MK_BFL MkBufferListMerge_RT(MK_RT mkrt, MK_BFL const bfl)
Merge-Constructor - constructs a MkBufferListC instance as a merge from an existing MkBufferListC ins...
#define MkBufferListCreateTLS_T(name, num)
create a MkBufferListC instance as thread-local-storage …
#define MkBufferListCreateSTATIC_T(name, num)
create a MkBufferListC instance on static-storage …
MK_BFL MkBufferListCreateVA_RT(MK_RT mkrt, MK_STRN const arg0,...)
Constructs a MkBufferListC instance with a varargs argument that ends with MK_NULL …
#define MkBufferListCreateLOCAL_T(name, num)
create a MkBufferListC instance on local-memory and return an pointer as instance …
MK_BFL MkBufferListCreateVC_RT(MK_RT mkrt, MK_NUM const argc, MK_STRN const *argv)
Constructs a MkBufferListC instance with a argc/argv data from a list of strings …
MK_BFL MkBufferListCreate_RT(MK_RT mkrt, MK_NUM const size)
Constructs a MkBufferC instance with size storage…
void * MK_MACRO_TYP
helper-type used to declare a prototype for a macro
#define MK_EXTERN
static library
#define MK_NULL
The Programming-Language-Micro-Kernel (PLMK) NULL value as MK_NULL in C …
MkErrorE
collection for the different error-codes …
#define __parser__pop__
parser: stop apply a list of local attributes to a block of code …
#define __parser__push__(...)
parser: start apply a list of local attributes to a block of code …
#define __parser__(...)
parser: apply an attribute to an object in local scope …
const MK_PTRB * MK_MNGN
const - a managed object pointer, datatype will be checked at runtime
int32_t MK_NUM
array size data-type ('num' items in array …
float MK_FLT
4 byte float data-type
const MK_STRB * MK_STRN
constant string pointer data-type
MK_PTRB * MK_MNG
managed object pointer, datatype will be checked at runtime
MK_STRB const * MK_FST
const format string pointer data-type
signed char MK_I8
1 byte byte data-type
signed long long MK_I64
8 byte wide integer data-type
unsigned char MK_BOL
1 byte boolean data-type
long MK_LONG
4/8 byte long data-type
signed short int MK_I16
2 byte short data-type
double MK_DBL
8 byte double data-type
int32_t MK_HDL
4 byte int handle data-type
signed int MK_I32
4 byte integer data-type
int MK_DBG
debug-level data-type …
#define MkSanitizeCheck(_root, _m)
#define MkSanitizeCheckO(_root, _o)
#define MkObjectHandleResolve(...)
#define MkObjectHandleGet(...)
#define MkOBJ(x)
cast a known-object into an MkObjectS pointer
#define MkObjectToString(...)
#define MK_ATTR_RT_INSTANCE
#define MK_RT_ATTR_FORMAT_2
#define MK_ATTR_RT_STATIC
array of MK_STRN values …
binary data default format …
The CLASS used to store a list of MkBufferS items into a flat array…
MK_NUM allocsize
the maximum allocated number of elements cursize <= allocsize <= size
union MkBufferListS::@0 super
MK_BUF * data
pointer to the allocated memory (fixed position)
MK_BUF bls[MkBufferListS_bls_size]
ILS storage
MK_NUM cursize
the currently used number of allocated MkBufferC objects (e.g. 0 <= cursize <= size)
The ABSTRACT-CLASS used to store a native-type-data-item defined by PRIMITIVE TYPE …
string data default format …