theLink 10.0 NHI1 - theKernel - theLink - theConfig - theSq3Lite - theCompiler - theBrain - theGuard
c - tcl - cs - py - rb - jv - cc
Loading...
Searching...
No Matches
MqDumpC_Class_C_API

MqDumpC - define the class … More...

+ Collaboration diagram for MqDumpC_Class_C_API:

Topics

 MqDumpC_Class_Define_C_API
 MqDumpC - low level definition, access and cast …
 

Typedefs

typedef struct MqDumpSMQ_DMP
 class-shortcut for struct MqDumpS *, all shortcut using the XX_YYY syntax (only for public API) …
 
typedef const struct MqDumpSMQ_DMPN
 class-shortcut for const struct MqDumpS *, all const shortcut using the XX_YYYC syntax (only for public API) …
 
typedef struct MqDumpS MQ_DMPR
 reference-shortcut for struct MqDumpS, all shortcut using the XX_YYYR syntax (only for public API) …
 

MqDumpC - Export - inline - interact with an external software

static MK_HDL MqDumpHandleGet_RT (MK_RT mkrt, MQ_DMP const dmp)
 Handle-Get-Slot - returns a export-hdl to the MqDumpC useable for external storage
 
static MQ_DMP MqDumpHandleResolve_RT (MK_RT mkrt, MK_HDL const netHdl)
 Handle-Resolve-Slot - return a MqDumpC from netHdl or MK_NULL if invalid…
 
#define MqDumpHandleResolve_e(netHdl)
 wrapper for MqDumpHandleResolve with error-handline
 

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

static MQ_DMP MqDumpGetNull (void)
 Null-Slot - return a MqDumpC typed NULL instance …
 

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

static MQ_DMP MqDumpInstances_RT (MK_RT mkrt)
 get head-instance from linked-list of MqDumpS type …
 
static MQ_DMP MqDumpNext (MQ_DMP const dmp)
 get next instance from linked-list of MqDumpS type
 
static MQ_DMP MqDumpPrev (MQ_DMP const dmp)
 get previous instance from linked-list of MqDumpS type
 

MqDumpC - Export - function

MQ_DMP MqDumpHandleResolveP (MK_RT mkrt, MK_HDL const netHdl)
 Non-inline replacement for MqDumpHandleResolve
 
MK_HDL MqDumpHandleGetP (MK_RT mkrt, MQ_DMP const dmp)
 Non-inline replacement for MqDumpHandleGet
 

MqDumpC - Introspection - function

MQ_DMP MqDumpNextP (MQ_DMP const dmp)
 Non-inline replacement for MqDumpNext
 
MQ_DMP MqDumpPrevP (MQ_DMP const dmp)
 Non-inline replacement for MqDumpPrev
 
MQ_DMP MqDumpInstancesP (MK_RT mkrt)
 Non-inline replacement for MqDumpInstances
 

MqDumpC - Misc - function

MQ_DMP MqDumpGetNullP (void)
 Non-inline replacement for MqDumpGetNull
 

MqDumpC - Export - overload

#define MqDumpHandleResolve_NULL(...)
 
#define MqDumpHandleResolve(...)
 
#define MqDumpHandleGet_NULL(...)
 
#define MqDumpHandleGet(...)
 

MqDumpC - Introspection - overload

#define MqDumpInstances_NULL()
 
#define MqDumpInstances()
 

Detailed Description

MqDumpC - define the class …

Macro Definition Documentation

◆ MqDumpHandleGet

#define MqDumpHandleGet ( ...)
Value:
#define MK_RT_CALL
static MK_HDL MqDumpHandleGet_RT(MK_RT mkrt, MQ_DMP const dmp)
Handle-Get-Slot - returns a export-hdl to the MqDumpC useable for external storage

Definition at line 895 of file msgque_overload_mq.h.

◆ MqDumpHandleGet_NULL

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

Definition at line 894 of file msgque_overload_mq.h.

◆ MqDumpHandleResolve

#define MqDumpHandleResolve ( ...)
Value:
static MQ_DMP MqDumpHandleResolve_RT(MK_RT mkrt, MK_HDL const netHdl)
Handle-Resolve-Slot - return a MqDumpC from netHdl or MK_NULL if invalid…

Definition at line 891 of file msgque_overload_mq.h.

◆ MqDumpHandleResolve_e

#define MqDumpHandleResolve_e ( netHdl)
Value:
({ \
MK_HDL tmpHdl=netHdl; \
MQ_DMP tmp; \
if (tmpHdl==0) { \
tmp=NULL; \
} else { \
tmp=MqDumpHandleResolve(tmpHdl); \
if (tmp==NULL) { \
MkErrorSetC_1_NULL("ERROR: 'MqDumpC' handle is 'NULL'"); \
goto error; \
}; \
}; \
tmp; \
})
int32_t MK_HDL
#define MqDumpHandleResolve(...)
MqDumpC - the class known as dmp or dump is used to export a libmqmsgque data package as binary …

wrapper for MqDumpHandleResolve with error-handline

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

Definition at line 8807 of file LibMqMsgque_mq.h.

8807#define MqDumpHandleResolve_e(netHdl) ({ \
8808 MK_HDL tmpHdl=netHdl; \
8809 MQ_DMP tmp; \
8810 if (tmpHdl==0) { \
8811 tmp=NULL; \
8812 } else { \
8813 tmp=MqDumpHandleResolve(tmpHdl); \
8814 if (tmp==NULL) { \
8815 MkErrorSetC_1_NULL("ERROR: 'MqDumpC' handle is 'NULL'"); \
8816 goto error; \
8817 }; \
8818 }; \
8819 tmp; \
8820})

◆ MqDumpHandleResolve_NULL

#define MqDumpHandleResolve_NULL ( ...)
Value:

Definition at line 890 of file msgque_overload_mq.h.

◆ MqDumpInstances

#define MqDumpInstances ( )
Value:
#define MK_RT_CALL_ONLY
static MQ_DMP MqDumpInstances_RT(MK_RT mkrt)
get head-instance from linked-list of MqDumpS type …

Definition at line 906 of file msgque_overload_mq.h.

◆ MqDumpInstances_NULL

#define MqDumpInstances_NULL ( )
Value:

Definition at line 905 of file msgque_overload_mq.h.

Typedef Documentation

◆ MQ_DMP

typedef struct MqDumpS* MQ_DMP

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

Definition at line 530 of file LibMqMsgque_mq.h.

◆ MQ_DMPN

typedef const struct MqDumpS* MQ_DMPN

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

Definition at line 533 of file LibMqMsgque_mq.h.

◆ MQ_DMPR

typedef struct MqDumpS MQ_DMPR

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

Definition at line 536 of file LibMqMsgque_mq.h.

Function Documentation

◆ MqDumpGetNull()

static MQ_DMP MqDumpGetNull ( void )
inlinestatic

Null-Slot - return a MqDumpC typed NULL instance …

Definition at line 8832 of file LibMqMsgque_mq.h.

8832 {
8833 return (MQ_DMP)MK_NULL;
8834 }
#define MK_NULL

◆ MqDumpGetNullP()

MQ_DMP MqDumpGetNullP ( void )

Non-inline replacement for MqDumpGetNull

◆ MqDumpHandleGet_RT()

static MK_HDL MqDumpHandleGet_RT ( MK_RT mkrt,
MQ_DMP const dmp )
inlinestatic

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

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

Definition at line 8774 of file LibMqMsgque_mq.h.

8777 {
8778 return MkObjectHandleGet(dmp?MkOBJ(dmp):NULL);
8779}
#define MkObjectHandleGet(...)
#define MkOBJ(x)

◆ MqDumpHandleGetP()

MK_HDL MqDumpHandleGetP ( MK_RT mkrt,
MQ_DMP const dmp )

Non-inline replacement for MqDumpHandleGet

◆ MqDumpHandleResolve_RT()

static MQ_DMP MqDumpHandleResolve_RT ( MK_RT mkrt,
MK_HDL const netHdl )
inlinestatic

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

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

Definition at line 8791 of file LibMqMsgque_mq.h.

8794 {
8795 return MqDmp(MkObjectHandleResolve(netHdl));
8796}
#define MkObjectHandleResolve(...)
static MQ_DMP MqDmp(MK_MNG mng)
cast a unknown-object into an MqDumpS pointer or NULL if not possible

◆ MqDumpHandleResolveP()

MQ_DMP MqDumpHandleResolveP ( MK_RT mkrt,
MK_HDL const netHdl )

Non-inline replacement for MqDumpHandleResolve

◆ MqDumpInstances_RT()

static MQ_DMP MqDumpInstances_RT ( MK_RT mkrt)
inlinestatic

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

The head-instance is the last instance created.

Definition at line 9721 of file LibMqMsgque_mq.h.

9721 {
9723 return (MQ_DMP)MqDumpC_TT->instances;
9724}
#define MqDumpC_TT
class as MkTypeS-class-type, useable in a class-macro as: class##_TT …
#define MQ_STATIC_RT

◆ MqDumpInstancesP()

MQ_DMP MqDumpInstancesP ( MK_RT mkrt)

Non-inline replacement for MqDumpInstances

◆ MqDumpNext()

static MQ_DMP MqDumpNext ( MQ_DMP const dmp)
inlinestatic

get next instance from linked-list of MqDumpS type

Definition at line 9728 of file LibMqMsgque_mq.h.

9728 {
9729 MK_INSTANCE_HDL(dmp);
9730 return (MQ_DMP)MqDumpC_X2obj(dmp)->obj_protect.next;
9731}
#define MK_INSTANCE_HDL(x)
#define MqDumpC_X2obj(x)

◆ MqDumpNextP()

MQ_DMP MqDumpNextP ( MQ_DMP const dmp)

Non-inline replacement for MqDumpNext

◆ MqDumpPrev()

static MQ_DMP MqDumpPrev ( MQ_DMP const dmp)
inlinestatic

get previous instance from linked-list of MqDumpS type

Definition at line 9735 of file LibMqMsgque_mq.h.

9735 {
9736 MK_INSTANCE_HDL(dmp);
9737 return (MQ_DMP)MqDumpC_X2obj(dmp)->obj_protect.prev;
9738}

◆ MqDumpPrevP()

MQ_DMP MqDumpPrevP ( MQ_DMP const dmp)

Non-inline replacement for MqDumpPrev