theKernel 10.0
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

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

MkBufferListC - Export - inline - interact with an external software

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

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

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

MkBufferListC - Export - function

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

MkBufferListC - Introspection - function

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

MkBufferListC - Misc - function

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:
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
#define MK_RT_CALL

Definition at line 477 of file kernel_overload_mk.h.

◆ MkBufferListHandleGet_NULL

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

Definition at line 476 of file kernel_overload_mk.h.

◆ MkBufferListHandleResolve

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

Definition at line 473 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 null with an error set.
  • If netHdl is 0 than null is returned and the upper-code decide how to deal with it.
  • MkBufferListHandleResolve return an valid MK_BFL or null if the netHdl is invalid or the underlying object has already been deleted.
    • If a 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 281 of file MkBufferListC_def_mk.h.

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

◆ MkBufferListHandleResolve_NULL

#define MkBufferListHandleResolve_NULL ( ...)
Value:

Definition at line 472 of file kernel_overload_mk.h.

◆ MkBufferListInstances

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

Definition at line 488 of file kernel_overload_mk.h.

◆ MkBufferListInstances_NULL

#define MkBufferListInstances_NULL ( )
Value:

Definition at line 487 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 1661 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 1666 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 1548 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 1551 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 1554 of file LibMkKernel_mk.h.

Function Documentation

◆ MkBufferListGetNull()

static MK_BFL MkBufferListGetNull ( void )
static

Null-Slot - return a MkBufferListC typed NULL instance …

Definition at line 306 of file MkBufferListC_def_mk.h.

306 {
307 return (MK_BFL)MK_NULL;
308 }
#define MK_NULL
The Programming-Language-Micro-Kernel (PLMK) NULL value as null in Java …
+ Here is the caller graph for this function:

◆ MkBufferListGetNullP()

MK_BFL MkBufferListGetNullP ( void )

Non-inline replacement for MkBufferListGetNull

◆ MkBufferListHandleGet_RT()

static MK_HDL MkBufferListHandleGet_RT ( MK_RT mkrt,
MK_BFL const bfl )
static

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.

By default, the export-hdl is initialized to "0", which is equivalent to does not exist. This function returns a non-zero and unique export-hdl that is recreated if necessary.

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 248 of file MkBufferListC_def_mk.h.

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

◆ MkBufferListHandleGetP()

MK_HDL MkBufferListHandleGetP ( MK_RT mkrt,
MK_BFL const bfl )

Non-inline replacement for MkBufferListHandleGet

◆ MkBufferListHandleResolve_RT()

static MK_BFL MkBufferListHandleResolve_RT ( MK_RT mkrt,
MK_HDL const netHdl )
static

Handle-Resolve-Slot - return a MkBufferListC from netHdl or 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 null if netHdl is invalid

Definition at line 265 of file MkBufferListC_def_mk.h.

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

◆ MkBufferListHandleResolveP()

MK_BFL MkBufferListHandleResolveP ( MK_RT mkrt,
MK_HDL const netHdl )

Non-inline replacement for MkBufferListHandleResolve

◆ MkBufferListInstances_RT()

static MK_BFL MkBufferListInstances_RT ( MK_RT mkrt)
static

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

The head-instance is the last instance created.

Definition at line 13182 of file LibMkKernel_mk.h.

13182 {
13185}
#define MkBufferListC_TT
class as MkTypeS-class-type, useable in a class-macro as: class##_TT …
#define MK_STATIC_RT
static MK_OBJ MkTypeInstances(MK_TYP const typ)
access the instance attribute of the type…

◆ MkBufferListInstancesP()

MK_BFL MkBufferListInstancesP ( MK_RT mkrt)

Non-inline replacement for MkBufferListInstances

◆ MkBufferListNext()

static MK_BFL MkBufferListNext ( MK_BFL const bfl)
static

get next instance from linked-list of MkBufferListS type

Definition at line 13189 of file LibMkKernel_mk.h.

13189 {
13190 MK_INSTANCE_HDL(bfl);
13191 return (MK_BFL)MkBufferListC_X2obj(bfl)->obj_protect.next;
13192}
#define MkBufferListC_X2obj(x)
#define MK_INSTANCE_HDL(x)
+ Here is the caller graph for this function:

◆ MkBufferListNextP()

MK_BFL MkBufferListNextP ( MK_BFL const bfl)

Non-inline replacement for MkBufferListNext

◆ MkBufferListPrev()

static MK_BFL MkBufferListPrev ( MK_BFL const bfl)
static

get previous instance from linked-list of MkBufferListS type

Definition at line 13196 of file LibMkKernel_mk.h.

13196 {
13197 MK_INSTANCE_HDL(bfl);
13198 return (MK_BFL)MkBufferListC_X2obj(bfl)->obj_protect.prev;
13199}
+ Here is the caller graph for this function:

◆ MkBufferListPrevP()

MK_BFL MkBufferListPrevP ( MK_BFL const bfl)

Non-inline replacement for MkBufferListPrev