theKernel 10.0 NHI1 - theKernel - theLink - theConfig - theSq3Lite - theCompiler - theBrain - theGuard
c - tcl - py - rb - jv - cc
Loading...
Searching...
No Matches
MkBufferListC_Class_C_API

MkBufferListC - define the class … More...

+ Collaboration diagram for MkBufferListC_Class_C_API:

Topics

 MkBufferListC_Class_Define_C_API
 MkBufferListC - low level definition, access and cast …
 

Typedefs

typedef struct MkBufferListSMK_BFL
 class-shortcut for struct MkBufferListS *, all shortcut using the XX_YYY syntax (only for public API) …
 
typedef const struct MkBufferListSMK_BFLN
 class-shortcut for const struct MkBufferListS *, all const shortcut using the XX_YYYC syntax (only for public API) …
 
typedef struct MkBufferListS MK_BFLR
 reference-shortcut for struct MkBufferListS, all shortcut using the XX_YYYR syntax (only for public API) …
 
typedef struct MkBufferListSMK_BAC
 a list of 'buffer' as last argument in function …
 
typedef const struct MkBufferListSMK_BACN
 const - a list of 'buffer' as last argument in function …
 

MkBufferListC - Introspection - inline - access to all instances created by class starting with the last one

MK_BFL MkBufferListInstances_RT (MK_PARSER_RT_ONLY)
 get head-instance from linked-list of MkBufferListS type …
 
MK_BFL MkBufferListNext (MK_BFL const bfl)
 get next instance from linked-list of MkBufferListS type
 
MK_BFL MkBufferListPrev (MK_BFL const bfl)
 get previous instance from linked-list of MkBufferListS type
 

MkBufferListC - Export - inline - interact with an external software

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
 
MK_BFL MkBufferListHandleResolve_RT (MK_RT mkrt, MK_HDL const netHdl)
 Handle-Resolve-Slot - return a MkBufferListC from netHdl or MK_NULL if invalid…
 
#define MkBufferListHandleResolve_e(netHdl)
 wrapper for MkBufferListHandleResolve with error-handline
 

MkBufferListC - Misc - function - unspecified functions to perform different tasks

MK_BFL MkBufferListGetNull (void)
 Null-Slot - return a MkBufferListC typed NULL instance …
 

MkBufferListC - Export - function

MK_EXTERN MK_BFL MkBufferListHandleResolveP (MK_RT mkrt, MK_HDL const netHdl)
 Non-inline replacement for MkBufferListHandleResolve
 
MK_EXTERN MK_HDL MkBufferListHandleGetP (MK_RT mkrt, MK_BFL const bfl)
 Non-inline replacement for MkBufferListHandleGet
 

MkBufferListC - Introspection - function

MK_EXTERN MK_BFL MkBufferListNextP (MK_BFL const bfl)
 Non-inline replacement for MkBufferListNext
 
MK_EXTERN MK_BFL MkBufferListPrevP (MK_BFL const bfl)
 Non-inline replacement for MkBufferListPrev
 
MK_EXTERN MK_BFL MkBufferListInstancesP (MK_PARSER_RT_ONLY)
 Non-inline replacement for MkBufferListInstances
 

MkBufferListC - Misc - function

MK_EXTERN MK_BFL MkBufferListGetNullP (void)
 Non-inline replacement for MkBufferListGetNull
 

MkBufferListC - Export - overload

#define MkBufferListHandleResolve_NULL(...)
 
#define MkBufferListHandleResolve(...)
 
#define MkBufferListHandleGet_NULL(...)
 
#define MkBufferListHandleGet(...)
 

MkBufferListC - Introspection - overload

#define MkBufferListInstances_NULL()
 
#define MkBufferListInstances()
 

Detailed Description

MkBufferListC - define the class …

Macro Definition Documentation

◆ MkBufferListHandleGet

#define MkBufferListHandleGet ( ...)
Value:
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
#define MK_RT_CALL

Definition at line 480 of file kernel_overload_mk.h.

◆ MkBufferListHandleGet_NULL

#define MkBufferListHandleGet_NULL ( ...)
Value:
#define MK_RT_CALL_NULL

Definition at line 479 of file kernel_overload_mk.h.

◆ MkBufferListHandleResolve

#define MkBufferListHandleResolve ( ...)
Value:
MK_BFL MkBufferListHandleResolve_RT(MK_RT mkrt, MK_HDL const netHdl)
Handle-Resolve-Slot - return a MkBufferListC from netHdl or MK_NULL if invalid…

Definition at line 476 of file kernel_overload_mk.h.

◆ MkBufferListHandleResolve_e

#define MkBufferListHandleResolve_e ( netHdl)
Value:
({ \
MK_HDL tmpHdl=netHdl; \
MK_BFL tmp; \
if (tmpHdl==0) { \
tmp=NULL; \
} else { \
if (tmp==NULL) { \
MkErrorSetC_1_NULL("ERROR: 'MkBufferListC' handle is 'NULL'"); \
goto error; \
}; \
}; \
tmp; \
})
#define MkBufferListHandleResolve(...)
int32_t MK_HDL
4 byte int handle data-type
The CLASS used to store a list of MkBufferS items into a flat array…

wrapper for MkBufferListHandleResolve with error-handline

Parameters
[in]netHdlThe handle previously returned by MkObjectHandleGet.
Returns
Return an valid MK_BFL or MK_NULL with an error set.
  • If netHdl is 0 than MK_NULL is returned and the upper-code decide how to deal with it.
  • MkBufferListHandleResolve return an valid MK_BFL or MK_NULL if the netHdl is invalid or the underlying object has already been deleted.
    • If a MK_NULL is returned than an error-message is created and a jump to the label error is done.
    • If a MK_BFL is returned than the netHdl is valid.

Definition at line 283 of file MkBufferListC_def_mk.h.

283#define MkBufferListHandleResolve_e(netHdl) ({ \
284 MK_HDL tmpHdl=netHdl; \
285 MK_BFL tmp; \
286 if (tmpHdl==0) { \
287 tmp=NULL; \
288 } else { \
289 tmp=MkBufferListHandleResolve(tmpHdl); \
290 if (tmp==NULL) { \
291 MkErrorSetC_1_NULL("ERROR: 'MkBufferListC' handle is 'NULL'"); \
292 goto error; \
293 }; \
294 }; \
295 tmp; \
296})

◆ MkBufferListHandleResolve_NULL

#define MkBufferListHandleResolve_NULL ( ...)
Value:

Definition at line 475 of file kernel_overload_mk.h.

◆ MkBufferListInstances

#define MkBufferListInstances ( )
Value:
MK_BFL MkBufferListInstances_RT(MK_PARSER_RT_ONLY)
get head-instance from linked-list of MkBufferListS type …
#define MK_RT_CALL_ONLY

Definition at line 491 of file kernel_overload_mk.h.

◆ MkBufferListInstances_NULL

#define MkBufferListInstances_NULL ( )
Value:

Definition at line 490 of file kernel_overload_mk.h.

Typedef Documentation

◆ MK_BAC

typedef struct MkBufferListS* MK_BAC

a list of 'buffer' as last argument in function …

Definition at line 1534 of file LibMkKernel_mk.h.

◆ MK_BACN

typedef const struct MkBufferListS* MK_BACN

const - a list of 'buffer' as last argument in function …

Definition at line 1539 of file LibMkKernel_mk.h.

◆ MK_BFL

typedef struct MkBufferListS* MK_BFL

class-shortcut for struct MkBufferListS *, all shortcut using the XX_YYY syntax (only for public API) …

Definition at line 1421 of file LibMkKernel_mk.h.

◆ MK_BFLN

typedef const struct MkBufferListS* MK_BFLN

class-shortcut for const struct MkBufferListS *, all const shortcut using the XX_YYYC syntax (only for public API) …

Definition at line 1424 of file LibMkKernel_mk.h.

◆ MK_BFLR

typedef struct MkBufferListS MK_BFLR

reference-shortcut for struct MkBufferListS, all shortcut using the XX_YYYR syntax (only for public API) …

Definition at line 1427 of file LibMkKernel_mk.h.

Function Documentation

◆ MkBufferListGetNull()

MK_BFL MkBufferListGetNull ( void )
inline

Null-Slot - return a MkBufferListC typed NULL instance …

Definition at line 308 of file MkBufferListC_def_mk.h.

308 {
309 return (MK_BFL)MK_NULL;
310 }
#define MK_NULL
The Programming-Language-Micro-Kernel (PLMK) NULL value as MK_NULL in C …

◆ MkBufferListGetNullP()

MK_EXTERN MK_BFL MkBufferListGetNullP ( void )

Non-inline replacement for MkBufferListGetNull

◆ MkBufferListHandleGet_RT()

MK_HDL MkBufferListHandleGet_RT ( MK_RT mkrt,
MK_BFL const bfl )
inline

Handle-Get-Slot - returns a export-hdl to the MkBufferListC useable for external storage

The export-hdl is a reference to an instance that can be stored in software and converted back into an instance using the MkBufferListHandleResolve.

The export-hdl is only valid until the Programming-Language-Micro-Kernel (PLMK) ends.

example: The export-hdl is used in rpc to identify an object across the network.

Parameters
[in]mkrtthe MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only)
[in]bflthe MkBufferListS instance to work on
Returns
the required export-hdl

Definition at line 250 of file MkBufferListC_def_mk.h.

253 {
254 return MkObjectHandleGet(bfl?MkOBJ(bfl):NULL);
255}
#define MkObjectHandleGet(...)
#define MkOBJ(x)
cast a known-object into an MkObjectS pointer

◆ MkBufferListHandleGetP()

MK_EXTERN MK_HDL MkBufferListHandleGetP ( MK_RT mkrt,
MK_BFL const bfl )

Non-inline replacement for MkBufferListHandleGet

◆ MkBufferListHandleResolve_RT()

MK_BFL MkBufferListHandleResolve_RT ( MK_RT mkrt,
MK_HDL const netHdl )
inline

Handle-Resolve-Slot - return a MkBufferListC from netHdl or MK_NULL if invalid…

The MkBufferListHandleResolve undo the MkBufferListHandleGet and is intended to export a unique identifer into external code not belonging to the Programming-Language-Micro-Kernel (PLMK).

Parameters
[in]mkrtthe MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only)
[in]netHdlhandle former exported with MkBufferListHandleGet
Returns
the required handle or MK_NULL if netHdl is invalid

Definition at line 267 of file MkBufferListC_def_mk.h.

270 {
271 return MkBfl(MkObjectHandleResolve(netHdl));
272}
MK_BFL MkBfl(MK_MNG mng)
cast a unknown-object into an MkBufferListS pointer or NULL if not possible
#define MkObjectHandleResolve(...)

◆ MkBufferListHandleResolveP()

MK_EXTERN MK_BFL MkBufferListHandleResolveP ( MK_RT mkrt,
MK_HDL const netHdl )

Non-inline replacement for MkBufferListHandleResolve

◆ MkBufferListInstances_RT()

MK_BFL MkBufferListInstances_RT ( MK_PARSER_RT_ONLY )
inline

get head-instance from linked-list of MkBufferListS type …

The head-instance is the last instance created.

Definition at line 12327 of file LibMkKernel_mk.h.

12327 {
12329 return (MK_BFL)MkBufferListC_TT->instances;
12330}
#define MkBufferListC_TT
class as MkTypeS-class-type, useable in a class-macro as: class##_TT …
#define MK_CLASS_RT

◆ MkBufferListInstancesP()

MK_EXTERN MK_BFL MkBufferListInstancesP ( MK_PARSER_RT_ONLY )

Non-inline replacement for MkBufferListInstances

◆ MkBufferListNext()

MK_BFL MkBufferListNext ( MK_BFL const bfl)
inline

get next instance from linked-list of MkBufferListS type

Definition at line 12334 of file LibMkKernel_mk.h.

12334 {
12335 MK_INSTANCE_HDL(bfl);
12336 return (MK_BFL)MkBufferListC_X2obj(bfl)->obj_protect.next;
12337}
#define MkBufferListC_X2obj(x)
#define MK_INSTANCE_HDL(x)

◆ MkBufferListNextP()

MK_EXTERN MK_BFL MkBufferListNextP ( MK_BFL const bfl)

Non-inline replacement for MkBufferListNext

◆ MkBufferListPrev()

MK_BFL MkBufferListPrev ( MK_BFL const bfl)
inline

get previous instance from linked-list of MkBufferListS type

Definition at line 12341 of file LibMkKernel_mk.h.

12341 {
12342 MK_INSTANCE_HDL(bfl);
12343 return (MK_BFL)MkBufferListC_X2obj(bfl)->obj_protect.prev;
12344}

◆ MkBufferListPrevP()

MK_EXTERN MK_BFL MkBufferListPrevP ( MK_BFL const bfl)

Non-inline replacement for MkBufferListPrev