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

MqFactoryC - define the class … More...

+ Collaboration diagram for MqFactoryC_Class_C_API:

Topics

 MqFactoryC_Class_Define_C_API
 MqFactoryC - low level definition, access and cast …
 

Typedefs

typedef struct MqFactorySMQ_FCT
 class-shortcut for struct MqFactoryS *, all shortcut using the XX_YYY syntax (only for public API) …
 
typedef const struct MqFactorySMQ_FCTN
 class-shortcut for const struct MqFactoryS *, all const shortcut using the XX_YYYC syntax (only for public API) …
 
typedef struct MqFactoryS MQ_FCTR
 reference-shortcut for struct MqFactoryS, all shortcut using the XX_YYYR syntax (only for public API) …
 

MqFactoryC - Export - inline - interact with an external software

static MK_HDL MqFactoryHandleGet_RT (MK_RT mkrt, MQ_FCT const fct)
 Handle-Get-Slot - returns a export-hdl to the MqFactoryC useable for external storage
 
static MQ_FCT MqFactoryHandleResolve_RT (MK_RT mkrt, MK_HDL const netHdl)
 Handle-Resolve-Slot - return a MqFactoryC from netHdl or None if invalid…
 
#define MqFactoryHandleResolve_e(netHdl)
 wrapper for MqFactoryHandleResolve with error-handline
 

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

static MQ_FCT MqFactoryGetNull (void)
 Null-Slot - return a MqFactoryC typed NULL instance …
 

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

static MQ_FCT MqFactoryInstances_RT (MK_RT mkrt)
 get head-instance from linked-list of MqFactoryS type …
 
static MQ_FCT MqFactoryNext (MQ_FCT const fct)
 get next instance from linked-list of MqFactoryS type
 
static MQ_FCT MqFactoryPrev (MQ_FCT const fct)
 get previous instance from linked-list of MqFactoryS type
 

MqFactoryC - Export - function

MQ_FCT MqFactoryHandleResolveP (MK_RT mkrt, MK_HDL const netHdl)
 Non-inline replacement for MqFactoryHandleResolve
 
MK_HDL MqFactoryHandleGetP (MK_RT mkrt, MQ_FCT const fct)
 Non-inline replacement for MqFactoryHandleGet
 

MqFactoryC - Introspection - function

MQ_FCT MqFactoryNextP (MQ_FCT const fct)
 Non-inline replacement for MqFactoryNext
 
MQ_FCT MqFactoryPrevP (MQ_FCT const fct)
 Non-inline replacement for MqFactoryPrev
 
MQ_FCT MqFactoryInstancesP (MK_RT mkrt)
 Non-inline replacement for MqFactoryInstances
 

MqFactoryC - Misc - function

MQ_FCT MqFactoryGetNullP (void)
 Non-inline replacement for MqFactoryGetNull
 

MqFactoryC - Export - overload

#define MqFactoryHandleResolve_NULL(...)
 
#define MqFactoryHandleResolve(...)
 
#define MqFactoryHandleGet_NULL(...)
 
#define MqFactoryHandleGet(...)
 

MqFactoryC - Introspection - overload

#define MqFactoryInstances_NULL()
 
#define MqFactoryInstances()
 

Detailed Description

MqFactoryC - define the class …

Macro Definition Documentation

◆ MqFactoryHandleGet

#define MqFactoryHandleGet ( ...)
Value:
#define MK_RT_CALL
static MK_HDL MqFactoryHandleGet_RT(MK_RT mkrt, MQ_FCT const fct)
Handle-Get-Slot - returns a export-hdl to the MqFactoryC useable for external storage

Definition at line 975 of file msgque_overload_mq.h.

◆ MqFactoryHandleGet_NULL

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

Definition at line 974 of file msgque_overload_mq.h.

◆ MqFactoryHandleResolve

#define MqFactoryHandleResolve ( ...)
Value:
static MQ_FCT MqFactoryHandleResolve_RT(MK_RT mkrt, MK_HDL const netHdl)
Handle-Resolve-Slot - return a MqFactoryC from netHdl or None if invalid…

Definition at line 971 of file msgque_overload_mq.h.

◆ MqFactoryHandleResolve_e

#define MqFactoryHandleResolve_e ( netHdl)
Value:
({ \
MK_HDL tmpHdl=netHdl; \
MQ_FCT tmp; \
if (tmpHdl==0) { \
tmp=NULL; \
} else { \
tmp=MqFactoryHandleResolve(tmpHdl); \
if (tmp==NULL) { \
MkErrorSetC_1_NULL("ERROR: 'MqFactoryC' handle is 'NULL'"); \
goto error; \
}; \
}; \
tmp; \
})
#define error
int32_t MK_HDL
#define MqFactoryHandleResolve(...)
data used to define a factory

wrapper for MqFactoryHandleResolve with error-handline

Parameters
[in]netHdlThe handle previously returned by MkObjectHandleGet.
Returns
Return an valid MQ_FCT or None with an error set.
  • If netHdl is 0 than None is returned and the upper-code decide how to deal with it.
  • MqFactoryHandleResolve return an valid MQ_FCT or None if the netHdl is invalid or the underlying object has already been deleted.
    • If a None is returned than an error-message is created and a jump to the label error is done.
    • If a MQ_FCT is returned than the netHdl is valid.

Definition at line 3330 of file LibMqMsgque_mq.h.

3330#define MqFactoryHandleResolve_e(netHdl) ({ \
3331 MK_HDL tmpHdl=netHdl; \
3332 MQ_FCT tmp; \
3333 if (tmpHdl==0) { \
3334 tmp=NULL; \
3335 } else { \
3336 tmp=MqFactoryHandleResolve(tmpHdl); \
3337 if (tmp==NULL) { \
3338 MkErrorSetC_1_NULL("ERROR: 'MqFactoryC' handle is 'NULL'"); \
3339 goto error; \
3340 }; \
3341 }; \
3342 tmp; \
3343})

◆ MqFactoryHandleResolve_NULL

#define MqFactoryHandleResolve_NULL ( ...)
Value:

Definition at line 970 of file msgque_overload_mq.h.

◆ MqFactoryInstances

#define MqFactoryInstances ( )
Value:
#define MK_RT_CALL_ONLY
static MQ_FCT MqFactoryInstances_RT(MK_RT mkrt)
get head-instance from linked-list of MqFactoryS type …

Definition at line 986 of file msgque_overload_mq.h.

◆ MqFactoryInstances_NULL

#define MqFactoryInstances_NULL ( )
Value:

Definition at line 985 of file msgque_overload_mq.h.

Typedef Documentation

◆ MQ_FCT

typedef struct MqFactoryS* MQ_FCT

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

Definition at line 544 of file LibMqMsgque_mq.h.

◆ MQ_FCTN

typedef const struct MqFactoryS* MQ_FCTN

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

Definition at line 547 of file LibMqMsgque_mq.h.

◆ MQ_FCTR

typedef struct MqFactoryS MQ_FCTR

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

Definition at line 550 of file LibMqMsgque_mq.h.

Function Documentation

◆ MqFactoryGetNull()

static MQ_FCT MqFactoryGetNull ( void )
inlinestatic

Null-Slot - return a MqFactoryC typed NULL instance …

Definition at line 3355 of file LibMqMsgque_mq.h.

3355 {
3356 return (MQ_FCT)MK_NULL;
3357 }
#define MK_NULL
+ Here is the caller graph for this function:

◆ MqFactoryGetNullP()

MQ_FCT MqFactoryGetNullP ( void )

Non-inline replacement for MqFactoryGetNull

◆ MqFactoryHandleGet_RT()

static MK_HDL MqFactoryHandleGet_RT ( MK_RT mkrt,
MQ_FCT const fct )
inlinestatic

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

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

Definition at line 3297 of file LibMqMsgque_mq.h.

3300 {
3301 return MkObjectHandleGet(fct?MkOBJ(fct):NULL);
3302}
#define MkObjectHandleGet(...)
#define MkOBJ(x)

◆ MqFactoryHandleGetP()

MK_HDL MqFactoryHandleGetP ( MK_RT mkrt,
MQ_FCT const fct )

Non-inline replacement for MqFactoryHandleGet

◆ MqFactoryHandleResolve_RT()

static MQ_FCT MqFactoryHandleResolve_RT ( MK_RT mkrt,
MK_HDL const netHdl )
inlinestatic

Handle-Resolve-Slot - return a MqFactoryC from netHdl or None if invalid…

The MqFactoryHandleResolve undo the MqFactoryHandleGet 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 MqFactoryHandleGet
Returns
the required handle or None if netHdl is invalid

Definition at line 3314 of file LibMqMsgque_mq.h.

3317 {
3318 return MqFct(MkObjectHandleResolve(netHdl));
3319}
#define MkObjectHandleResolve(...)
static MQ_FCT MqFct(MK_MNG mng)
cast a unknown-object into an MqFactoryS pointer or NULL if not possible

◆ MqFactoryHandleResolveP()

MQ_FCT MqFactoryHandleResolveP ( MK_RT mkrt,
MK_HDL const netHdl )

Non-inline replacement for MqFactoryHandleResolve

◆ MqFactoryInstances_RT()

static MQ_FCT MqFactoryInstances_RT ( MK_RT mkrt)
inlinestatic

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

The head-instance is the last instance created.

Definition at line 9756 of file LibMqMsgque_mq.h.

9756 {
9758 return (MQ_FCT)MqFactoryC_TT->instances;
9759}
#define MqFactoryC_TT
class as MkTypeS-class-type, useable in a class-macro as: class##_TT …
#define MQ_STATIC_RT

◆ MqFactoryInstancesP()

MQ_FCT MqFactoryInstancesP ( MK_RT mkrt)

Non-inline replacement for MqFactoryInstances

◆ MqFactoryNext()

static MQ_FCT MqFactoryNext ( MQ_FCT const fct)
inlinestatic

get next instance from linked-list of MqFactoryS type

Definition at line 9763 of file LibMqMsgque_mq.h.

9763 {
9764 MK_INSTANCE_HDL(fct);
9765 return (MQ_FCT)MqFactoryC_X2obj(fct)->obj_protect.next;
9766}
#define MK_INSTANCE_HDL(x)
#define MqFactoryC_X2obj(x)
+ Here is the caller graph for this function:

◆ MqFactoryNextP()

MQ_FCT MqFactoryNextP ( MQ_FCT const fct)

Non-inline replacement for MqFactoryNext

◆ MqFactoryPrev()

static MQ_FCT MqFactoryPrev ( MQ_FCT const fct)
inlinestatic

get previous instance from linked-list of MqFactoryS type

Definition at line 9770 of file LibMqMsgque_mq.h.

9770 {
9771 MK_INSTANCE_HDL(fct);
9772 return (MQ_FCT)MqFactoryC_X2obj(fct)->obj_protect.prev;
9773}
+ Here is the caller graph for this function:

◆ MqFactoryPrevP()

MQ_FCT MqFactoryPrevP ( MQ_FCT const fct)

Non-inline replacement for MqFactoryPrev