theKernel 10.0
Loading...
Searching...
No Matches
MkRuntimeC_Class_C_API

MkRuntimeC - define the class … More...

+ Collaboration diagram for MkRuntimeC_Class_C_API:

Topics

 MkRuntimeC_Class_Define_C_API
 MkRuntimeC - low level definition, access and cast …
 

Typedefs

typedef struct MkRuntimeSlibmkkernel::MK_RT
 class-shortcut for struct MkRuntimeS *, all shortcut using the XX_YYY syntax (only for public API) …
 
typedef const struct MkRuntimeSlibmkkernel::MK_RTN
 class-shortcut for const struct MkRuntimeS *, all const shortcut using the XX_YYYC syntax (only for public API) …
 
typedef struct MkRuntimeS libmkkernel::MK_RTR
 reference-shortcut for struct MkRuntimeS, all shortcut using the XX_YYYR syntax (only for public API) …
 

MkRuntimeC - Export - inline - interact with an external software

static MK_HDL libmkkernel::MkRuntimeHandleGet_RT (MK_RT mkrt, MK_RT const rt)
 Handle-Get-Slot - returns a export-hdl to the MkRuntimeC useable for external storage
 
static MK_RT libmkkernel::MkRuntimeHandleResolve_RT (MK_RT mkrt, MK_HDL const netHdl)
 Handle-Resolve-Slot - return a MkRuntimeC from netHdl or MK_NULL if invalid…
 
#define MkRuntimeHandleResolve_e(netHdl)
 wrapper for MkRuntimeHandleResolve with error-handline
 

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

static MK_RT libmkkernel::MkRuntimeGetNull (void)
 Null-Slot - return a MkRuntimeC typed NULL instance …
 

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

static MK_RT libmkkernel::MkRuntimeInstances_RT (MK_RT mkrt)
 get head-instance from linked-list of MkRuntimeS type …
 
static MK_RT libmkkernel::MkRuntimeNext (MK_RT const rt)
 get next instance from linked-list of MkRuntimeS type
 
static MK_RT libmkkernel::MkRuntimePrev (MK_RT const rt)
 get previous instance from linked-list of MkRuntimeS type
 

MkRuntimeC - Export - overload

#define MkRuntimeHandleResolve_NULL(...)
 
#define MkRuntimeHandleResolve(...)
 
#define MkRuntimeHandleGet_NULL(...)
 
#define MkRuntimeHandleGet(...)
 

MkRuntimeC - Introspection - overload

#define MkRuntimeInstances_NULL()
 
#define MkRuntimeInstances()
 

Detailed Description

MkRuntimeC - define the class …

Macro Definition Documentation

◆ MkRuntimeHandleGet

#define MkRuntimeHandleGet ( ...)
Value:
MkRuntimeHandleGet_RT(MK_RT_CALL __VA_ARGS__)
#define MK_RT_CALL

Definition at line 1834 of file kernel_overload_mk.h.

◆ MkRuntimeHandleGet_NULL

#define MkRuntimeHandleGet_NULL ( ...)
Value:
MkRuntimeHandleGet_RT(MK_RT_CALL_NULL __VA_ARGS__)
#define MK_RT_CALL_NULL

Definition at line 1833 of file kernel_overload_mk.h.

◆ MkRuntimeHandleResolve

#define MkRuntimeHandleResolve ( ...)
Value:
MkRuntimeHandleResolve_RT(MK_RT_CALL __VA_ARGS__)

Definition at line 1830 of file kernel_overload_mk.h.

◆ MkRuntimeHandleResolve_e

#define MkRuntimeHandleResolve_e ( netHdl)
Value:
({ \
MK_HDL tmpHdl=netHdl; \
MK_RT tmp; \
if (tmpHdl==0) { \
tmp=NULL; \
} else { \
tmp=MkRuntimeHandleResolve(tmpHdl); \
if (tmp==NULL) { \
MkErrorSetC_1_NULL("ERROR: 'MkRuntimeC' handle is 'NULL'"); \
goto error; \
}; \
}; \
tmp; \
})
#define MkRuntimeHandleResolve(...)

wrapper for MkRuntimeHandleResolve with error-handline

Parameters
[in]netHdlThe handle previously returned by MkObjectHandleGet.
Returns
Return an valid libmkkernel::MK_RT 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.
  • MkRuntimeHandleResolve return an valid libmkkernel::MK_RT 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 libmkkernel::MK_RT is returned than the netHdl is valid.

Definition at line 12385 of file LibMkKernel_mk.h.

12385
12387
12389// Class export & import
12390
12394 __parser__(flags=new,doc-group=_ignore_,doc-index=Class,doc-name=Misc,class=MkRuntimeC,null-return-allow)
12397 return (MK_RT)MK_NULL;
12398 }
#define mk_inline
#define MK_NULL
The Programming-Language-Micro-Kernel (PLMK) NULL value as MK_NULL in C++ …
#define __parser__pop__
parser: stop apply a list of local attributes to a block of code …
#define __parser__(...)
parser: apply an attribute to an object in local scope …
static MK_RT MkRuntimeGetNull(void)
Null-Slot - return a MkRuntimeC typed NULL instance …
struct MkRuntimeS * MK_RT
class-shortcut for struct MkRuntimeS *, all shortcut using the XX_YYY syntax (only for public API) …
#define MK_ATTR_STATIC

◆ MkRuntimeHandleResolve_NULL

#define MkRuntimeHandleResolve_NULL ( ...)
Value:
MkRuntimeHandleResolve_RT(MK_RT_CALL_NULL __VA_ARGS__)

Definition at line 1829 of file kernel_overload_mk.h.

◆ MkRuntimeInstances

#define MkRuntimeInstances ( )
Value:
MkRuntimeInstances_RT(MK_RT_CALL_ONLY)
#define MK_RT_CALL_ONLY

Definition at line 1845 of file kernel_overload_mk.h.

◆ MkRuntimeInstances_NULL

#define MkRuntimeInstances_NULL ( )
Value:
MkRuntimeInstances_RT(MK_RT_CALL_NULL_ONLY)
#define MK_RT_CALL_NULL_ONLY

Definition at line 1844 of file kernel_overload_mk.h.

Typedef Documentation

◆ MK_RT

typedef struct MkRuntimeS* libmkkernel::MK_RT

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

Definition at line 1632 of file LibMkKernel_mk.h.

◆ MK_RTN

typedef const struct MkRuntimeS* libmkkernel::MK_RTN

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

Definition at line 1635 of file LibMkKernel_mk.h.

◆ MK_RTR

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

Definition at line 1638 of file LibMkKernel_mk.h.

Function Documentation

◆ MkRuntimeGetNull()

static MK_RT libmkkernel::MkRuntimeGetNull ( void )
inlinestatic

Null-Slot - return a MkRuntimeC typed NULL instance …

Definition at line 12410 of file LibMkKernel_mk.h.

◆ MkRuntimeHandleGet_RT()

static MK_HDL libmkkernel::MkRuntimeHandleGet_RT ( MK_RT mkrt,
MK_RT const rt )
inlinestatic

Handle-Get-Slot - returns a export-hdl to the MkRuntimeC 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 MkRuntimeHandleResolve.

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]rtthe MkRuntimeS instance to work on - the mk-runtime argument, used by MK_RT_CALL (C-only)
Returns
the required export-hdl

Definition at line 12352 of file LibMkKernel_mk.h.

◆ MkRuntimeHandleResolve_RT()

static MK_RT libmkkernel::MkRuntimeHandleResolve_RT ( MK_RT mkrt,
MK_HDL const netHdl )
inlinestatic

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

The MkRuntimeHandleResolve undo the MkRuntimeHandleGet 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 MkRuntimeHandleGet
Returns
the required handle or MK_NULL if netHdl is invalid

Definition at line 12369 of file LibMkKernel_mk.h.

12371 { \
12372 MK_HDL tmpHdl=netHdl; \
12373 MK_RT tmp; \
12374 if (tmpHdl==0) { \
int32_t MK_HDL
4 byte int handle data-type

◆ MkRuntimeInstances_RT()

static MK_RT libmkkernel::MkRuntimeInstances_RT ( MK_RT mkrt)
inlinestatic

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

The head-instance is the last instance created.

Definition at line 13406 of file LibMkKernel_mk.h.

13406 {
13407 MK_INSTANCE_HDL(rt);
13408 return (MK_RT)MkRuntimeC_X2obj(rt)->obj_protect.prev;
13409}
#define MkRuntimeC_X2obj(x)
#define MK_INSTANCE_HDL(x)

◆ MkRuntimeNext()

static MK_RT libmkkernel::MkRuntimeNext ( MK_RT const rt)
inlinestatic

get next instance from linked-list of MkRuntimeS type

Definition at line 13413 of file LibMkKernel_mk.h.

◆ MkRuntimePrev()

static MK_RT libmkkernel::MkRuntimePrev ( MK_RT const rt)
inlinestatic

get previous instance from linked-list of MkRuntimeS type

Definition at line 13420 of file LibMkKernel_mk.h.

13420 :hide);
13421__parser__global__(MkRuntimePrev:hide);
13422
#define __parser__global__(...)
parser: apply an attribute to a dunction in global scope …
+ Here is the caller graph for this function: