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 MkLogFileSlibmkkernel::MK_LFL
 class-shortcut for struct MkLogFileS *, all shortcut using the XX_YYY syntax (only for public API) …
 
typedef const struct MkLogFileSlibmkkernel::MK_LFLN
 class-shortcut for const struct MkLogFileS *, all const shortcut using the XX_YYYC syntax (only for public API) …
 
typedef struct MkLogFileS libmkkernel::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 libmkkernel::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 libmkkernel::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 libmkkernel::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 libmkkernel::MkLogFileInstances_RT (MK_RT mkrt)
 get head-instance from linked-list of MkLogFileS type …
 
static MK_LFL libmkkernel::MkLogFileNext (MK_LFL const lfl)
 get next instance from linked-list of MkLogFileS type
 
static MK_LFL libmkkernel::MkLogFilePrev (MK_LFL const lfl)
 get previous instance from linked-list of MkLogFileS type
 

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:
MkLogFileHandleGet_RT(MK_RT_CALL __VA_ARGS__)
#define MK_RT_CALL

Definition at line 1448 of file kernel_overload_mk.h.

◆ MkLogFileHandleGet_NULL

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

Definition at line 1447 of file kernel_overload_mk.h.

◆ MkLogFileHandleResolve

#define MkLogFileHandleResolve ( ...)
Value:
MkLogFileHandleResolve_RT(MK_RT_CALL __VA_ARGS__)

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; \
})
#define MkLogFileHandleResolve(...)

wrapper for MkLogFileHandleResolve with error-handline

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

Definition at line 9323 of file LibMkKernel_mk.h.

9323
9325
9327// Class export & import
9328
9332 __parser__(flags=new,doc-group=_ignore_,doc-index=Class,doc-name=Misc,class=MkLogFileC,null-return-allow)
9335 return (MK_LFL)MK_NULL;
9336 }
#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_LFL MkLogFileGetNull(void)
Null-Slot - return a MkLogFileC typed NULL instance …
struct MkLogFileS * MK_LFL
class-shortcut for struct MkLogFileS *, all shortcut using the XX_YYY syntax (only for public API) …
#define MK_ATTR_STATIC

◆ MkLogFileHandleResolve_NULL

#define MkLogFileHandleResolve_NULL ( ...)
Value:
MkLogFileHandleResolve_RT(MK_RT_CALL_NULL __VA_ARGS__)

Definition at line 1443 of file kernel_overload_mk.h.

◆ MkLogFileInstances

#define MkLogFileInstances ( )
Value:
MkLogFileInstances_RT(MK_RT_CALL_ONLY)
#define MK_RT_CALL_ONLY

Definition at line 1459 of file kernel_overload_mk.h.

◆ MkLogFileInstances_NULL

#define MkLogFileInstances_NULL ( )
Value:
MkLogFileInstances_RT(MK_RT_CALL_NULL_ONLY)
#define MK_RT_CALL_NULL_ONLY

Definition at line 1458 of file kernel_overload_mk.h.

Typedef Documentation

◆ 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* libmkkernel::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

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 libmkkernel::MkLogFileGetNull ( void )
inlinestatic

Null-Slot - return a MkLogFileC typed NULL instance …

Definition at line 9348 of file LibMkKernel_mk.h.

+ Here is the caller graph for this function:

◆ MkLogFileHandleGet_RT()

static MK_HDL libmkkernel::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 9290 of file LibMkKernel_mk.h.

◆ MkLogFileHandleResolve_RT()

static MK_LFL libmkkernel::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 9307 of file LibMkKernel_mk.h.

9309 { \
9310 MK_HDL tmpHdl=netHdl; \
9311 MK_LFL tmp; \
9312 if (tmpHdl==0) { \
int32_t MK_HDL
4 byte int handle data-type

◆ MkLogFileInstances_RT()

static MK_LFL libmkkernel::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 13336 of file LibMkKernel_mk.h.

13336 {
13337 MK_INSTANCE_HDL(lfl);
13338 return (MK_LFL)MkLogFileC_X2obj(lfl)->obj_protect.prev;
13339}
#define MkLogFileC_X2obj(x)
#define MK_INSTANCE_HDL(x)

◆ MkLogFileNext()

static MK_LFL libmkkernel::MkLogFileNext ( MK_LFL const lfl)
inlinestatic

get next instance from linked-list of MkLogFileS type

Definition at line 13343 of file LibMkKernel_mk.h.

+ Here is the caller graph for this function:

◆ MkLogFilePrev()

static MK_LFL libmkkernel::MkLogFilePrev ( MK_LFL const lfl)
inlinestatic

get previous instance from linked-list of MkLogFileS type

Definition at line 13350 of file LibMkKernel_mk.h.

+ Here is the caller graph for this function: