theKernel 10.0
Loading...
Searching...
No Matches
MkLogFileC_Class_C_API

MkLogFileC - define the class … More...

+ Collaboration diagram for MkLogFileC_Class_C_API:

Topics

 MkLogFileC_Class_Define_C_API
 MkLogFileC - low level definition, access and cast …
 

Typedefs

typedef struct MkLogFileSMK_LFL
 class-shortcut for struct MkLogFileS *, all shortcut using the XX_YYY syntax (only for public API) …
 
typedef const struct MkLogFileSMK_LFLN
 class-shortcut for const struct MkLogFileS *, all const shortcut using the XX_YYYC syntax (only for public API) …
 
typedef struct MkLogFileS MK_LFLR
 reference-shortcut for struct MkLogFileS, all shortcut using the XX_YYYR syntax (only for public API) …
 

MkLogFileC - Export - inline - interact with an external software

static MK_HDL MkLogFileHandleGet_RT (MK_RT mkrt, MK_LFL const lfl)
 Handle-Get-Slot - returns a export-hdl to the MkLogFileC useable for external storage
 
static MK_LFL MkLogFileHandleResolve_RT (MK_RT mkrt, MK_HDL const netHdl)
 Handle-Resolve-Slot - return a MkLogFileC from netHdl or "MK_NULL" if invalid…
 
#define MkLogFileHandleResolve_e(netHdl)
 wrapper for MkLogFileHandleResolve with error-handline
 

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

static MK_LFL MkLogFileGetNull (void)
 Null-Slot - return a MkLogFileC typed NULL instance …
 

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

static MK_LFL MkLogFileInstances_RT (MK_RT mkrt)
 get head-instance from linked-list of MkLogFileS type …
 
static MK_LFL MkLogFileNext (MK_LFL const lfl)
 get next instance from linked-list of MkLogFileS type
 
static MK_LFL MkLogFilePrev (MK_LFL const lfl)
 get previous instance from linked-list of MkLogFileS type
 

MkLogFileC - Export - function

MK_LFL MkLogFileHandleResolveP (MK_RT mkrt, MK_HDL const netHdl)
 Non-inline replacement for MkLogFileHandleResolve
 
MK_HDL MkLogFileHandleGetP (MK_RT mkrt, MK_LFL const lfl)
 Non-inline replacement for MkLogFileHandleGet
 

MkLogFileC - Introspection - function

MK_LFL MkLogFileNextP (MK_LFL const lfl)
 Non-inline replacement for MkLogFileNext
 
MK_LFL MkLogFilePrevP (MK_LFL const lfl)
 Non-inline replacement for MkLogFilePrev
 
MK_LFL MkLogFileInstancesP (MK_RT mkrt)
 Non-inline replacement for MkLogFileInstances
 

MkLogFileC - Misc - function

MK_LFL MkLogFileGetNullP (void)
 Non-inline replacement for MkLogFileGetNull
 

MkLogFileC - Export - overload

#define MkLogFileHandleResolve_NULL(...)
 
#define MkLogFileHandleResolve(...)
 
#define MkLogFileHandleGet_NULL(...)
 
#define MkLogFileHandleGet(...)
 

MkLogFileC - Introspection - overload

#define MkLogFileInstances_NULL()
 
#define MkLogFileInstances()
 

Detailed Description

MkLogFileC - define the class …

Macro Definition Documentation

◆ MkLogFileHandleGet

#define MkLogFileHandleGet ( ...)
Value:
static MK_HDL MkLogFileHandleGet_RT(MK_RT mkrt, MK_LFL const lfl)
Handle-Get-Slot - returns a export-hdl to the MkLogFileC useable for external storage
#define MK_RT_CALL

Definition at line 1448 of file kernel_overload_mk.h.

◆ MkLogFileHandleGet_NULL

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

Definition at line 1447 of file kernel_overload_mk.h.

◆ MkLogFileHandleResolve

#define MkLogFileHandleResolve ( ...)
Value:
static MK_LFL MkLogFileHandleResolve_RT(MK_RT mkrt, MK_HDL const netHdl)
Handle-Resolve-Slot - return a MkLogFileC from netHdl or "MK_NULL" if invalid…

Definition at line 1444 of file kernel_overload_mk.h.

◆ MkLogFileHandleResolve_e

#define MkLogFileHandleResolve_e ( netHdl)
Value:
({ \
MK_HDL tmpHdl=netHdl; \
MK_LFL tmp; \
if (tmpHdl==0) { \
tmp=NULL; \
} else { \
tmp=MkLogFileHandleResolve(tmpHdl); \
if (tmp==NULL) { \
MkErrorSetC_1_NULL("ERROR: 'MkLogFileC' handle is 'NULL'"); \
goto error; \
}; \
}; \
tmp; \
})
int32_t MK_HDL
4 byte int handle data-type
#define MkLogFileHandleResolve(...)
define a MkLogFileC object …

wrapper for MkLogFileHandleResolve with error-handline

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

Definition at line 9309 of file LibMkKernel_mk.h.

9309#define MkLogFileHandleResolve_e(netHdl) ({ \
9310 MK_HDL tmpHdl=netHdl; \
9311 MK_LFL tmp; \
9312 if (tmpHdl==0) { \
9313 tmp=NULL; \
9314 } else { \
9315 tmp=MkLogFileHandleResolve(tmpHdl); \
9316 if (tmp==NULL) { \
9317 MkErrorSetC_1_NULL("ERROR: 'MkLogFileC' handle is 'NULL'"); \
9318 goto error; \
9319 }; \
9320 }; \
9321 tmp; \
9322})

◆ MkLogFileHandleResolve_NULL

#define MkLogFileHandleResolve_NULL ( ...)
Value:

Definition at line 1443 of file kernel_overload_mk.h.

◆ MkLogFileInstances

#define MkLogFileInstances ( )
Value:
static MK_LFL MkLogFileInstances_RT(MK_RT mkrt)
get head-instance from linked-list of MkLogFileS type …
#define MK_RT_CALL_ONLY

Definition at line 1459 of file kernel_overload_mk.h.

◆ MkLogFileInstances_NULL

#define MkLogFileInstances_NULL ( )
Value:

Definition at line 1458 of file kernel_overload_mk.h.

Typedef Documentation

◆ MK_LFL

typedef struct MkLogFileS* MK_LFL

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

Definition at line 1562 of file LibMkKernel_mk.h.

◆ MK_LFLN

typedef const struct MkLogFileS* MK_LFLN

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

Definition at line 1565 of file LibMkKernel_mk.h.

◆ MK_LFLR

typedef struct MkLogFileS MK_LFLR

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

Definition at line 1568 of file LibMkKernel_mk.h.

Function Documentation

◆ MkLogFileGetNull()

static MK_LFL MkLogFileGetNull ( void )
inlinestatic

Null-Slot - return a MkLogFileC typed NULL instance …

Definition at line 9334 of file LibMkKernel_mk.h.

9334 {
9335 return (MK_LFL)MK_NULL;
9336 }
#define MK_NULL
The Programming-Language-Micro-Kernel (PLMK) NULL value as "MK_NULL" in Atl …
+ Here is the caller graph for this function:

◆ MkLogFileGetNullP()

MK_LFL MkLogFileGetNullP ( void )

Non-inline replacement for MkLogFileGetNull

◆ MkLogFileHandleGet_RT()

static MK_HDL MkLogFileHandleGet_RT ( MK_RT mkrt,
MK_LFL const lfl )
inlinestatic

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

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]lflthe MkLogFileS instance to work on
Returns
the required export-hdl

Definition at line 9276 of file LibMkKernel_mk.h.

9279 {
9280 return MkObjectHandleGet(lfl?MkOBJ(lfl):NULL);
9281}
#define MkObjectHandleGet(...)
#define MkOBJ(x)
cast a known-object into an MkObjectS pointer

◆ MkLogFileHandleGetP()

MK_HDL MkLogFileHandleGetP ( MK_RT mkrt,
MK_LFL const lfl )

Non-inline replacement for MkLogFileHandleGet

◆ MkLogFileHandleResolve_RT()

static MK_LFL MkLogFileHandleResolve_RT ( MK_RT mkrt,
MK_HDL const netHdl )
inlinestatic

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

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

Definition at line 9293 of file LibMkKernel_mk.h.

9296 {
9297 return MkLfl(MkObjectHandleResolve(netHdl));
9298}
static MK_LFL MkLfl(MK_MNG mng)
cast a unknown-object into an MkLogFileS pointer or NULL if not possible
#define MkObjectHandleResolve(...)

◆ MkLogFileHandleResolveP()

MK_LFL MkLogFileHandleResolveP ( MK_RT mkrt,
MK_HDL const netHdl )

Non-inline replacement for MkLogFileHandleResolve

◆ MkLogFileInstances_RT()

static MK_LFL MkLogFileInstances_RT ( MK_RT mkrt)
inlinestatic

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

The head-instance is the last instance created.

Definition at line 13322 of file LibMkKernel_mk.h.

13322 {
13325}
#define MkLogFileC_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…

◆ MkLogFileInstancesP()

MK_LFL MkLogFileInstancesP ( MK_RT mkrt)

Non-inline replacement for MkLogFileInstances

◆ MkLogFileNext()

static MK_LFL MkLogFileNext ( MK_LFL const lfl)
inlinestatic

get next instance from linked-list of MkLogFileS type

Definition at line 13329 of file LibMkKernel_mk.h.

13329 {
13330 MK_INSTANCE_HDL(lfl);
13331 return (MK_LFL)MkLogFileC_X2obj(lfl)->obj_protect.next;
13332}
#define MkLogFileC_X2obj(x)
#define MK_INSTANCE_HDL(x)
+ Here is the caller graph for this function:

◆ MkLogFileNextP()

MK_LFL MkLogFileNextP ( MK_LFL const lfl)

Non-inline replacement for MkLogFileNext

◆ MkLogFilePrev()

static MK_LFL MkLogFilePrev ( MK_LFL const lfl)
inlinestatic

get previous instance from linked-list of MkLogFileS type

Definition at line 13336 of file LibMkKernel_mk.h.

13336 {
13337 MK_INSTANCE_HDL(lfl);
13338 return (MK_LFL)MkLogFileC_X2obj(lfl)->obj_protect.prev;
13339}
+ Here is the caller graph for this function:

◆ MkLogFilePrevP()

MK_LFL MkLogFilePrevP ( MK_LFL const lfl)

Non-inline replacement for MkLogFilePrev