theKernel 10.0 NHI1 - theKernel - theLink - theConfig - theSq3Lite - theCompiler - theBrain - theGuard
c - tcl - cs - py - rb - jv - cc
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 1420 of file kernel_overload_mk.h.

◆ MkLogFileHandleGet_NULL

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

Definition at line 1419 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 1416 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 9029 of file LibMkKernel_mk.h.

9029#define MkLogFileHandleResolve_e(netHdl) ({ \
9030 MK_HDL tmpHdl=netHdl; \
9031 MK_LFL tmp; \
9032 if (tmpHdl==0) { \
9033 tmp=NULL; \
9034 } else { \
9035 tmp=MkLogFileHandleResolve(tmpHdl); \
9036 if (tmp==NULL) { \
9037 MkErrorSetC_1_NULL("ERROR: 'MkLogFileC' handle is 'NULL'"); \
9038 goto error; \
9039 }; \
9040 }; \
9041 tmp; \
9042})

◆ MkLogFileHandleResolve_NULL

#define MkLogFileHandleResolve_NULL ( ...)
Value:

Definition at line 1415 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 1431 of file kernel_overload_mk.h.

◆ MkLogFileInstances_NULL

#define MkLogFileInstances_NULL ( )
Value:

Definition at line 1430 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 1480 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 1483 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 1486 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 9054 of file LibMkKernel_mk.h.

9054 {
9055 return (MK_LFL)MK_NULL;
9056 }
#define MK_NULL
The Programming-Language-Micro-Kernel (PLMK) NULL value as MK_NULL in C …

◆ 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 8996 of file LibMkKernel_mk.h.

8999 {
9000 return MkObjectHandleGet(lfl?MkOBJ(lfl):NULL);
9001}
#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 9013 of file LibMkKernel_mk.h.

9016 {
9017 return MkLfl(MkObjectHandleResolve(netHdl));
9018}
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 12792 of file LibMkKernel_mk.h.

12792 {
12794 return (MK_LFL)MkLogFileC_TT->instances;
12795}
#define MkLogFileC_TT
class as MkTypeS-class-type, useable in a class-macro as: class##_TT …
#define MK_STATIC_RT

◆ 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 12799 of file LibMkKernel_mk.h.

12799 {
12800 MK_INSTANCE_HDL(lfl);
12801 return (MK_LFL)MkLogFileC_X2obj(lfl)->obj_protect.next;
12802}
#define MkLogFileC_X2obj(x)
#define MK_INSTANCE_HDL(x)

◆ 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 12806 of file LibMkKernel_mk.h.

12806 {
12807 MK_INSTANCE_HDL(lfl);
12808 return (MK_LFL)MkLogFileC_X2obj(lfl)->obj_protect.prev;
12809}

◆ MkLogFilePrevP()

MK_LFL MkLogFilePrevP ( MK_LFL const lfl)

Non-inline replacement for MkLogFilePrev