MkBufferC - various functions to create, initialize and destroy a MkBufferC … More...
Macros | |
#define | MkBufferCreateTLS_T(cls, name, size) |
create an new MkBufferC object as T)hread L)ocal S)torage… | |
#define | MkBufferCreateTLS_inout_T(cls, name, inout) |
Constructs a MkBufferC instance as T)hread L)ocal S)torage OR reuse inout if possible… | |
#define | MkBufferCreateLOCAL_T(cls, name, size) |
create an new MkBufferC object as L)ocal S)torage… | |
Functions | |
MK_EXTERN MK_BUF | MkBufferCreate_RT (MK_RT mkrt, MK_TYP type, MK_NUM const size) |
Constructor - create a new MkBufferC with minimum size of internal storage … | |
MK_EXTERN MK_BUF | MkBufferCreate64_RT (MK_RT mkrt, MK_NUM const size) |
call the BufferCreate with default type MkBuffer64S (64 byte) … | |
MK_EXTERN MK_BUF | MkBufferCreate256_RT (MK_RT mkrt, MK_NUM const size) |
call the BufferCreate with default type MkBuffer256S (256 byte) … | |
MK_EXTERN MK_BUF | MkBufferCreate1024_RT (MK_RT mkrt, MK_NUM const size) |
call the BufferCreate with default type MkBuffer1024S (1024 byte) … | |
void | MkBufferCreateTLS_T (MK_MACRO_TYP cls, MK_MACRO_TYP name, MK_NUM const size) |
void | MkBufferCreateTLS_inout_T (MK_MACRO_TYP cls, MK_MACRO_TYP name, MK_BUF *inout) |
void | MkBufferCreateLOCAL_T (MK_MACRO_TYP cls, MK_MACRO_TYP name, MK_NUM const size) |
MK_EXTERN MK_BUF | MkBufferCreateI8_RT (MK_RT mkrt, MK_I8 const val) |
Constructor - create a new MkBufferC with an PRIMITIVE TYPE … | |
MK_EXTERN MK_BUF | MkBufferCreateBOL_RT (MK_RT mkrt, MK_BOL const val) |
Constructor - create a new MkBufferC with an PRIMITIVE TYPE … | |
MK_EXTERN MK_BUF | MkBufferCreateI16_RT (MK_RT mkrt, MK_I16 const val) |
Constructor - create a new MkBufferC with an PRIMITIVE TYPE … | |
MK_EXTERN MK_BUF | MkBufferCreateI32_RT (MK_RT mkrt, MK_I32 const val) |
Constructor - create a new MkBufferC with an PRIMITIVE TYPE … | |
MK_EXTERN MK_BUF | MkBufferCreateFLT_RT (MK_RT mkrt, MK_FLT const val) |
Constructor - create a new MkBufferC with an PRIMITIVE TYPE … | |
MK_EXTERN MK_BUF | MkBufferCreateI64_RT (MK_RT mkrt, MK_I64 const val) |
Constructor - create a new MkBufferC with an PRIMITIVE TYPE … | |
MK_EXTERN MK_BUF | MkBufferCreateDBL_RT (MK_RT mkrt, MK_DBL const val) |
Constructor - create a new MkBufferC with an PRIMITIVE TYPE … | |
MK_EXTERN MK_BUF | MkBufferCreateSTR_RT (MK_RT mkrt, MK_STRN const val) |
Constructor - create a new MkBufferC with an PRIMITIVE TYPE … | |
MK_EXTERN MK_BUF | MkBufferCreateBIN_RT (MK_RT mkrt, MkBinaryR const val) |
Constructor - create a new MkBufferC with an PRIMITIVE TYPE … | |
MK_EXTERN MK_BUF | MkBufferCreateTLS_RT (MK_RT mkrt, MK_STRN const tlsName, bool const resetB) |
same as BufferCreate but require no cleanup | |
MK_EXTERN MK_BUF | MkBufferCreateBUF_RT (MK_RT mkrt, MK_BUFN const val) |
Constructor - create a new MkBufferC with an PRIMITIVE TYPE … | |
MK_EXTERN void | MkBufferFree_RT (MK_RT mkrt, MK_BUF const buf) |
initialize or free an MkBufferC reference-instance … | |
MK_EXTERN void | MkBufferInit_RT (MK_RT mkrt, MK_BUF const buf, MK_TYP type, MK_NUM const size) |
initialize or free an MkBufferC reference-instance … | |
MK_EXTERN void | MkBufferDelete_RT (MK_RT mkrt, MK_BUF const buf) |
Destructor - delete a MkBufferC instance … | |
MK_EXTERN MK_BUF | MkBufferDup_RT (MK_RT mkrt, MK_BUFN const buf) |
Dup-Constructor - create a new MkBufferC instance as copy from an existing MkBufferC instance | |
MK_EXTERN MK_BUF | MkBufferMerge_RT (MK_RT mkrt, MK_BUF const buf) |
Merge-Constructor - create a new MkBufferC as a merge from an existing object … | |
MkBufferC - various functions to create, initialize and destroy a MkBufferC …
#define MkBufferCreate | ( | ... | ) |
Definition at line 282 of file kernel_overload_mk.h.
#define MkBufferCreate1024 | ( | ... | ) |
Definition at line 286 of file kernel_overload_mk.h.
#define MkBufferCreate1024_0 | ( | ) |
Definition at line 287 of file kernel_overload_mk.h.
#define MkBufferCreate1024_NULL | ( | ... | ) |
Definition at line 285 of file kernel_overload_mk.h.
#define MkBufferCreate256 | ( | ... | ) |
Definition at line 289 of file kernel_overload_mk.h.
#define MkBufferCreate256_0 | ( | ) |
Definition at line 290 of file kernel_overload_mk.h.
#define MkBufferCreate256_NULL | ( | ... | ) |
Definition at line 288 of file kernel_overload_mk.h.
#define MkBufferCreate64 | ( | ... | ) |
Definition at line 292 of file kernel_overload_mk.h.
#define MkBufferCreate64_0 | ( | ) |
Definition at line 293 of file kernel_overload_mk.h.
#define MkBufferCreate64_NULL | ( | ... | ) |
Definition at line 291 of file kernel_overload_mk.h.
#define MkBufferCreate_0 | ( | ) |
Definition at line 284 of file kernel_overload_mk.h.
#define MkBufferCreate_1 | ( | size | ) |
Definition at line 283 of file kernel_overload_mk.h.
#define MkBufferCreate_NULL | ( | ... | ) |
Definition at line 281 of file kernel_overload_mk.h.
#define MkBufferCreateBIN | ( | ... | ) |
Definition at line 295 of file kernel_overload_mk.h.
#define MkBufferCreateBIN_NULL | ( | ... | ) |
Definition at line 294 of file kernel_overload_mk.h.
#define MkBufferCreateBOL | ( | ... | ) |
Definition at line 297 of file kernel_overload_mk.h.
#define MkBufferCreateBOL_NULL | ( | ... | ) |
Definition at line 296 of file kernel_overload_mk.h.
#define MkBufferCreateBUF | ( | ... | ) |
Definition at line 299 of file kernel_overload_mk.h.
#define MkBufferCreateBUF_NULL | ( | ... | ) |
Definition at line 298 of file kernel_overload_mk.h.
#define MkBufferCreateDBL | ( | ... | ) |
Definition at line 301 of file kernel_overload_mk.h.
#define MkBufferCreateDBL_NULL | ( | ... | ) |
Definition at line 300 of file kernel_overload_mk.h.
#define MkBufferCreateFLT | ( | ... | ) |
Definition at line 303 of file kernel_overload_mk.h.
#define MkBufferCreateFLT_NULL | ( | ... | ) |
Definition at line 302 of file kernel_overload_mk.h.
#define MkBufferCreateI16 | ( | ... | ) |
Definition at line 305 of file kernel_overload_mk.h.
#define MkBufferCreateI16_NULL | ( | ... | ) |
Definition at line 304 of file kernel_overload_mk.h.
#define MkBufferCreateI32 | ( | ... | ) |
Definition at line 307 of file kernel_overload_mk.h.
#define MkBufferCreateI32_NULL | ( | ... | ) |
Definition at line 306 of file kernel_overload_mk.h.
#define MkBufferCreateI64 | ( | ... | ) |
Definition at line 309 of file kernel_overload_mk.h.
#define MkBufferCreateI64_NULL | ( | ... | ) |
Definition at line 308 of file kernel_overload_mk.h.
#define MkBufferCreateI8 | ( | ... | ) |
Definition at line 311 of file kernel_overload_mk.h.
#define MkBufferCreateI8_NULL | ( | ... | ) |
Definition at line 310 of file kernel_overload_mk.h.
#define MkBufferCreateLOCAL_T | ( | cls, | |
name, | |||
size ) |
create an new MkBufferC object as L)ocal S)torage…
The cls argument is: MkBuffer64S 64 bytes, MkBuffer256S = 256 bytes, MkBuffer1024S = 1024 bytes,
bufR.super.buf.storage.first.C
[in] | cls | A subclass of MkBufferS with predefined ILS storage → MkBuffer64S, MkBuffer256S and MkBuffer1024S |
name | the name of the new MkBufferC | |
size | the initial size of the new MkBufferC |
Definition at line 6128 of file LibMkKernel_mk.h.
#define MkBufferCreateSTR | ( | ... | ) |
Definition at line 313 of file kernel_overload_mk.h.
#define MkBufferCreateSTR_NULL | ( | ... | ) |
Definition at line 312 of file kernel_overload_mk.h.
#define MkBufferCreateTLS | ( | ... | ) |
Definition at line 320 of file kernel_overload_mk.h.
#define MkBufferCreateTLS_1 | ( | tlsName | ) |
Definition at line 321 of file kernel_overload_mk.h.
#define MkBufferCreateTLS_inout_T | ( | cls, | |
name, | |||
inout ) |
Constructs a MkBufferC instance as T)hread L)ocal S)torage OR reuse inout if possible…
Same as MkBufferCreateTLS_T but try to reuse an already existsing inout. If inout is a MK_NULL
pointer than a pointer to a local-reference is returned.
Definition at line 6101 of file LibMkKernel_mk.h.
#define MkBufferCreateTLS_NULL | ( | ... | ) |
Definition at line 319 of file kernel_overload_mk.h.
#define MkBufferCreateTLS_T | ( | cls, | |
name, | |||
size ) |
create an new MkBufferC object as T)hread L)ocal S)torage…
The cls argument is: MkBuffer64S 64 bytes, MkBuffer256S = 256 bytes, MkBuffer1024S = 1024 bytes,
[in] | cls | A subclass of MkBufferS with predefined ILS storage → MkBuffer64S, MkBuffer256S and MkBuffer1024S |
name | the name of the new MkBufferC | |
size | the initial size of the new MkBufferC |
Definition at line 6081 of file LibMkKernel_mk.h.
#define MkBufferDelete | ( | x | ) |
Definition at line 316 of file kernel_overload_mk.h.
#define MkBufferDup | ( | ... | ) |
Definition at line 278 of file kernel_overload_mk.h.
#define MkBufferDup_NULL | ( | ... | ) |
Definition at line 277 of file kernel_overload_mk.h.
#define MkBufferFree | ( | ... | ) |
Definition at line 325 of file kernel_overload_mk.h.
#define MkBufferFree_NULL | ( | ... | ) |
Definition at line 324 of file kernel_overload_mk.h.
#define MkBufferInit | ( | ... | ) |
Definition at line 327 of file kernel_overload_mk.h.
#define MkBufferInit_1 | ( | buf | ) |
Definition at line 329 of file kernel_overload_mk.h.
#define MkBufferInit_2 | ( | buf, | |
size ) |
Definition at line 328 of file kernel_overload_mk.h.
#define MkBufferInit_NULL | ( | ... | ) |
Definition at line 326 of file kernel_overload_mk.h.
#define MkBufferMerge | ( | ... | ) |
Definition at line 274 of file kernel_overload_mk.h.
#define MkBufferMerge_NULL | ( | ... | ) |
Definition at line 273 of file kernel_overload_mk.h.
call the BufferCreate with default type MkBuffer1024S (1024 byte) …
call the BufferCreate with default type MkBuffer256S (256 byte) …
call the BufferCreate with default type MkBuffer64S (64 byte) …
Constructor - create a new MkBufferC with minimum size of internal storage …
The new instance belongs to the caller and may have to be released if necessary. A manual release using BufferDelete is always possible, but the instance can no longer be used afterwards.
There is a MkBufferCreateTT function for every PRIMITIVE TYPE.
[in] | mkrt | the MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only) |
[in] | type | A type defined as MkTypeS with a TT postfix (default: MkBuffer64S, possible: MkBuffer64S, MkBuffer256S and MkBuffer1024S) |
[in] | size | The initial size of the instance-local-storage. The MkBufferC has dynamic-memory-management, the size value is just a hint to provide enought memory for future tasks. The real size created is the maximum of type-ILS-size and size . (default: 0 = use the type-ILS-size) |
Constructor - create a new MkBufferC with an PRIMITIVE TYPE …
The new instance belongs to the caller and may have to be released if necessary. A manual release using BufferDelete is always possible, but the instance can no longer be used afterwards.
[in] | mkrt | the MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only) |
[in] | val | the PRIMITIVE TYPE object as data-source |
Constructor - create a new MkBufferC with an PRIMITIVE TYPE …
The new instance belongs to the caller and may have to be released if necessary. A manual release using BufferDelete is always possible, but the instance can no longer be used afterwards.
[in] | mkrt | the MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only) |
[in] | val | the PRIMITIVE TYPE object as data-source |
Constructor - create a new MkBufferC with an PRIMITIVE TYPE …
The new instance belongs to the caller and may have to be released if necessary. A manual release using BufferDelete is always possible, but the instance can no longer be used afterwards.
[in] | mkrt | the MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only) |
[in] | val | the PRIMITIVE TYPE object as data-source |
Constructor - create a new MkBufferC with an PRIMITIVE TYPE …
The new instance belongs to the caller and may have to be released if necessary. A manual release using BufferDelete is always possible, but the instance can no longer be used afterwards.
[in] | mkrt | the MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only) |
[in] | val | the PRIMITIVE TYPE object as data-source |
Constructor - create a new MkBufferC with an PRIMITIVE TYPE …
The new instance belongs to the caller and may have to be released if necessary. A manual release using BufferDelete is always possible, but the instance can no longer be used afterwards.
[in] | mkrt | the MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only) |
[in] | val | the PRIMITIVE TYPE object as data-source |
Constructor - create a new MkBufferC with an PRIMITIVE TYPE …
The new instance belongs to the caller and may have to be released if necessary. A manual release using BufferDelete is always possible, but the instance can no longer be used afterwards.
[in] | mkrt | the MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only) |
[in] | val | the PRIMITIVE TYPE object as data-source |
Constructor - create a new MkBufferC with an PRIMITIVE TYPE …
The new instance belongs to the caller and may have to be released if necessary. A manual release using BufferDelete is always possible, but the instance can no longer be used afterwards.
[in] | mkrt | the MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only) |
[in] | val | the PRIMITIVE TYPE object as data-source |
Constructor - create a new MkBufferC with an PRIMITIVE TYPE …
The new instance belongs to the caller and may have to be released if necessary. A manual release using BufferDelete is always possible, but the instance can no longer be used afterwards.
[in] | mkrt | the MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only) |
[in] | val | the PRIMITIVE TYPE object as data-source |
Constructor - create a new MkBufferC with an PRIMITIVE TYPE …
The new instance belongs to the caller and may have to be released if necessary. A manual release using BufferDelete is always possible, but the instance can no longer be used afterwards.
[in] | mkrt | the MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only) |
[in] | val | the PRIMITIVE TYPE object as data-source |
void MkBufferCreateLOCAL_T | ( | MK_MACRO_TYP | cls, |
MK_MACRO_TYP | name, | ||
MK_NUM const | size ) |
Constructor - create a new MkBufferC with an PRIMITIVE TYPE …
The new instance belongs to the caller and may have to be released if necessary. A manual release using BufferDelete is always possible, but the instance can no longer be used afterwards.
[in] | mkrt | the MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only) |
[in] | val | the PRIMITIVE TYPE object as data-source |
void MkBufferCreateTLS_inout_T | ( | MK_MACRO_TYP | cls, |
MK_MACRO_TYP | name, | ||
MK_BUF * | inout ) |
same as BufferCreate but require no cleanup
[in] | mkrt | the MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only) |
[in] | tlsName | An per-thread unique name (string) to identify the reuse-able instance-storage. if tlsName is MK_NULL or "" than a MK_NULL is returned |
[in] | resetB | should the new object be reset? |
void MkBufferCreateTLS_T | ( | MK_MACRO_TYP | cls, |
MK_MACRO_TYP | name, | ||
MK_NUM const | size ) |
Destructor - delete a MkBufferC instance …
There are two different ways to delete an instance:
ObjectDispose | to free the internal data but keep the outher shell alive - this is called a SOFT-DELETE |
ObjectDelete | to delete the outher shell including the internal data - this is called a HARD-DELETE |
Dup-Constructor - create a new MkBufferC instance as copy from an existing MkBufferC instance
The new instance belongs to the caller and may have to be released if necessary. A manual release using BufferDelete is always possible, but the instance can no longer be used afterwards.
[in] | mkrt | the MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only) |
[in] | buf | the MkBufferS instance to work on |
initialize or free an MkBufferC reference-instance …
Example: create a buffer-reference with default size (ILS) of 64 bytes.
[in] | mkrt | the MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only) |
[in] | buf | the MkBufferS instance to work on - attention: have to be initialised with '\0' |
initialize or free an MkBufferC reference-instance …
Example: create a buffer-reference with default size (ILS) of 64 bytes.
[in] | mkrt | the MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only) |
[in] | buf | the MkBufferS instance to work on - attention: have to be initialised with '\0' |
[in] | type | A type defined as MkTypeS with a TT postfix - (default: NULL=MkBuffer64S) |
[in] | size | The initial size of the instance-local-storage. The MkBufferC has dynamic-memory-management, the size value is just a hint to provide enought memory for future tasks. The real size created is the maximum of type-ILS-size and size . (default: 0 = use the type-ILS-size) |
Merge-Constructor - create a new MkBufferC as a merge from an existing object …
The Merge-Constructor create a new instance and merge all internal data from the src into the new instance. After the Merge-Constructor the BufferResetFull is called for the merge-source bus.
One usage of the Merge-Constructor is to get a lightweight-copy of a Thread-Local-Storage object for external usage.
[in] | mkrt | the MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only) |
[in] | buf | the MkBufferS instance to work on |
MK_NULL
on error or if no Merge-Constructor is available